index
int64
repo_id
string
file_path
string
content
string
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/config/PredictorConfiguration.java
package biz.k11i.xgboost.config; import biz.k11i.xgboost.learner.ObjFunction; import biz.k11i.xgboost.tree.DefaultRegTreeFactory; import biz.k11i.xgboost.tree.RegTreeFactory; public class PredictorConfiguration { public static class Builder { private PredictorConfiguration predictorConfiguration; Builder() { predictorConfiguration = new PredictorConfiguration(); } public Builder objFunction(ObjFunction objFunction) { predictorConfiguration.objFunction = objFunction; return this; } public Builder regTreeFactory(RegTreeFactory regTreeFactory) { predictorConfiguration.regTreeFactory = regTreeFactory; return this; } public PredictorConfiguration build() { PredictorConfiguration result = predictorConfiguration; predictorConfiguration = null; return result; } } public static final PredictorConfiguration DEFAULT = new PredictorConfiguration(); private ObjFunction objFunction; private RegTreeFactory regTreeFactory; public PredictorConfiguration() { this.regTreeFactory = DefaultRegTreeFactory.INSTANCE; } public ObjFunction getObjFunction() { return objFunction; } public RegTreeFactory getRegTreeFactory() { return regTreeFactory; } public static Builder builder() { return new Builder(); } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/gbm/Dart.java
package biz.k11i.xgboost.gbm; import biz.k11i.xgboost.config.PredictorConfiguration; import biz.k11i.xgboost.tree.RegTree; import biz.k11i.xgboost.util.FVec; import biz.k11i.xgboost.util.ModelReader; import java.io.IOException; import java.util.Arrays; /** * Gradient boosted DART tree implementation. */ public class Dart extends GBTree { private float[] weightDrop; Dart() { // do nothing } @Override public void loadModel(PredictorConfiguration config, ModelReader reader, boolean with_pbuffer) throws IOException { super.loadModel(config, reader, with_pbuffer); if (mparam.num_trees != 0) { long size = reader.readLong(); weightDrop = reader.readFloatArray((int)size); } } @Override float pred(FVec feat, int bst_group, int root_index, int ntree_limit, float base_score) { RegTree[] trees = _groupTrees[bst_group]; int treeleft = ntree_limit == 0 ? trees.length : ntree_limit; float psum = base_score; for (int i = 0; i < treeleft; i++) { psum += weightDrop[i] * trees[i].getLeafValue(feat, root_index); } return psum; } public float weight(int tidx) { return weightDrop[tidx]; } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/gbm/GBLinear.java
package biz.k11i.xgboost.gbm; import biz.k11i.xgboost.config.PredictorConfiguration; import biz.k11i.xgboost.util.FVec; import biz.k11i.xgboost.util.ModelReader; import java.io.IOException; import java.io.Serializable; /** * Linear booster implementation */ public class GBLinear extends GBBase { private float[] weights; @Override public void loadModel(PredictorConfiguration config, ModelReader reader, boolean ignored_with_pbuffer) throws IOException { new ModelParam(reader); long len = reader.readLong(); if (len == 0) { weights = new float[(num_feature + 1) * num_output_group]; } else { weights = reader.readFloatArray((int) len); } } @Override public float[] predict(FVec feat, int ntree_limit, float base_score) { float[] preds = new float[num_output_group]; for (int gid = 0; gid < num_output_group; ++gid) { preds[gid] = pred(feat, gid, base_score); } return preds; } @Override public float predictSingle(FVec feat, int ntree_limit, float base_score) { if (num_output_group != 1) { throw new IllegalStateException( "Can't invoke predictSingle() because this model outputs multiple values: " + num_output_group); } return pred(feat, 0, base_score); } float pred(FVec feat, int gid, float base_score) { float psum = bias(gid) + base_score; float featValue; for (int fid = 0; fid < num_feature; ++fid) { featValue = feat.fvalue(fid); if (!Float.isNaN(featValue)) { psum += featValue * weight(fid, gid); } } return psum; } @Override public int[] predictLeaf(FVec feat, int ntree_limit) { throw new UnsupportedOperationException("gblinear does not support predict leaf index"); } @Override public String[] predictLeafPath(FVec feat, int ntree_limit) { throw new UnsupportedOperationException("gblinear does not support predict leaf path"); } public float weight(int fid, int gid) { return weights[(fid * num_output_group) + gid]; } public float bias(int gid) { return weights[(num_feature * num_output_group) + gid]; } static class ModelParam implements Serializable { /*! \brief reserved space */ final int[] reserved; ModelParam(ModelReader reader) throws IOException { reader.readUnsignedInt(); // num_feature deprecated reader.readInt(); // num_output_group deprecated reserved = reader.readIntArray(32); } } public int getNumFeature() { return num_feature; } public int getNumOutputGroup() { return num_output_group; } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/gbm/GBTree.java
package biz.k11i.xgboost.gbm; import biz.k11i.xgboost.config.PredictorConfiguration; import biz.k11i.xgboost.tree.RegTree; import biz.k11i.xgboost.util.FVec; import biz.k11i.xgboost.util.ModelReader; import java.io.IOException; import java.io.Serializable; import java.util.Arrays; /** * Gradient boosted tree implementation. */ public class GBTree extends GBBase { ModelParam mparam; private RegTree[] trees; RegTree[][] _groupTrees; @Override public void loadModel(PredictorConfiguration config, ModelReader reader, boolean with_pbuffer) throws IOException { mparam = new ModelParam(reader); trees = new RegTree[mparam.num_trees]; for (int i = 0; i < mparam.num_trees; i++) { trees[i] = config.getRegTreeFactory().loadTree(reader); } int[] tree_info = mparam.num_trees > 0 ? reader.readIntArray(mparam.num_trees) : new int[0]; if (mparam.num_pbuffer != 0 && with_pbuffer) { reader.skip(4 * predBufferSize()); reader.skip(4 * predBufferSize()); } _groupTrees = new RegTree[num_output_group][]; for (int i = 0; i < num_output_group; i++) { int treeCount = 0; for (int j = 0; j < tree_info.length; j++) { if (tree_info[j] == i) { treeCount++; } } _groupTrees[i] = new RegTree[treeCount]; treeCount = 0; for (int j = 0; j < tree_info.length; j++) { if (tree_info[j] == i) { _groupTrees[i][treeCount++] = trees[j]; } } } } @Override public float[] predict(FVec feat, int ntree_limit, float base_score) { float[] preds = new float[num_output_group]; for (int gid = 0; gid < num_output_group; gid++) { preds[gid] += pred(feat, gid, 0, ntree_limit, base_score); } return preds; } @Override public float predictSingle(FVec feat, int ntree_limit, float base_score) { if (num_output_group != 1) { throw new IllegalStateException( "Can't invoke predictSingle() because this model outputs multiple values: " + num_output_group); } return pred(feat, 0, 0, ntree_limit, base_score); } float pred(FVec feat, int bst_group, int root_index, int ntree_limit, float base_score) { RegTree[] trees = _groupTrees[bst_group]; int treeleft = ntree_limit == 0 ? trees.length : ntree_limit; float psum = base_score; for (int i = 0; i < treeleft; i++) { psum += trees[i].getLeafValue(feat, root_index); } return psum; } @Override public int[] predictLeaf(FVec feat, int ntree_limit) { int treeleft = ntree_limit == 0 ? trees.length : ntree_limit; int[] leafIndex = new int[treeleft]; for (int i = 0; i < treeleft; i++) { leafIndex[i] = trees[i].getLeafIndex(feat); } return leafIndex; } @Override public String[] predictLeafPath(FVec feat, int ntree_limit) { int treeleft = ntree_limit == 0 ? trees.length : ntree_limit; String[] leafPath = new String[treeleft]; StringBuilder sb = new StringBuilder(64); for (int i = 0; i < treeleft; i++) { trees[i].getLeafPath(feat, sb); leafPath[i] = sb.toString(); sb.setLength(0); } return leafPath; } private long predBufferSize() { return num_output_group * mparam.num_pbuffer * (mparam.size_leaf_vector + 1); } static class ModelParam implements Serializable { /*! \brief number of trees */ final int num_trees; /*! \brief number of root: default 0, means single tree */ final int num_roots; /*! \brief size of predicton buffer allocated used for buffering */ final long num_pbuffer; /*! \brief size of leaf vector needed in tree */ final int size_leaf_vector; /*! \brief reserved space */ final int[] reserved; ModelParam(ModelReader reader) throws IOException { num_trees = reader.readInt(); num_roots = reader.readInt(); reader.readInt(); // num_feature deprecated reader.readInt(); // read padding num_pbuffer = reader.readLong(); reader.readInt(); // num_output_group not used anymore size_leaf_vector = reader.readInt(); reserved = reader.readIntArray(31); reader.readInt(); // read padding } } /** * * @return A two-dim array, with trees grouped into classes. */ public RegTree[][] getGroupedTrees(){ return _groupTrees; } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/gbm/GradBooster.java
package biz.k11i.xgboost.gbm; import biz.k11i.xgboost.config.PredictorConfiguration; import biz.k11i.xgboost.util.FVec; import biz.k11i.xgboost.util.ModelReader; import java.io.IOException; import java.io.Serializable; /** * Interface of gradient boosting model. */ public interface GradBooster extends Serializable { class Factory { /** * Creates a gradient booster from given name. * * @param name name of gradient booster * @return created gradient booster */ public static GradBooster createGradBooster(String name) { if ("gbtree".equals(name)) { return new GBTree(); } else if ("gblinear".equals(name)) { return new GBLinear(); } else if ("dart".equals(name)) { return new Dart(); } throw new IllegalArgumentException(name + " is not supported model."); } } void setNumClass(int numClass); void setNumFeature(int numFeature); /** * Loads model from stream. * * @param config predictor configuration * @param reader input stream * @param with_pbuffer whether the incoming data contains pbuffer * @throws IOException If an I/O error occurs */ void loadModel(PredictorConfiguration config, ModelReader reader, boolean with_pbuffer) throws IOException; /** * Generates predictions for given feature vector. * * @param feat feature vector * @param ntree_limit limit the number of trees used in prediction * @param base_score base score to initialize prediction * @return prediction result */ float[] predict(FVec feat, int ntree_limit, float base_score); /** * Generates a prediction for given feature vector. * <p> * This method only works when the model outputs single value. * </p> * * @param feat feature vector * @param ntree_limit limit the number of trees used in prediction * @param base_score base score to initialize prediction * @return prediction result */ float predictSingle(FVec feat, int ntree_limit, float base_score); /** * Predicts the leaf index of each tree. This is only valid in gbtree predictor. * * @param feat feature vector * @param ntree_limit limit the number of trees used in prediction * @return predicted leaf indexes */ int[] predictLeaf(FVec feat, int ntree_limit); /** * Predicts the path to leaf of each tree. This is only valid in gbtree predictor. * * @param feat feature vector * @param ntree_limit limit the number of trees used in prediction * @return predicted path to leaves */ String[] predictLeafPath(FVec feat, int ntree_limit); } abstract class GBBase implements GradBooster { protected int num_class; protected int num_feature; protected int num_output_group; @Override public void setNumClass(int numClass) { this.num_class = numClass; this.num_output_group = (num_class == 0) ? 1 : num_class; } @Override public void setNumFeature(int numFeature) { this.num_feature = numFeature; } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/learner/ObjFunction.java
package biz.k11i.xgboost.learner; import biz.k11i.xgboost.config.PredictorConfiguration; import net.jafama.FastMath; import java.io.Serializable; import java.util.HashMap; import java.util.Map; /** * Objective function implementations. */ public class ObjFunction implements Serializable { private static final Map<String, ObjFunction> FUNCTIONS = new HashMap<>(); static { register("rank:pairwise", new ObjFunction()); register("rank:ndcg", new ObjFunction()); register("binary:logistic", new RegLossObjLogistic()); register("reg:logistic", new RegLossObjLogistic()); register("binary:logitraw", new ObjFunction()); register("multi:softmax", new SoftmaxMultiClassObjClassify()); register("multi:softprob", new SoftmaxMultiClassObjProb()); register("reg:linear", new ObjFunction()); register("reg:squarederror", new ObjFunction()); register("reg:gamma", new RegObjFunction()); register("reg:tweedie", new RegObjFunction()); register("count:poisson", new RegObjFunction()); } /** * Gets {@link ObjFunction} from given name. * * @param name name of objective function * @return objective function */ public static ObjFunction fromName(String name) { ObjFunction result = FUNCTIONS.get(name); if (result == null) { throw new IllegalArgumentException(name + " is not supported objective function."); } return result; } /** * Register an {@link ObjFunction} for a given name. * * @param name name of objective function * @param objFunction objective function * @deprecated This method will be made private. Please use {@link PredictorConfiguration.Builder#objFunction(ObjFunction)} instead. */ public static void register(String name, ObjFunction objFunction) { FUNCTIONS.put(name, objFunction); } /** * Uses Jafama's {@link FastMath#exp(double)} instead of {@link Math#exp(double)}. * * @param useJafama {@code true} if you want to use Jafama's {@link FastMath#exp(double)}, * or {@code false} if you don't want to use it but JDK's {@link Math#exp(double)}. */ public static void useFastMathExp(boolean useJafama) { if (useJafama) { register("binary:logistic", new RegLossObjLogistic_Jafama()); register("multi:softprob", new SoftmaxMultiClassObjProb_Jafama()); } else { register("binary:logistic", new RegLossObjLogistic()); register("multi:softprob", new SoftmaxMultiClassObjProb()); } } /** * Transforms prediction values. * * @param preds prediction * @return transformed values */ public float[] predTransform(float[] preds) { // do nothing return preds; } /** * Transforms a prediction value. * * @param pred prediction * @return transformed value */ public float predTransform(float pred) { // do nothing return pred; } public float probToMargin(float prob) { // do nothing return prob; } /** * Regression. */ static class RegObjFunction extends ObjFunction { @Override public float[] predTransform(float[] preds) { if (preds.length != 1) throw new IllegalStateException( "Regression problem is supposed to have just a single predicted value, got " + preds.length + " instead." ); preds[0] = (float) Math.exp(preds[0]); return preds; } @Override public float predTransform(float pred) { return (float) Math.exp(pred); } @Override public float probToMargin(float prob) { return (float) Math.log(prob); } } /** * Logistic regression. */ static class RegLossObjLogistic extends ObjFunction { @Override public float[] predTransform(float[] preds) { for (int i = 0; i < preds.length; i++) { preds[i] = sigmoid(preds[i]); } return preds; } @Override public float predTransform(float pred) { return sigmoid(pred); } float sigmoid(float x) { return (1f / (1f + (float) Math.exp(-x))); } @Override public float probToMargin(float prob) { return (float) -Math.log(1.0f / prob - 1.0f); } } /** * Logistic regression. * <p> * Jafama's {@link FastMath#exp(double)} version. * </p> */ static class RegLossObjLogistic_Jafama extends RegLossObjLogistic { @Override float sigmoid(float x) { return (float) (1 / (1 + FastMath.exp(-x))); } } /** * Multiclass classification. */ static class SoftmaxMultiClassObjClassify extends ObjFunction { @Override public float[] predTransform(float[] preds) { int maxIndex = 0; float max = preds[0]; for (int i = 1; i < preds.length; i++) { if (max < preds[i]) { maxIndex = i; max = preds[i]; } } return new float[]{maxIndex}; } @Override public float predTransform(float pred) { throw new UnsupportedOperationException(); } } /** * Multiclass classification (predicted probability). */ static class SoftmaxMultiClassObjProb extends ObjFunction { @Override public float[] predTransform(float[] preds) { float max = preds[0]; for (int i = 1; i < preds.length; i++) { max = Math.max(preds[i], max); } double sum = 0; for (int i = 0; i < preds.length; i++) { preds[i] = exp(preds[i] - max); sum += preds[i]; } for (int i = 0; i < preds.length; i++) { preds[i] /= (float) sum; } return preds; } @Override public float predTransform(float pred) { throw new UnsupportedOperationException(); } float exp(float x) { return (float) Math.exp(x); } } /** * Multiclass classification (predicted probability). * <p> * Jafama's {@link FastMath#exp(double)} version. * </p> */ static class SoftmaxMultiClassObjProb_Jafama extends SoftmaxMultiClassObjProb { @Override float exp(float x) { return (float) FastMath.exp(x); } } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/spark/SparkModelParam.java
package biz.k11i.xgboost.spark; import biz.k11i.xgboost.util.ModelReader; import java.io.IOException; import java.io.Serializable; public class SparkModelParam implements Serializable { public static final String MODEL_TYPE_CLS = "_cls_"; public static final String MODEL_TYPE_REG = "_reg_"; final String modelType; final String featureCol; final String labelCol; final String predictionCol; // classification model only final String rawPredictionCol; final double[] thresholds; public SparkModelParam(String modelType, String featureCol, ModelReader reader) throws IOException { this.modelType = modelType; this.featureCol = featureCol; this.labelCol = reader.readUTF(); this.predictionCol = reader.readUTF(); if (MODEL_TYPE_CLS.equals(modelType)) { this.rawPredictionCol = reader.readUTF(); int thresholdLength = reader.readIntBE(); this.thresholds = thresholdLength > 0 ? reader.readDoubleArrayBE(thresholdLength) : null; } else if (MODEL_TYPE_REG.equals(modelType)) { this.rawPredictionCol = null; this.thresholds = null; } else { throw new UnsupportedOperationException("Unknown modelType: " + modelType); } } public String getModelType() { return modelType; } public String getFeatureCol() { return featureCol; } public String getLabelCol() { return labelCol; } public String getPredictionCol() { return predictionCol; } public String getRawPredictionCol() { return rawPredictionCol; } public double[] getThresholds() { return thresholds; } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/tree/DefaultRegTreeFactory.java
package biz.k11i.xgboost.tree; import biz.k11i.xgboost.util.ModelReader; import java.io.IOException; public final class DefaultRegTreeFactory implements RegTreeFactory { public static RegTreeFactory INSTANCE = new DefaultRegTreeFactory(); @Override public final RegTree loadTree(ModelReader reader) throws IOException { RegTreeImpl regTree = new RegTreeImpl(); regTree.loadModel(reader); return regTree; } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/tree/RegTree.java
package biz.k11i.xgboost.tree; import biz.k11i.xgboost.util.FVec; import java.io.Serializable; /** * Regression tree. */ public interface RegTree extends Serializable { /** * Retrieves nodes from root to leaf and returns leaf index. * * @param feat feature vector * @return leaf index */ int getLeafIndex(FVec feat); /** * Retrieves nodes from root to leaf and returns path to leaf. * * @param feat feature vector * @param sb output param, will write path path to leaf into this buffer */ void getLeafPath(FVec feat, StringBuilder sb); /** * Retrieves nodes from root to leaf and returns leaf value. * * @param feat feature vector * @param root_id starting root index * @return leaf value */ float getLeafValue(FVec feat, int root_id); /** * * @return Tree's nodes */ RegTreeNode[] getNodes(); /** * @return Tree's nodes stats */ RegTreeNodeStat[] getStats(); }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/tree/RegTreeFactory.java
package biz.k11i.xgboost.tree; import biz.k11i.xgboost.util.ModelReader; import java.io.IOException; public interface RegTreeFactory { RegTree loadTree(ModelReader reader) throws IOException; }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/tree/RegTreeImpl.java
package biz.k11i.xgboost.tree; import ai.h2o.algos.tree.INodeStat; import biz.k11i.xgboost.util.FVec; import biz.k11i.xgboost.util.ModelReader; import java.io.IOException; import java.io.Serializable; /** * Regression tree. */ public class RegTreeImpl implements RegTree { private Param param; private Node[] nodes; private RegTreeNodeStat[] stats; /** * Loads model from stream. * * @param reader input stream * @throws IOException If an I/O error occurs */ public void loadModel(ModelReader reader) throws IOException { param = new Param(reader); nodes = new Node[param.num_nodes]; for (int i = 0; i < param.num_nodes; i++) { nodes[i] = new Node(reader); } stats = new RegTreeNodeStat[param.num_nodes]; for (int i = 0; i < param.num_nodes; i++) { stats[i] = new RegTreeNodeStat(reader); } } /** * Retrieves nodes from root to leaf and returns leaf index. * * @param feat feature vector * @return leaf index */ @Override public int getLeafIndex(FVec feat) { int id = 0; Node n; while (!(n = nodes[id])._isLeaf) { id = n.next(feat); } return id; } /** * Retrieves nodes from root to leaf and returns path to leaf. * * @param feat feature vector * @param sb output param, will write path path to leaf into this buffer */ @Override public void getLeafPath(FVec feat, StringBuilder sb) { int id = 0; Node n; while (!(n = nodes[id])._isLeaf) { id = n.next(feat); sb.append(id == n.cleft_ ? "L" : "R"); } } /** * Retrieves nodes from root to leaf and returns leaf value. * * @param feat feature vector * @param root_id starting root index * @return leaf value */ @Override public float getLeafValue(FVec feat, int root_id) { Node n = nodes[root_id]; while (!n._isLeaf) { n = nodes[n.next(feat)]; } return n.leaf_value; } @Override public Node[] getNodes() { return nodes; } @Override public RegTreeNodeStat[] getStats() { return stats; } /** * Parameters. */ static class Param implements Serializable { /*! \brief number of start root */ final int num_roots; /*! \brief total number of nodes */ final int num_nodes; /*!\brief number of deleted nodes */ final int num_deleted; /*! \brief maximum depth, this is a statistics of the tree */ final int max_depth; /*! \brief number of features used for tree construction */ final int num_feature; /*! * \brief leaf vector size, used for vector tree * used to store more than one dimensional information in tree */ final int size_leaf_vector; /*! \brief reserved part */ final int[] reserved; Param(ModelReader reader) throws IOException { num_roots = reader.readInt(); num_nodes = reader.readInt(); num_deleted = reader.readInt(); max_depth = reader.readInt(); num_feature = reader.readInt(); size_leaf_vector = reader.readInt(); reserved = reader.readIntArray(31); } } public static class Node extends RegTreeNode implements Serializable { // pointer to parent, highest bit is used to // indicate whether it's a left child or not final int parent_; // pointer to left, right final int cleft_, cright_; // split feature index, left split or right split depends on the highest bit final /* unsigned */ int sindex_; // extra info (leaf_value or split_cond) final float leaf_value; final float split_cond; private final int _defaultNext; private final int _splitIndex; final boolean _isLeaf; // set parent Node(ModelReader reader) throws IOException { parent_ = reader.readInt(); cleft_ = reader.readInt(); cright_ = reader.readInt(); sindex_ = reader.readInt(); if (isLeaf()) { leaf_value = reader.readFloat(); split_cond = Float.NaN; } else { split_cond = reader.readFloat(); leaf_value = Float.NaN; } _defaultNext = cdefault(); _splitIndex = getSplitIndex(); _isLeaf = isLeaf(); } public boolean isLeaf() { return cleft_ == -1; } @Override public int getSplitIndex() { return (int) (sindex_ & ((1l << 31) - 1l)); } public int cdefault() { return default_left() ? cleft_ : cright_; } @Override public boolean default_left() { return (sindex_ >>> 31) != 0; } @Override public int next(FVec feat) { float value = feat.fvalue(_splitIndex); if (value != value) { // is NaN? return _defaultNext; } return (value < split_cond) ? cleft_ : cright_; } @Override public int getParentIndex() { return parent_; } @Override public int getLeftChildIndex() { return cleft_; } @Override public int getRightChildIndex() { return cright_; } @Override public float getSplitCondition() { return split_cond; } @Override public float getLeafValue(){ return leaf_value; } } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/tree/RegTreeNode.java
package biz.k11i.xgboost.tree; import ai.h2o.algos.tree.INode; import biz.k11i.xgboost.util.FVec; import java.io.Serializable; public abstract class RegTreeNode implements INode<FVec>, Serializable { /** * * @return Index of node's parent */ public abstract int getParentIndex(); /** * * @return Index of node's left child node */ public abstract int getLeftChildIndex(); /** * * @return Index of node's right child node */ public abstract int getRightChildIndex(); /** * * @return Split condition on the node, if the node is a split node. Leaf nodes have this value set to NaN */ public abstract float getSplitCondition(); /** * * @return Predicted value on the leaf node, if the node is leaf. Otherwise NaN */ public abstract float getLeafValue(); /** * * @return True if default direction for unrecognized values is the LEFT child, otherwise false. */ public abstract boolean default_left(); /** * * @return Index of domain category used to split on the node */ public abstract int getSplitIndex(); }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/tree/RegTreeNodeStat.java
package biz.k11i.xgboost.tree; import ai.h2o.algos.tree.INodeStat; import biz.k11i.xgboost.util.ModelReader; import java.io.IOException; import java.io.Serializable; /** * Statistics for node in tree. */ public class RegTreeNodeStat implements INodeStat, Serializable { final float loss_chg; final float sum_hess; final float base_weight; final int leaf_child_cnt; RegTreeNodeStat(ModelReader reader) throws IOException { loss_chg = reader.readFloat(); sum_hess = reader.readFloat(); base_weight = reader.readFloat(); leaf_child_cnt = reader.readInt(); } @Override public float getWeight() { return getCover(); } /** * @return loss chg caused by current split */ public float getGain() { return loss_chg; } /** * @return sum of hessian values, used to measure coverage of data */ public float getCover() { return sum_hess; } /** * @return weight of current node */ public float getBaseWeight() { return base_weight; } /** * @return number of child that is leaf node known up to now */ public int getLeafCount() { return leaf_child_cnt; } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/util/FVec.java
package biz.k11i.xgboost.util; import java.io.Serializable; import java.util.Map; /** * Interface of feature vector. */ public interface FVec extends Serializable { /** * Gets index-th value. * * @param index index * @return value */ float fvalue(int index); class Transformer { private Transformer() { // do nothing } /** * Builds FVec from dense vector. * * @param values float values * @param treatsZeroAsNA treat zero as N/A if true * @return FVec */ public static FVec fromArray(float[] values, boolean treatsZeroAsNA) { return new FVecArrayImpl.FVecFloatArrayImpl(values, treatsZeroAsNA); } /** * Builds FVec from dense vector. * * @param values double values * @param treatsZeroAsNA treat zero as N/A if true * @return FVec */ public static FVec fromArray(double[] values, boolean treatsZeroAsNA) { return new FVecArrayImpl.FVecDoubleArrayImpl(values, treatsZeroAsNA); } /** * Builds FVec from map. * * @param map map containing non-zero values * @return FVec */ public static FVec fromMap(Map<Integer, ? extends Number> map) { return new FVecMapImpl(map); } } } class FVecMapImpl implements FVec { private final Map<Integer, ? extends Number> values; FVecMapImpl(Map<Integer, ? extends Number> values) { this.values = values; } @Override public float fvalue(int index) { Number number = values.get(index); if (number == null) { return Float.NaN; } return number.floatValue(); } } class FVecArrayImpl { static class FVecFloatArrayImpl implements FVec { private final float[] values; private final boolean treatsZeroAsNA; FVecFloatArrayImpl(float[] values, boolean treatsZeroAsNA) { this.values = values; this.treatsZeroAsNA = treatsZeroAsNA; } @Override public float fvalue(int index) { if (values.length <= index) { return Float.NaN; } float result = values[index]; if (treatsZeroAsNA && result == 0) { return Float.NaN; } return result; } } static class FVecDoubleArrayImpl implements FVec { private final double[] values; private final boolean treatsZeroAsNA; FVecDoubleArrayImpl(double[] values, boolean treatsZeroAsNA) { this.values = values; this.treatsZeroAsNA = treatsZeroAsNA; } @Override public float fvalue(int index) { if (values.length <= index) { return Float.NaN; } final double result = values[index]; if (treatsZeroAsNA && result == 0) { return Float.NaN; } return (float) result; } } }
0
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost
java-sources/ai/h2o/xgboost-predictor/0.3.20/biz/k11i/xgboost/util/ModelReader.java
package biz.k11i.xgboost.util; import java.io.Closeable; import java.io.EOFException; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.UTFDataFormatException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.charset.Charset; /** * Reads the Xgboost model from stream. */ public class ModelReader implements Closeable { private final InputStream stream; private byte[] buffer; @Deprecated public ModelReader(String filename) throws IOException { this(new FileInputStream(filename)); } public ModelReader(InputStream in) { stream = in; } private int fillBuffer(int numBytes) throws IOException { if (buffer == null || buffer.length < numBytes) { buffer = new byte[numBytes]; } int numBytesRead = 0; while (numBytesRead < numBytes) { int count = stream.read(buffer, numBytesRead, numBytes - numBytesRead); if (count < 0) { return numBytesRead; } numBytesRead += count; } return numBytesRead; } public int readByteAsInt() throws IOException { return stream.read(); } public byte[] readByteArray(int numBytes) throws IOException { int numBytesRead = fillBuffer(numBytes); if (numBytesRead < numBytes) { throw new EOFException( String.format("Cannot read byte array (shortage): expected = %d, actual = %d", numBytes, numBytesRead)); } byte[] result = new byte[numBytes]; System.arraycopy(buffer, 0, result, 0, numBytes); return result; } public int readInt() throws IOException { return readInt(ByteOrder.LITTLE_ENDIAN); } public int readIntBE() throws IOException { return readInt(ByteOrder.BIG_ENDIAN); } private int readInt(ByteOrder byteOrder) throws IOException { int numBytesRead = fillBuffer(4); if (numBytesRead < 4) { throw new EOFException("Cannot read int value (shortage): " + numBytesRead); } return ByteBuffer.wrap(buffer).order(byteOrder).getInt(); } public int[] readIntArray(int numValues) throws IOException { int numBytesRead = fillBuffer(numValues * 4); if (numBytesRead < numValues * 4) { throw new EOFException( String.format("Cannot read int array (shortage): expected = %d, actual = %d", numValues * 4, numBytesRead)); } ByteBuffer byteBuffer = ByteBuffer.wrap(buffer).order(ByteOrder.LITTLE_ENDIAN); int[] result = new int[numValues]; for (int i = 0; i < numValues; i++) { result[i] = byteBuffer.getInt(); } return result; } public int readUnsignedInt() throws IOException { int result = readInt(); if (result < 0) { throw new IOException("Cannot read unsigned int (overflow): " + result); } return result; } public long readLong() throws IOException { int numBytesRead = fillBuffer(8); if (numBytesRead < 8) { throw new IOException("Cannot read long value (shortage): " + numBytesRead); } return ByteBuffer.wrap(buffer).order(ByteOrder.LITTLE_ENDIAN).getLong(); } public float asFloat(byte[] bytes) { return ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN).getFloat(); } public int asUnsignedInt(byte[] bytes) throws IOException { int result = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN).getInt(); if (result < 0) { throw new IOException("Cannot treat as unsigned int (overflow): " + result); } return result; } public float readFloat() throws IOException { int numBytesRead = fillBuffer(4); if (numBytesRead < 4) { throw new IOException("Cannot read float value (shortage): " + numBytesRead); } return ByteBuffer.wrap(buffer).order(ByteOrder.LITTLE_ENDIAN).getFloat(); } public float[] readFloatArray(int numValues) throws IOException { int numBytesRead = fillBuffer(numValues * 4); if (numBytesRead < numValues * 4) { throw new EOFException( String.format("Cannot read float array (shortage): expected = %d, actual = %d", numValues * 4, numBytesRead)); } ByteBuffer byteBuffer = ByteBuffer.wrap(buffer).order(ByteOrder.LITTLE_ENDIAN); float[] result = new float[numValues]; for (int i = 0; i < numValues; i++) { result[i] = byteBuffer.getFloat(); } return result; } public double[] readDoubleArrayBE(int numValues) throws IOException { int numBytesRead = fillBuffer(numValues * 8); if (numBytesRead < numValues * 8) { throw new EOFException( String.format("Cannot read double array (shortage): expected = %d, actual = %d", numValues * 8, numBytesRead)); } ByteBuffer byteBuffer = ByteBuffer.wrap(buffer).order(ByteOrder.BIG_ENDIAN); double[] result = new double[numValues]; for (int i = 0; i < numValues; i++) { result[i] = byteBuffer.getDouble(); } return result; } public void skip(long numBytes) throws IOException { long numBytesRead = stream.skip(numBytes); if (numBytesRead < numBytes) { throw new IOException("Cannot skip bytes: " + numBytesRead); } } public String readString() throws IOException { long length = readLong(); if (length > Integer.MAX_VALUE) { throw new IOException("Too long string: " + length); } return readString((int) length); } public String readString(int numBytes) throws IOException { int numBytesRead = fillBuffer(numBytes); if (numBytesRead < numBytes) { throw new IOException(String.format("Cannot read string(%d) (shortage): %d", numBytes, numBytesRead)); } return new String(buffer, 0, numBytes, Charset.forName("UTF-8")); } public String readUTF() throws IOException { int utflen = readByteAsInt(); utflen = (short)((utflen << 8) | readByteAsInt()); return readUTF(utflen); } public String readUTF(int utflen) throws IOException { int numBytesRead = fillBuffer(utflen); if (numBytesRead < utflen) { throw new EOFException( String.format("Cannot read UTF string bytes: expected = %d, actual = %d", utflen, numBytesRead)); } char[] chararr = new char[utflen]; int c, char2, char3; int count = 0; int chararr_count=0; while (count < utflen) { c = (int) buffer[count] & 0xff; if (c > 127) break; count++; chararr[chararr_count++]=(char)c; } while (count < utflen) { c = (int) buffer[count] & 0xff; switch (c >> 4) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: /* 0xxxxxxx*/ count++; chararr[chararr_count++]=(char)c; break; case 12: case 13: /* 110x xxxx 10xx xxxx*/ count += 2; if (count > utflen) throw new UTFDataFormatException( "malformed input: partial character at end"); char2 = (int) buffer[count-1]; if ((char2 & 0xC0) != 0x80) throw new UTFDataFormatException( "malformed input around byte " + count); chararr[chararr_count++]=(char)(((c & 0x1F) << 6) | (char2 & 0x3F)); break; case 14: /* 1110 xxxx 10xx xxxx 10xx xxxx */ count += 3; if (count > utflen) throw new UTFDataFormatException( "malformed input: partial character at end"); char2 = (int) buffer[count-2]; char3 = (int) buffer[count-1]; if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) throw new UTFDataFormatException( "malformed input around byte " + (count-1)); chararr[chararr_count++]=(char)(((c & 0x0F) << 12) | ((char2 & 0x3F) << 6) | ((char3 & 0x3F) << 0)); break; default: /* 10xx xxxx, 1111 xxxx */ throw new UTFDataFormatException( "malformed input around byte " + count); } } // The number of chars produced may be less than utflen return new String(chararr, 0, chararr_count); } @Override public void close() throws IOException { stream.close(); } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/Booster.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.io.*; import java.lang.reflect.Constructor; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Booster for xgboost, this is a model API that support interactive build of a XGBoost Model */ public class Booster implements Serializable { private static final Log logger = LogFactory.getLog(Booster.class); private static final boolean USE_KRYO_BOOSTER; private static final Class<?> KRYO_BOOSTER_CLASS; static { boolean useKryo; try { Class.forName("com.esotericsoftware.kryo.KryoSerializable"); useKryo = true; } catch (ClassNotFoundException e) { useKryo = false; logger.debug("Kryo is not available", e); } Class<?> kryoBoosterClass; if (useKryo) { try { String kryoBoosterClassName = Booster.class.getPackage().getName() + ".KryoBooster"; kryoBoosterClass = Class.forName(kryoBoosterClassName); } catch (ClassNotFoundException e) { logger.error("KryoBooster is not available", e); kryoBoosterClass = null; } } else kryoBoosterClass = null; USE_KRYO_BOOSTER = kryoBoosterClass != null; KRYO_BOOSTER_CLASS = kryoBoosterClass; } // handle to the booster. protected long handle = 0; protected int version = 0; /** * Create a new Booster with empty stage. * * @param params Model parameters * @param cacheMats Cached DMatrix entries, * the prediction of these DMatrices will become faster than not-cached data. * @throws XGBoostError native error */ static Booster newBooster(Map<String, Object> params, DMatrix[] cacheMats) throws XGBoostError { if (USE_KRYO_BOOSTER) return newKryoBooster(params, cacheMats); else return new Booster(params, cacheMats, false); } private static Booster newKryoBooster(Map<String, Object> params, DMatrix[] cacheMats) throws XGBoostError { try { Constructor<?> constuctor = KRYO_BOOSTER_CLASS.getDeclaredConstructors()[0]; return (Booster) constuctor.newInstance(params, cacheMats); } catch (ReflectiveOperationException | IllegalArgumentException e) { logger.error(e); throw new XGBoostError(e.getMessage()); } } protected Booster(Map<String, Object> params, DMatrix[] cacheMats, boolean isKryoBooster) throws XGBoostError { this(isKryoBooster); init(cacheMats); setParam("seed", "0"); setParams(params); } // Booster is not actually initialized in this constructor; must be initialized later - used in deserialization protected Booster(boolean isKryoBooster) { if (USE_KRYO_BOOSTER != isKryoBooster) throw new IllegalStateException("Attempt to instantiate a Booster without support for Kryo in an environment that supports Kryo."); } /** * Load a new Booster model from modelPath * @param modelPath The path to the model. * @return The created Booster. * @throws XGBoostError */ static Booster loadModel(String modelPath) throws XGBoostError { if (modelPath == null) { throw new NullPointerException("modelPath : null"); } Booster ret = newBooster(new HashMap<String, Object>(), new DMatrix[0]); XGBoostJNI.checkCall(XGBoostJNI.XGBoosterLoadModel(ret.handle, modelPath)); return ret; } /** * Load a new Booster model from a file opened as input stream. * The assumption is the input stream only contains one XGBoost Model. * This can be used to load existing booster models saved by other xgboost bindings. * * @param in The input stream of the file. * @return The create boosted * @throws XGBoostError * @throws IOException */ static Booster loadModel(InputStream in) throws XGBoostError, IOException { int size; byte[] buf = new byte[1<<20]; ByteArrayOutputStream os = new ByteArrayOutputStream(); while ((size = in.read(buf)) != -1) { os.write(buf, 0, size); } in.close(); Booster ret = newBooster(new HashMap<String, Object>(), new DMatrix[0]); XGBoostJNI.checkCall(XGBoostJNI.XGBoosterLoadModelFromBuffer(ret.handle,os.toByteArray())); return ret; } /** * Set parameter to the Booster. * * @param key param name * @param value param value * @throws XGBoostError native error */ public final void setParam(String key, Object value) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGBoosterSetParam(handle, key, value.toString())); } /** * Set parameters to the Booster. * * @param params parameters key-value map * @throws XGBoostError native error */ public void setParams(Map<String, Object> params) throws XGBoostError { if (params != null) { for (Map.Entry<String, Object> entry : params.entrySet()) { setParam(entry.getKey(), entry.getValue().toString()); } } } /** * Get attributes stored in the Booster as a Map. * * @return A map contain attribute pairs. * @throws XGBoostError native error */ public final Map<String, String> getAttrs() throws XGBoostError { String[][] attrNames = new String[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterGetAttrNames(handle, attrNames)); Map<String, String> attrMap = new HashMap<>(); for (String name: attrNames[0]) { attrMap.put(name, this.getAttr(name)); } return attrMap; } /** * Get attribute from the Booster. * * @param key attribute key * @return attribute value * @throws XGBoostError native error */ public final String getAttr(String key) throws XGBoostError { String[] attrValue = new String[1]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterGetAttr(handle, key, attrValue)); return attrValue[0]; } /** * Set attribute to the Booster. * * @param key attribute key * @param value attribute value * @throws XGBoostError native error */ public final void setAttr(String key, String value) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGBoosterSetAttr(handle, key, value)); } /** * Set attributes to the Booster. * * @param attrs attributes key-value map * @throws XGBoostError native error */ public void setAttrs(Map<String, String> attrs) throws XGBoostError { if (attrs != null) { for (Map.Entry<String, String> entry : attrs.entrySet()) { setAttr(entry.getKey(), entry.getValue()); } } } /** * Update the booster for one iteration. * * @param dtrain training data * @param iter current iteration number * @throws XGBoostError native error */ public void update(DMatrix dtrain, int iter) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGBoosterUpdateOneIter(handle, iter, dtrain.getHandle())); } /** * Update with customize obj func * * @param dtrain training data * @param obj customized objective class * @throws XGBoostError native error */ public void update(DMatrix dtrain, IObjective obj) throws XGBoostError { float[][] predicts = this.predict(dtrain, true, 0, false, false); List<float[]> gradients = obj.getGradient(predicts, dtrain); boost(dtrain, gradients.get(0), gradients.get(1)); } /** * update with give grad and hess * * @param dtrain training data * @param grad first order of gradient * @param hess seconde order of gradient * @throws XGBoostError native error */ public void boost(DMatrix dtrain, float[] grad, float[] hess) throws XGBoostError { if (grad.length != hess.length) { throw new AssertionError(String.format("grad/hess length mismatch %s / %s", grad.length, hess.length)); } XGBoostJNI.checkCall(XGBoostJNI.XGBoosterBoostOneIter(handle, dtrain.getHandle(), grad, hess)); } /** * evaluate with given dmatrixs. * * @param evalMatrixs dmatrixs for evaluation * @param evalNames name for eval dmatrixs, used for check results * @param iter current eval iteration * @return eval information * @throws XGBoostError native error */ public String evalSet(DMatrix[] evalMatrixs, String[] evalNames, int iter) throws XGBoostError { long[] handles = dmatrixsToHandles(evalMatrixs); String[] evalInfo = new String[1]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterEvalOneIter(handle, iter, handles, evalNames, evalInfo)); return evalInfo[0]; } /** * evaluate with given dmatrixs. * * @param evalMatrixs dmatrixs for evaluation * @param evalNames name for eval dmatrixs, used for check results * @param iter current eval iteration * @param metricsOut output array containing the evaluation metrics for each evalMatrix * @return eval information * @throws XGBoostError native error */ public String evalSet(DMatrix[] evalMatrixs, String[] evalNames, int iter, float[] metricsOut) throws XGBoostError { String stringFormat = evalSet(evalMatrixs, evalNames, iter); String[] metricPairs = stringFormat.split("\t"); for (int i = 1; i < metricPairs.length; i++) { metricsOut[i - 1] = Float.valueOf(metricPairs[i].split(":")[1]); } return stringFormat; } /** * evaluate with given customized Evaluation class * * @param evalMatrixs evaluation matrix * @param evalNames evaluation names * @param eval custom evaluator * @return eval information * @throws XGBoostError native error */ public String evalSet(DMatrix[] evalMatrixs, String[] evalNames, IEvaluation eval) throws XGBoostError { // Hopefully, a tiny redundant allocation wouldn't hurt. return evalSet(evalMatrixs, evalNames, eval, new float[evalNames.length]); } public String evalSet(DMatrix[] evalMatrixs, String[] evalNames, IEvaluation eval, float[] metricsOut) throws XGBoostError { String evalInfo = ""; for (int i = 0; i < evalNames.length; i++) { String evalName = evalNames[i]; DMatrix evalMat = evalMatrixs[i]; float evalResult = eval.eval(predict(evalMat), evalMat); String evalMetric = eval.getMetric(); evalInfo += String.format("\t%s-%s:%f", evalName, evalMetric, evalResult); metricsOut[i] = evalResult; } return evalInfo; } /** * Advanced predict function with all the options. * * @param data data * @param outputMargin output margin * @param treeLimit limit number of trees, 0 means all trees. * @param predLeaf prediction minimum to keep leafs * @param predContribs prediction feature contributions * @return predict results */ private synchronized float[][] predict(DMatrix data, boolean outputMargin, int treeLimit, boolean predLeaf, boolean predContribs) throws XGBoostError { int optionMask = 0; if (outputMargin) { optionMask = 1; } if (predLeaf) { optionMask = 2; } if (predContribs) { optionMask = 4; } float[][] rawPredicts = new float[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterPredict(handle, data.getHandle(), optionMask, treeLimit, rawPredicts)); int row = (int) data.rowNum(); int col = rawPredicts[0].length / row; float[][] predicts = new float[row][col]; int r, c; for (int i = 0; i < rawPredicts[0].length; i++) { r = i / col; c = i % col; predicts[r][c] = rawPredicts[0][i]; } return predicts; } /** * Predict leaf indices given the data * * @param data The input data. * @param treeLimit Number of trees to include, 0 means all trees. * @return The leaf indices of the instance. * @throws XGBoostError */ public float[][] predictLeaf(DMatrix data, int treeLimit) throws XGBoostError { return this.predict(data, false, treeLimit, true, false); } /** * Output feature contributions toward predictions of given data * * @param data The input data. * @param treeLimit Number of trees to include, 0 means all trees. * @return The feature contributions and bias. * @throws XGBoostError */ public float[][] predictContrib(DMatrix data, int treeLimit) throws XGBoostError { return this.predict(data, false, treeLimit, true, true); } /** * Predict with data * * @param data dmatrix storing the input * @return predict result * @throws XGBoostError native error */ public float[][] predict(DMatrix data) throws XGBoostError { return this.predict(data, false, 0, false, false); } /** * Predict with data * * @param data data * @param outputMargin output margin * @return predict results */ public float[][] predict(DMatrix data, boolean outputMargin) throws XGBoostError { return this.predict(data, outputMargin, 0, false, false); } /** * Advanced predict function with all the options. * * @param data data * @param outputMargin output margin * @param treeLimit limit number of trees, 0 means all trees. * @return predict results */ public float[][] predict(DMatrix data, boolean outputMargin, int treeLimit) throws XGBoostError { return this.predict(data, outputMargin, treeLimit, false, false); } /** * Save model to modelPath * * @param modelPath model path */ public void saveModel(String modelPath) throws XGBoostError{ XGBoostJNI.checkCall(XGBoostJNI.XGBoosterSaveModel(handle, modelPath)); } /** * Save the model to file opened as output stream. * The model format is compatible with other xgboost bindings. * The output stream can only save one xgboost model. * This function will close the OutputStream after the save. * * @param out The output stream */ public void saveModel(OutputStream out) throws XGBoostError, IOException { out.write(this.toByteArray()); out.close(); } /** * Get the dump of the model as a string array * * @param withStats Controls whether the split statistics are output. * @return dumped model information * @throws XGBoostError native error */ public String[] getModelDump(String featureMap, boolean withStats) throws XGBoostError { return getModelDump(featureMap, withStats, "text"); } public String[] getModelDump(String featureMap, boolean withStats, String format) throws XGBoostError { int statsFlag = 0; if (featureMap == null) { featureMap = ""; } if (withStats) { statsFlag = 1; } if (format == null) { format = "text"; } String[][] modelInfos = new String[1][]; XGBoostJNI.checkCall( XGBoostJNI.XGBoosterDumpModelEx(handle, featureMap, statsFlag, format, modelInfos)); return modelInfos[0]; } /** * Get the dump of the model as a string array with specified feature names. * * @param featureNames Names of the features. * @return dumped model information * @throws XGBoostError */ public String[] getModelDump(String[] featureNames, boolean withStats) throws XGBoostError { return getModelDump(featureNames, withStats, "text"); } public String[] getModelDump(String[] featureNames, boolean withStats, String format) throws XGBoostError { int statsFlag = 0; if (withStats) { statsFlag = 1; } if (format == null) { format = "text"; } String[][] modelInfos = new String[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterDumpModelExWithFeatures( handle, featureNames, statsFlag, format, modelInfos)); return modelInfos[0]; } /** * Supported feature importance types * * WEIGHT = Number of nodes that a feature was used to determine a split * GAIN = Average information gain per split for a feature * COVER = Average cover per split for a feature * TOTAL_GAIN = Total information gain over all splits of a feature * TOTAL_COVER = Total cover over all splits of a feature */ public static class FeatureImportanceType { public static final String WEIGHT = "weight"; public static final String GAIN = "gain"; public static final String COVER = "cover"; public static final String TOTAL_GAIN = "total_gain"; public static final String TOTAL_COVER = "total_cover"; public static final Set<String> ACCEPTED_TYPES = new HashSet<>( Arrays.asList(WEIGHT, GAIN, COVER, TOTAL_GAIN, TOTAL_COVER)); } /** * Get importance of each feature with specified feature names. * * @return featureScoreMap key: feature name, value: feature importance score, can be nill. * @throws XGBoostError native error */ public Map<String, Integer> getFeatureScore(String[] featureNames) throws XGBoostError { String[] modelInfos = getModelDump(featureNames, false); return getFeatureWeightsFromModel(modelInfos); } /** * Get importance of each feature * * @return featureScoreMap key: feature index, value: feature importance score, can be nill * @throws XGBoostError native error */ public Map<String, Integer> getFeatureScore(String featureMap) throws XGBoostError { String[] modelInfos = getModelDump(featureMap, false); return getFeatureWeightsFromModel(modelInfos); } /** * Get the importance of each feature based purely on weights (number of splits) * * @return featureScoreMap key: feature index, * value: feature importance score based on weight * @throws XGBoostError native error */ private Map<String, Integer> getFeatureWeightsFromModel(String[] modelInfos) throws XGBoostError { Map<String, Integer> featureScore = new HashMap<>(); for (String tree : modelInfos) { for (String node : tree.split("\n")) { String[] array = node.split("\\["); if (array.length == 1) { continue; } String fid = array[1].split("\\]")[0]; fid = fid.split("<")[0]; if (featureScore.containsKey(fid)) { featureScore.put(fid, 1 + featureScore.get(fid)); } else { featureScore.put(fid, 1); } } } return featureScore; } /** * Get the feature importances for gain or cover (average or total) * * @return featureImportanceMap key: feature index, * values: feature importance score based on gain or cover * @throws XGBoostError native error */ public Map<String, Double> getScore( String[] featureNames, String importanceType) throws XGBoostError { String[] modelInfos = getModelDump(featureNames, true); return getFeatureImportanceFromModel(modelInfos, importanceType); } /** * Get the feature importances for gain or cover (average or total), with feature names * * @return featureImportanceMap key: feature name, * values: feature importance score based on gain or cover * @throws XGBoostError native error */ public Map<String, Double> getScore( String featureMap, String importanceType) throws XGBoostError { String[] modelInfos = getModelDump(featureMap, true); return getFeatureImportanceFromModel(modelInfos, importanceType); } /** * Get the importance of each feature based on information gain or cover * * @return featureImportanceMap key: feature index, value: feature importance score * based on information gain or cover * @throws XGBoostError native error */ private Map<String, Double> getFeatureImportanceFromModel( String[] modelInfos, String importanceType) throws XGBoostError { if (!FeatureImportanceType.ACCEPTED_TYPES.contains(importanceType)) { throw new AssertionError(String.format("Importance type %s is not supported", importanceType)); } Map<String, Double> importanceMap = new HashMap<>(); Map<String, Double> weightMap = new HashMap<>(); if (importanceType == FeatureImportanceType.WEIGHT) { Map<String, Integer> importanceWeights = getFeatureWeightsFromModel(modelInfos); for (String feature: importanceWeights.keySet()) { importanceMap.put(feature, new Double(importanceWeights.get(feature))); } return importanceMap; } /* Each split in the tree has this text form: "0:[f28<-9.53674316e-07] yes=1,no=2,missing=1,gain=4000.53101,cover=1628.25" So the line has to be split according to whether cover or gain is desired */ String splitter = "gain="; if (importanceType == FeatureImportanceType.COVER || importanceType == FeatureImportanceType.TOTAL_COVER) { splitter = "cover="; } for (String tree: modelInfos) { for (String node: tree.split("\n")) { String[] array = node.split("\\["); if (array.length == 1) { continue; } String[] fidWithImportance = array[1].split("\\]"); // Extract gain or cover from string after closing bracket Double importance = Double.parseDouble( fidWithImportance[1].split(splitter)[1].split(",")[0] ); String fid = fidWithImportance[0].split("<")[0]; if (importanceMap.containsKey(fid)) { importanceMap.put(fid, importance + importanceMap.get(fid)); weightMap.put(fid, 1d + weightMap.get(fid)); } else { importanceMap.put(fid, importance); weightMap.put(fid, 1d); } } } /* By default we calculate total gain and total cover. Divide by the number of nodes per feature to get gain / cover */ if (importanceType == FeatureImportanceType.COVER || importanceType == FeatureImportanceType.GAIN) { for (String fid: importanceMap.keySet()) { importanceMap.put(fid, importanceMap.get(fid)/weightMap.get(fid)); } } return importanceMap; } /** * Save the model as byte array representation. * Write these bytes to a file will give compatible format with other xgboost bindings. * * If java natively support HDFS file API, use toByteArray and write the ByteArray * * @param withStats Controls whether the split statistics are output. * @return dumped model information * @throws XGBoostError native error */ private String[] getDumpInfo(boolean withStats) throws XGBoostError { int statsFlag = 0; if (withStats) { statsFlag = 1; } String[][] modelInfos = new String[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterDumpModelEx(handle, "", statsFlag, "text", modelInfos)); return modelInfos[0]; } public int getVersion() { return this.version; } public void setVersion(int version) { this.version = version; } /** * * @return the saved byte array. * @throws XGBoostError native error */ public byte[] toByteArray() throws XGBoostError { byte[][] bytes = new byte[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterGetModelRaw(this.handle, bytes)); return bytes[0]; } /** * Load the booster model from thread-local rabit checkpoint. * This is only used in distributed training. * @return the stored version number of the checkpoint. * @throws XGBoostError */ int loadRabitCheckpoint() throws XGBoostError { int[] out = new int[1]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterLoadRabitCheckpoint(this.handle, out)); version = out[0]; return version; } /** * Save the booster model into thread-local rabit checkpoint and increment the version. * This is only used in distributed training. * @throws XGBoostError */ void saveRabitCheckpoint() throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGBoosterSaveRabitCheckpoint(this.handle)); version += 1; } /** * Internal initialization function. * @param cacheMats The cached DMatrix. * @throws XGBoostError */ protected void init(DMatrix[] cacheMats) throws XGBoostError { long[] handles = null; if (cacheMats != null) { handles = dmatrixsToHandles(cacheMats); } long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterCreate(handles, out)); handle = out[0]; } /** * transfer DMatrix array to handle array (used for native functions) * * @param dmatrixs * @return handle array for input dmatrixs */ private static long[] dmatrixsToHandles(DMatrix[] dmatrixs) { long[] handles = new long[dmatrixs.length]; for (int i = 0; i < dmatrixs.length; i++) { handles[i] = dmatrixs[i].getHandle(); } return handles; } // making Booster serializable private void writeObject(java.io.ObjectOutputStream out) throws IOException { try { out.writeInt(version); out.writeObject(this.toByteArray()); } catch (XGBoostError ex) { ex.printStackTrace(); logger.error(ex.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { try { this.init(null); this.version = in.readInt(); byte[] bytes = (byte[])in.readObject(); initFromBytes(bytes); } catch (XGBoostError ex) { ex.printStackTrace(); logger.error(ex.getMessage()); } } protected void initFromBytes(byte[] bytes) throws XGBoostError { this.init(null); XGBoostJNI.checkCall(XGBoostJNI.XGBoosterLoadModelFromBuffer(this.handle, bytes)); } @Override protected void finalize() throws Throwable { super.finalize(); dispose(); } public synchronized void dispose() { if (handle != 0L) { XGBoostJNI.XGBoosterFree(handle); handle = 0; } } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/DMatrix.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.util.Iterator; import ml.dmlc.xgboost4j.java.util.BigDenseMatrix; import ml.dmlc.xgboost4j.LabeledPoint; /** * DMatrix for xgboost. * * @author hzx */ public class DMatrix { protected long handle = 0; /** * sparse matrix type (CSR or CSC) */ public static enum SparseType { CSR, CSC; } /** * Create DMatrix from iterator. * * @param iter The data iterator of mini batch to provide the data. * @param cacheInfo Cache path information, used for external memory setting, can be null. * @throws XGBoostError */ public DMatrix(Iterator<LabeledPoint> iter, String cacheInfo) throws XGBoostError { if (iter == null) { throw new NullPointerException("iter: null"); } // 32k as batch size int batchSize = 32 << 10; Iterator<DataBatch> batchIter = new DataBatch.BatchIterator(iter, batchSize); long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromDataIter(batchIter, cacheInfo, out)); handle = out[0]; } /** * Create DMatrix by loading libsvm file from dataPath * * @param dataPath The path to the data. * @throws XGBoostError */ public DMatrix(String dataPath) throws XGBoostError { if (dataPath == null) { throw new NullPointerException("dataPath: null"); } long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromFile(dataPath, 1, out)); handle = out[0]; } /** * Create DMatrix from Sparse matrix in CSR/CSC format. * @param headers The row index of the matrix. * @param indices The indices of presenting entries. * @param data The data content. * @param st Type of sparsity. * @throws XGBoostError */ @Deprecated public DMatrix(long[] headers, int[] indices, float[] data, SparseType st) throws XGBoostError { long[] out = new long[1]; if (st == SparseType.CSR) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromCSREx(headers, indices, data, 0, out)); } else if (st == SparseType.CSC) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromCSCEx(headers, indices, data, 0, out)); } else { throw new UnknownError("unknow sparsetype"); } handle = out[0]; } /** * Create DMatrix from Sparse matrix in CSR/CSC format. * @param headers The row index of the matrix. * @param indices The indices of presenting entries. * @param data The data content. * @param st Type of sparsity. * @param shapeParam when st is CSR, it specifies the column number, otherwise it is taken as * row number * @throws XGBoostError */ public DMatrix(long[] headers, int[] indices, float[] data, SparseType st, int shapeParam) throws XGBoostError { long[] out = new long[1]; if (st == SparseType.CSR) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromCSREx(headers, indices, data, shapeParam, out)); } else if (st == SparseType.CSC) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromCSCEx(headers, indices, data, shapeParam, out)); } else { throw new UnknownError("unknow sparsetype"); } handle = out[0]; } /** * Create DMatrix from Sparse matrix in CSR/CSC format. * 2D arrays since underlying array can accomodate that many elements. * @param headers The row index of the matrix. * @param indices The indices of presenting entries. * @param data The data content. * @param st Type of sparsity. * @param ndata number of nonzero elements * @throws XGBoostError */ public DMatrix(long[][] headers, int[][] indices, float[][] data, SparseType st, int shapeParam2, long ndata) throws XGBoostError { long[] out = new long[1]; if (st == SparseType.CSR) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFrom2DCSREx(headers, indices, data, 0, shapeParam2, ndata, out)); } else if (st == SparseType.CSC) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFrom2DCSCEx(headers, indices, data, 0, shapeParam2, ndata, out)); } else { throw new UnknownError("unknow sparsetype"); } handle = out[0]; } /** * Create DMatrix from Sparse matrix in CSR/CSC format. * 2D arrays since underlying array can accomodate that many elements. * @param headers The row index of the matrix. * @param indices The indices of presenting entries. * @param data The data content. * @param st Type of sparsity. * @param shapeParam when st is CSR, it specifies the column number, otherwise it is taken as * row number * @param shapeParam2 when st is CSR, it specifies the row number, otherwise it is taken as * column number * @param ndata number of nonzero elements * @throws XGBoostError */ public DMatrix(long[][] headers, int[][] indices, float[][] data, SparseType st, int shapeParam, int shapeParam2, long ndata) throws XGBoostError { long[] out = new long[1]; if (st == SparseType.CSR) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFrom2DCSREx(headers, indices, data, shapeParam, shapeParam2, ndata, out)); } else if (st == SparseType.CSC) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFrom2DCSCEx(headers, indices, data, shapeParam, shapeParam2, ndata, out)); } else { throw new UnknownError("unknow sparsetype"); } handle = out[0]; } /** * create DMatrix from dense matrix * * @param data data values * @param nrow number of rows * @param ncol number of columns * @throws XGBoostError native error */ public DMatrix(float[] data, int nrow, int ncol) throws XGBoostError { long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromMat(data, nrow, ncol, 0.0f, out)); handle = out[0]; } /** * create DMatrix from a BigDenseMatrix * * @param matrix instance of BigDenseMatrix * @throws XGBoostError native error */ public DMatrix(BigDenseMatrix matrix) throws XGBoostError { this(matrix, 0.0f); } /** * create DMatrix from dense matrix * @param data data values * @param nrow number of rows * @param ncol number of columns * @param missing the specified value to represent the missing value */ public DMatrix(float[] data, int nrow, int ncol, float missing) throws XGBoostError { long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromMat(data, nrow, ncol, missing, out)); handle = out[0]; } /** * create DMatrix from dense matrix * @param matrix instance of BigDenseMatrix * @param missing the specified value to represent the missing value */ public DMatrix(BigDenseMatrix matrix, float missing) throws XGBoostError { long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromMatRef(matrix.address, matrix.nrow, matrix.ncol, missing, out)); handle = out[0]; } /** * create DMatrix from dense 2D matrix * * @param data data values * @param nrow number of rows * @param ncol number of columns * @throws XGBoostError native error */ public DMatrix(float[][] data, long nrow, int ncol) throws XGBoostError { long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFrom2DMat(data, nrow, ncol, 0.0f, out)); handle = out[0]; } /** * create DMatrix from dense 2D matrix * @param data data values * @param nrow number of rows * @param ncol number of columns * @param missing the specified value to represent the missing value */ public DMatrix(float[][] data, long nrow, int ncol, float missing) throws XGBoostError { long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFrom2DMat(data, nrow, ncol, missing, out)); handle = out[0]; } /** * used for DMatrix slice */ protected DMatrix(long handle) { this.handle = handle; } /** * set label of dmatrix * * @param labels labels * @throws XGBoostError native error */ public void setLabel(float[] labels) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetFloatInfo(handle, "label", labels)); } /** * set weight of each instance * * @param weights weights * @throws XGBoostError native error */ public void setWeight(float[] weights) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetFloatInfo(handle, "weight", weights)); } /** * Set base margin (initial prediction). * * The margin must have the same number of elements as the number of * rows in this matrix. */ public void setBaseMargin(float[] baseMargin) throws XGBoostError { if (baseMargin.length != rowNum()) { throw new IllegalArgumentException(String.format( "base margin must have exactly %s elements, got %s", rowNum(), baseMargin.length)); } XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetFloatInfo(handle, "base_margin", baseMargin)); } /** * Set base margin (initial prediction). */ public void setBaseMargin(float[][] baseMargin) throws XGBoostError { setBaseMargin(flatten(baseMargin)); } /** * Set group sizes of DMatrix (used for ranking) * * @param group group size as array * @throws XGBoostError native error */ public void setGroup(int[] group) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetGroup(handle, group)); } private float[] getFloatInfo(String field) throws XGBoostError { float[][] infos = new float[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixGetFloatInfo(handle, field, infos)); return infos[0]; } private int[] getIntInfo(String field) throws XGBoostError { int[][] infos = new int[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixGetUIntInfo(handle, field, infos)); return infos[0]; } /** * get label values * * @return label * @throws XGBoostError native error */ public float[] getLabel() throws XGBoostError { return getFloatInfo("label"); } /** * get weight of the DMatrix * * @return weights * @throws XGBoostError native error */ public float[] getWeight() throws XGBoostError { return getFloatInfo("weight"); } /** * Get base margin of the DMatrix. */ public float[] getBaseMargin() throws XGBoostError { return getFloatInfo("base_margin"); } /** * Slice the DMatrix and return a new DMatrix that only contains `rowIndex`. * * @param rowIndex row index * @return sliced new DMatrix * @throws XGBoostError native error */ public DMatrix slice(int[] rowIndex) throws XGBoostError { long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSliceDMatrix(handle, rowIndex, out)); long sHandle = out[0]; DMatrix sMatrix = new DMatrix(sHandle); return sMatrix; } /** * get the row number of DMatrix * * @return number of rows * @throws XGBoostError native error */ public long rowNum() throws XGBoostError { long[] rowNum = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixNumRow(handle, rowNum)); return rowNum[0]; } /** * save DMatrix to filePath */ public void saveBinary(String filePath) { XGBoostJNI.XGDMatrixSaveBinary(handle, filePath, 1); } /** * Get the handle */ public long getHandle() { return handle; } /** * flatten a mat to array */ private static float[] flatten(float[][] mat) { int size = 0; for (float[] array : mat) size += array.length; float[] result = new float[size]; int pos = 0; for (float[] ar : mat) { System.arraycopy(ar, 0, result, pos, ar.length); pos += ar.length; } return result; } @Override protected void finalize() { dispose(); } public synchronized void dispose() { if (handle != 0) { XGBoostJNI.XGDMatrixFree(handle); handle = 0; } } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/DataBatch.java
package ml.dmlc.xgboost4j.java; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import ml.dmlc.xgboost4j.LabeledPoint; /** * A mini-batch of data that can be converted to DMatrix. * The data is in sparse matrix CSR format. * * This class is used to support advanced creation of DMatrix from Iterator of DataBatch, */ class DataBatch { private static final Log logger = LogFactory.getLog(DataBatch.class); /** The offset of each rows in the sparse matrix */ final long[] rowOffset; /** weight of each data point, can be null */ final float[] weight; /** label of each data point, can be null */ final float[] label; /** index of each feature(column) in the sparse matrix */ final int[] featureIndex; /** value of each non-missing entry in the sparse matrix */ final float[] featureValue ; DataBatch(long[] rowOffset, float[] weight, float[] label, int[] featureIndex, float[] featureValue) { this.rowOffset = rowOffset; this.weight = weight; this.label = label; this.featureIndex = featureIndex; this.featureValue = featureValue; } static class BatchIterator implements Iterator<DataBatch> { private final Iterator<LabeledPoint> base; private final int batchSize; BatchIterator(Iterator<LabeledPoint> base, int batchSize) { this.base = base; this.batchSize = batchSize; } @Override public boolean hasNext() { return base.hasNext(); } @Override public DataBatch next() { try { int numRows = 0; int numElem = 0; List<LabeledPoint> batch = new ArrayList<>(batchSize); while (base.hasNext() && batch.size() < batchSize) { LabeledPoint labeledPoint = base.next(); batch.add(labeledPoint); numElem += labeledPoint.values().length; numRows++; } long[] rowOffset = new long[numRows + 1]; float[] label = new float[numRows]; int[] featureIndex = new int[numElem]; float[] featureValue = new float[numElem]; float[] weight = new float[numRows]; int offset = 0; for (int i = 0; i < batch.size(); i++) { LabeledPoint labeledPoint = batch.get(i); rowOffset[i] = offset; label[i] = labeledPoint.label(); weight[i] = labeledPoint.weight(); if (labeledPoint.indices() != null) { System.arraycopy(labeledPoint.indices(), 0, featureIndex, offset, labeledPoint.indices().length); } else { for (int j = 0; j < labeledPoint.values().length; j++) { featureIndex[offset + j] = j; } } System.arraycopy(labeledPoint.values(), 0, featureValue, offset, labeledPoint.values().length); offset += labeledPoint.values().length; } rowOffset[batch.size()] = offset; return new DataBatch(rowOffset, weight, label, featureIndex, featureValue); } catch (RuntimeException runtimeError) { logger.error(runtimeError); return null; } } @Override public void remove() { throw new UnsupportedOperationException("DataBatch.BatchIterator.remove"); } } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/IEvaluation.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.io.Serializable; /** * interface for customized evaluation * * @author hzx */ public interface IEvaluation extends Serializable { /** * get evaluate metric * * @return evalMetric */ String getMetric(); /** * evaluate with predicts and data * * @param predicts predictions as array * @param dmat data matrix to evaluate * @return result of the metric */ float eval(float[][] predicts, DMatrix dmat); }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/INativeLibLoader.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.io.IOException; public interface INativeLibLoader { String name(); int priority(); void loadNativeLibs() throws IOException; }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/IObjective.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.io.Serializable; import java.util.List; /** * interface for customize Object function * * @author hzx */ public interface IObjective extends Serializable { /** * user define objective function, return gradient and second order gradient * * @param predicts untransformed margin predicts * @param dtrain training data * @return List with two float array, correspond to first order grad and second order grad */ List<float[]> getGradient(float[][] predicts, DMatrix dtrain); }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/IRabitTracker.java
package ml.dmlc.xgboost4j.java; import java.util.Map; import java.util.concurrent.TimeUnit; /** * Interface for Rabit tracker implementations with three public methods: * * - start(timeout): Start the Rabit tracker awaiting for worker connections, with a given * timeout value (in milliseconds.) * - getWorkerEnvs(): Return the environment variables needed to initialize Rabit clients. * - waitFor(timeout): Wait for the task execution by the worker nodes for at most `timeout` * milliseconds. * * Each implementation is expected to implement a callback function * * public void uncaughtException(Threat t, Throwable e) { ... } * * to interrupt waitFor() in order to prevent the tracker from hanging indefinitely. * * The Rabit tracker handles connections from distributed workers, assigns ranks to workers, and * brokers connections between workers. */ public interface IRabitTracker extends Thread.UncaughtExceptionHandler { enum TrackerStatus { SUCCESS(0), INTERRUPTED(1), TIMEOUT(2), FAILURE(3); private int statusCode; TrackerStatus(int statusCode) { this.statusCode = statusCode; } public int getStatusCode() { return this.statusCode; } } Map<String, String> getWorkerEnvs(); boolean start(long workerConnectionTimeout); void stop(); // taskExecutionTimeout has no effect in current version of XGBoost. int waitFor(long taskExecutionTimeout); }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/KryoBooster.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.KryoSerializable; import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import java.util.Map; @SuppressWarnings("unused") public class KryoBooster extends Booster implements KryoSerializable { private static final Log logger = LogFactory.getLog(KryoBooster.class); KryoBooster(Map<String, Object> params, DMatrix[] cacheMats) throws XGBoostError { super(params, cacheMats, true); } KryoBooster() { super(true); } @Override public void write(Kryo kryo, Output output) { try { byte[] serObj = this.toByteArray(); int serObjSize = serObj.length; output.writeInt(serObjSize); output.writeInt(version); output.write(serObj); } catch (XGBoostError ex) { logger.error(ex.getMessage(), ex); throw new RuntimeException("Booster serialization failed", ex); } } @Override public void read(Kryo kryo, Input input) { try { this.init(null); int serObjSize = input.readInt(); this.version = input.readInt(); byte[] bytes = new byte[serObjSize]; input.readBytes(bytes); XGBoostJNI.checkCall(XGBoostJNI.XGBoosterLoadModelFromBuffer(this.handle, bytes)); } catch (XGBoostError ex) { logger.error(ex.getMessage(), ex); throw new RuntimeException("Booster deserialization failed", ex); } } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/NativeLibLoader.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.io.*; import java.lang.reflect.Field; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * class to load native library * * @author hzx */ public class NativeLibLoader { private static final Log logger = LogFactory.getLog(NativeLibLoader.class); private static boolean initialized = false; private static INativeLibLoader loader = null; private static final String nativePath = "../../lib/"; private static final String nativeResourcePath = "/lib/"; private static final String[] libNames = new String[]{"xgboost4j"}; public static synchronized void initXGBoost() throws IOException { if (!initialized) { // patch classloader class IOException nativeAddEx = null; try { addNativeDir(nativePath); // best effort, don't worry about outcome } catch (IOException e) { nativeAddEx = e; // will be logged later only if there is an actual issue with loading of the native library } // initialize the Loader NativeLibLoaderService loaderService = NativeLibLoaderService.getInstance(); loader = loaderService.createLoader(); // load the native libs try { loader.loadNativeLibs(); } catch (Exception e) { if (nativeAddEx != null) { logger.error("Failed to add native path to the classpath at runtime", nativeAddEx); } throw e; } initialized = true; } } public static synchronized INativeLibLoader getLoader() throws IOException { initXGBoost(); return loader; } public static class DefaultNativeLibLoader implements INativeLibLoader { @Override public String name() { return "DefaultNativeLibLoader"; } @Override public int priority() { return 0; } @Override public void loadNativeLibs() throws IOException { for (String libName : libNames) { try { String libraryFromJar = nativeResourcePath + System.mapLibraryName(libName); loadLibraryFromJar(libraryFromJar); } catch (IOException ioe) { logger.error("failed to load " + libName + " library from jar"); throw ioe; } } } } /** * Loads library from current JAR archive * <p/> * The file from JAR is copied into system temporary directory and then loaded. * The temporary file is deleted after exiting. * Method uses String as filename because the pathname is "abstract", not system-dependent. * <p/> * The restrictions of {@link File#createTempFile(java.lang.String, java.lang.String)} apply to * {@code path}. * * @param path The filename inside JAR as absolute path (beginning with '/'), * e.g. /package/File.ext * @throws IOException If temporary file creation or read/write operation fails * @throws IllegalArgumentException If source file (param path) does not exist * @throws IllegalArgumentException If the path is not absolute or if the filename is shorter than * three characters */ private static void loadLibraryFromJar(String path) throws IOException, IllegalArgumentException{ String temp = createTempFileFromResource(path); // Finally, load the library System.load(temp); } /** * Create a temp file that copies the resource from current JAR archive * <p/> * The file from JAR is copied into system temp file. * The temporary file is deleted after exiting. * Method uses String as filename because the pathname is "abstract", not system-dependent. * <p/> * The restrictions of {@link File#createTempFile(java.lang.String, java.lang.String)} apply to * {@code path}. * @param path Path to the resources in the jar * @return The created temp file. * @throws IOException * @throws IllegalArgumentException */ static String createTempFileFromResource(String path) throws IOException, IllegalArgumentException { // Obtain filename from path if (!path.startsWith("/")) { throw new IllegalArgumentException("The path has to be absolute (start with '/')."); } String[] parts = path.split("/"); String filename = (parts.length > 1) ? parts[parts.length - 1] : null; // Split filename to prexif and suffix (extension) String prefix = ""; String suffix = null; if (filename != null) { parts = filename.split("\\.", 2); prefix = parts[0]; suffix = (parts.length > 1) ? "." + parts[parts.length - 1] : null; // Thanks, davs! :-) } // Check if the filename is okay if (filename == null || prefix.length() < 3) { throw new IllegalArgumentException("The filename has to be at least 3 characters long."); } // Prepare temporary file File temp = File.createTempFile(prefix, suffix); temp.deleteOnExit(); if (!temp.exists()) { throw new FileNotFoundException("File " + temp.getAbsolutePath() + " does not exist."); } // Prepare buffer for data copying byte[] buffer = new byte[1024]; int readBytes; // Open and check input stream InputStream is = NativeLibLoader.class.getResourceAsStream(path); if (is == null) { throw new FileNotFoundException("File " + path + " was not found inside JAR."); } // Open output stream and copy data between source file in JAR and the temporary file OutputStream os = new FileOutputStream(temp); try { while ((readBytes = is.read(buffer)) != -1) { os.write(buffer, 0, readBytes); } } finally { // If read/write fails, close streams safely before throwing an exception os.close(); is.close(); } return temp.getAbsolutePath(); } /** * load native library, this method will first try to load library from java.library.path, then * try to load library in jar package. * * @param libName library path * @throws IOException exception */ private static void smartLoad(String libName) throws IOException { try { System.loadLibrary(libName); } catch (UnsatisfiedLinkError e) { try { String libraryFromJar = nativeResourcePath + System.mapLibraryName(libName); loadLibraryFromJar(libraryFromJar); } catch (IOException ioe) { logger.error("failed to load library from both native path and jar"); throw ioe; } } } /** * Add libPath to java.library.path, then native library in libPath would be load properly * * @param libPath library path * @throws IOException exception */ private static void addNativeDir(String libPath) throws IOException { try { Field field = ClassLoader.class.getDeclaredField("usr_paths"); field.setAccessible(true); String[] paths = (String[]) field.get(null); for (String path : paths) { if (libPath.equals(path)) { return; } } String[] tmp = new String[paths.length + 1]; System.arraycopy(paths, 0, tmp, 0, paths.length); tmp[paths.length] = libPath; field.set(null, tmp); } catch (IllegalAccessException e) { throw new IOException("Failed to get permissions to set library path"); } catch (NoSuchFieldException e) { throw new IOException("Failed to get field handle to set library path"); } } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/NativeLibLoaderService.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.util.ServiceLoader; class NativeLibLoaderService { private static final String LOADER_NAME = System.getProperty("sys.xgboost.jni.loader"); private static NativeLibLoaderService service; private ServiceLoader<INativeLibLoader> serviceLoader; private NativeLibLoaderService() { serviceLoader = ServiceLoader.load(INativeLibLoader.class); } static synchronized NativeLibLoaderService getInstance() { if (service == null) { service = new NativeLibLoaderService(); } return service; } INativeLibLoader createLoader() { if (LOADER_NAME != null) { return findLoaderByName(LOADER_NAME); } else { return findLoaderByPriority(); } } private INativeLibLoader findLoaderByName(String name) { for (INativeLibLoader nlLoader: serviceLoader) { if (name.equals(nlLoader.name())) { return nlLoader; } } throw new IllegalStateException( "Unable to find specified Native Lib Loader (name=" + name + ")."); } private INativeLibLoader findLoaderByPriority() { INativeLibLoader selectedLoader = null; int maxPriority = Integer.MIN_VALUE; for (INativeLibLoader nlLoader : serviceLoader) { int priority = nlLoader.priority(); if (priority > maxPriority) { selectedLoader = nlLoader; maxPriority = priority; } } if (selectedLoader == null) { throw new IllegalStateException("Unable to find any Native Lib Loaders."); } return selectedLoader; } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/Rabit.java
package ml.dmlc.xgboost4j.java; import java.io.Serializable; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.Map; /** * Rabit global class for synchronization. */ public class Rabit { public enum OpType implements Serializable { MAX(0), MIN(1), SUM(2), BITWISE_OR(3); private int op; public int getOperand() { return this.op; } OpType(int op) { this.op = op; } } public enum DataType implements Serializable { CHAR(0, 1), UCHAR(1, 1), INT(2, 4), UNIT(3, 4), LONG(4, 8), ULONG(5, 8), FLOAT(6, 4), DOUBLE(7, 8), LONGLONG(8, 8), ULONGLONG(9, 8); private int enumOp; private int size; public int getEnumOp() { return this.enumOp; } public int getSize() { return this.size; } DataType(int enumOp, int size) { this.enumOp = enumOp; this.size = size; } } private static void checkCall(int ret) throws XGBoostError { if (ret != 0) { throw new XGBoostError(XGBoostJNI.XGBGetLastError()); } } /** * Initialize the rabit library on current working thread. * @param envs The additional environment variables to pass to rabit. * @throws XGBoostError */ public static void init(Map<String, String> envs) throws XGBoostError { String[] args = new String[envs.size()]; int idx = 0; for (java.util.Map.Entry<String, String> e : envs.entrySet()) { args[idx++] = e.getKey() + '=' + e.getValue(); } checkCall(XGBoostJNI.RabitInit(args)); } /** * Shutdown the rabit engine in current working thread, equals to finalize. * @throws XGBoostError */ public static void shutdown() throws XGBoostError { checkCall(XGBoostJNI.RabitFinalize()); } /** * Print the message on rabit tracker. * @param msg * @throws XGBoostError */ public static void trackerPrint(String msg) throws XGBoostError { checkCall(XGBoostJNI.RabitTrackerPrint(msg)); } /** * Get version number of current stored model in the thread. * which means how many calls to CheckPoint we made so far. * @return version Number. * @throws XGBoostError */ public static int versionNumber() throws XGBoostError { int[] out = new int[1]; checkCall(XGBoostJNI.RabitVersionNumber(out)); return out[0]; } /** * get rank of current thread. * @return the rank. * @throws XGBoostError */ public static int getRank() throws XGBoostError { int[] out = new int[1]; checkCall(XGBoostJNI.RabitGetRank(out)); return out[0]; } /** * get world size of current job. * @return the worldsize * @throws XGBoostError */ public static int getWorldSize() throws XGBoostError { int[] out = new int[1]; checkCall(XGBoostJNI.RabitGetWorldSize(out)); return out[0]; } /** * perform Allreduce on distributed float vectors using operator op. * This implementation of allReduce does not support customized prepare function callback in the * native code, as this function is meant for testing purposes only (to test the Rabit tracker.) * * @param elements local elements on distributed workers. * @param op operator used for Allreduce. * @return All-reduced float elements according to the given operator. */ public static float[] allReduce(float[] elements, OpType op) { DataType dataType = DataType.FLOAT; ByteBuffer buffer = ByteBuffer.allocateDirect(dataType.getSize() * elements.length) .order(ByteOrder.nativeOrder()); for (float el : elements) { buffer.putFloat(el); } buffer.flip(); XGBoostJNI.RabitAllreduce(buffer, elements.length, dataType.getEnumOp(), op.getOperand()); float[] results = new float[elements.length]; buffer.asFloatBuffer().get(results); return results; } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/RabitTracker.java
package ml.dmlc.xgboost4j.java; import java.io.*; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Java implementation of the Rabit tracker to coordinate distributed workers. * As a wrapper of the Python Rabit tracker, this implementation does not handle timeout for both * start() and waitFor() methods (i.e., the timeout is infinite.) * * For systems lacking Python environment, or for timeout functionality, consider using the Scala * Rabit tracker (ml.dmlc.xgboost4j.scala.rabit.RabitTracker) which does not depend on Python, and * provides timeout support. * * The tracker must be started on driver node before running distributed jobs. */ public class RabitTracker implements IRabitTracker { // Maybe per tracker logger? private static final Log logger = LogFactory.getLog(RabitTracker.class); // tracker python file. private static String tracker_py = null; private static TrackerProperties trackerProperties = TrackerProperties.getInstance(); // environment variable to be pased. private Map<String, String> envs = new HashMap<String, String>(); // number of workers to be submitted. private int numWorkers; private AtomicReference<Process> trackerProcess = new AtomicReference<Process>(); static { try { initTrackerPy(); } catch (IOException ex) { logger.error("load tracker library failed."); logger.error(ex); } } /** * Tracker logger that logs output from tracker. */ private class TrackerProcessLogger implements Runnable { public void run() { Log trackerProcessLogger = LogFactory.getLog(TrackerProcessLogger.class); BufferedReader reader = new BufferedReader(new InputStreamReader( trackerProcess.get().getErrorStream())); String line; try { while ((line = reader.readLine()) != null) { trackerProcessLogger.info(line); } trackerProcess.get().waitFor(); trackerProcessLogger.info("Tracker Process ends with exit code " + trackerProcess.get().exitValue()); } catch (IOException ex) { trackerProcessLogger.error(ex.toString()); } catch (InterruptedException ie) { // we should not get here as RabitTracker is accessed in the main thread ie.printStackTrace(); logger.error("the RabitTracker thread is terminated unexpectedly"); } } } private static void initTrackerPy() throws IOException { try { tracker_py = NativeLibLoader.createTempFileFromResource("/tracker.py"); } catch (IOException ioe) { logger.trace("cannot access tracker python script"); throw ioe; } } public RabitTracker(int numWorkers) throws XGBoostError { if (numWorkers < 1) { throw new XGBoostError("numWorkers must be greater equal to one"); } this.numWorkers = numWorkers; } public void uncaughtException(Thread t, Throwable e) { logger.error("Uncaught exception thrown by worker:", e); try { Thread.sleep(5000L); } catch (InterruptedException ex) { logger.error(ex); } finally { trackerProcess.get().destroy(); } } /** * Get environments that can be used to pass to worker. * @return The environment settings. */ public Map<String, String> getWorkerEnvs() { return envs; } private void loadEnvs(InputStream ins) throws IOException { try { BufferedReader reader = new BufferedReader(new InputStreamReader(ins)); assert reader.readLine().trim().equals("DMLC_TRACKER_ENV_START"); String line; while ((line = reader.readLine()) != null) { if (line.trim().equals("DMLC_TRACKER_ENV_END")) { break; } String[] sep = line.split("="); if (sep.length == 2) { envs.put(sep[0], sep[1]); } } reader.close(); } catch (IOException ioe){ logger.error("cannot get runtime configuration from tracker process"); ioe.printStackTrace(); throw ioe; } } private boolean startTrackerProcess() { try { String trackerExecString = this.addTrackerProperties("python " + tracker_py + " --log-level=DEBUG --num-workers=" + String.valueOf(numWorkers)); trackerProcess.set(Runtime.getRuntime().exec(trackerExecString)); loadEnvs(trackerProcess.get().getInputStream()); return true; } catch (IOException ioe) { ioe.printStackTrace(); return false; } } private String addTrackerProperties(String trackerExecString) { StringBuilder sb = new StringBuilder(trackerExecString); String hostIp = trackerProperties.getHostIp(); if(hostIp != null && !hostIp.isEmpty()){ logger.debug("Using provided host-ip: " + hostIp); sb.append(" --host-ip=").append(hostIp); } return sb.toString(); } public void stop() { if (trackerProcess.get() != null) { trackerProcess.get().destroy(); } } public boolean start(long timeout) { if (timeout > 0L) { logger.warn("Python RabitTracker does not support timeout. " + "The tracker will wait for all workers to connect indefinitely, unless " + "it is interrupted manually. Use the Scala RabitTracker for timeout support."); } if (startTrackerProcess()) { logger.debug("Tracker started, with env=" + envs.toString()); System.out.println("Tracker started, with env=" + envs.toString()); // also start a tracker logger Thread logger_thread = new Thread(new TrackerProcessLogger()); logger_thread.setDaemon(true); logger_thread.start(); return true; } else { logger.error("FAULT: failed to start tracker process"); stop(); return false; } } public int waitFor(long timeout) { if (timeout > 0L) { logger.warn("Python RabitTracker does not support timeout. " + "The tracker will wait for either all workers to finish tasks and send " + "shutdown signal, or manual interruptions. " + "Use the Scala RabitTracker for timeout support."); } try { trackerProcess.get().waitFor(); int returnVal = trackerProcess.get().exitValue(); logger.info("Tracker Process ends with exit code " + returnVal); stop(); return returnVal; } catch (InterruptedException e) { // we should not get here as RabitTracker is accessed in the main thread e.printStackTrace(); logger.error("the RabitTracker thread is terminated unexpectedly"); return TrackerStatus.INTERRUPTED.getStatusCode(); } } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/TrackerProperties.java
package ml.dmlc.xgboost4j.java; import java.io.*; import java.net.URL; import java.util.Properties; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class TrackerProperties { private static String PROPERTIES_FILENAME = "xgboost-tracker.properties"; private static String HOST_IP = "host-ip"; private static final Log logger = LogFactory.getLog(TrackerProperties.class); private static TrackerProperties instance = new TrackerProperties(); private Properties properties; private TrackerProperties() { this.properties = new Properties(); InputStream inputStream = null; try { URL propertiesFileURL = Thread.currentThread().getContextClassLoader().getResource(PROPERTIES_FILENAME); if (propertiesFileURL != null){ inputStream = propertiesFileURL.openStream(); } } catch (IOException e) { logger.warn("Could not load " + PROPERTIES_FILENAME + " file. ", e); } if(inputStream != null){ try { properties.load(inputStream); logger.debug("Loaded properties from external source"); } catch (IOException e) { logger.error("Error loading tracker properties file. Skipping and using defaults. ", e); } try { inputStream.close(); } catch (IOException e) { // ignore exception } } } public static TrackerProperties getInstance() { return instance; } public String getHostIp(){ return this.properties.getProperty(HOST_IP); } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/XGBoost.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.io.IOException; import java.io.InputStream; import java.util.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * trainer for xgboost * * @author hzx */ public class XGBoost { private static final Log logger = LogFactory.getLog(XGBoost.class); /** * load model from modelPath * * @param modelPath booster modelPath (model generated by booster.saveModel) * @throws XGBoostError native error */ public static Booster loadModel(String modelPath) throws XGBoostError { return Booster.loadModel(modelPath); } /** * Load a new Booster model from a file opened as input stream. * The assumption is the input stream only contains one XGBoost Model. * This can be used to load existing booster models saved by other xgboost bindings. * * @param in The input stream of the file, * will be closed after this function call. * @return The create boosted * @throws XGBoostError * @throws IOException */ public static Booster loadModel(InputStream in) throws XGBoostError, IOException { return Booster.loadModel(in); } /** * Train a booster given parameters. * * @param dtrain Data to be trained. * @param params Parameters. * @param round Number of boosting iterations. * @param watches a group of items to be evaluated during training, this allows user to watch * performance on the validation set. * @param obj customized objective * @param eval customized evaluation * @return The trained booster. */ public static Booster train( DMatrix dtrain, Map<String, Object> params, int round, Map<String, DMatrix> watches, IObjective obj, IEvaluation eval) throws XGBoostError { return train(dtrain, params, round, watches, null, obj, eval, 0); } /** * Train a booster given parameters. * * @param dtrain Data to be trained. * @param params Parameters. * @param round Number of boosting iterations. * @param watches a group of items to be evaluated during training, this allows user to watch * performance on the validation set. * @param metrics array containing the evaluation metrics for each matrix in watches for each * iteration * @param earlyStoppingRound if non-zero, training would be stopped * after a specified number of consecutive * increases in any evaluation metric. * @param obj customized objective * @param eval customized evaluation * @return The trained booster. */ public static Booster train( DMatrix dtrain, Map<String, Object> params, int round, Map<String, DMatrix> watches, float[][] metrics, IObjective obj, IEvaluation eval, int earlyStoppingRound) throws XGBoostError { return train(dtrain, params, round, watches, metrics, obj, eval, earlyStoppingRound, null); } /** * Train a booster given parameters. * * @param dtrain Data to be trained. * @param params Parameters. * @param round Number of boosting iterations. * @param watches a group of items to be evaluated during training, this allows user to watch * performance on the validation set. * @param metrics array containing the evaluation metrics for each matrix in watches for each * iteration * @param earlyStoppingRounds if non-zero, training would be stopped * after a specified number of consecutive * goes to the unexpected direction in any evaluation metric. * @param obj customized objective * @param eval customized evaluation * @param booster train from scratch if set to null; train from an existing booster if not null. * @return The trained booster. */ public static Booster train( DMatrix dtrain, Map<String, Object> params, int round, Map<String, DMatrix> watches, float[][] metrics, IObjective obj, IEvaluation eval, int earlyStoppingRounds, Booster booster) throws XGBoostError { //collect eval matrixs String[] evalNames; DMatrix[] evalMats; float bestScore; int bestIteration; List<String> names = new ArrayList<String>(); List<DMatrix> mats = new ArrayList<DMatrix>(); for (Map.Entry<String, DMatrix> evalEntry : watches.entrySet()) { names.add(evalEntry.getKey()); mats.add(evalEntry.getValue()); } evalNames = names.toArray(new String[names.size()]); evalMats = mats.toArray(new DMatrix[mats.size()]); if (isMaximizeEvaluation(params)) { bestScore = -Float.MAX_VALUE; } else { bestScore = Float.MAX_VALUE; } bestIteration = 0; metrics = metrics == null ? new float[evalNames.length][round] : metrics; //collect all data matrixs DMatrix[] allMats; if (evalMats.length > 0) { allMats = new DMatrix[evalMats.length + 1]; allMats[0] = dtrain; System.arraycopy(evalMats, 0, allMats, 1, evalMats.length); } else { allMats = new DMatrix[1]; allMats[0] = dtrain; } //initialize booster if (booster == null) { // Start training on a new booster booster = Booster.newBooster(params, allMats); booster.loadRabitCheckpoint(); } else { // Start training on an existing booster booster.setParams(params); } //begin to train for (int iter = booster.getVersion() / 2; iter < round; iter++) { if (booster.getVersion() % 2 == 0) { if (obj != null) { booster.update(dtrain, obj); } else { booster.update(dtrain, iter); } booster.saveRabitCheckpoint(); } //evaluation if (evalMats.length > 0) { float[] metricsOut = new float[evalMats.length]; String evalInfo; if (eval != null) { evalInfo = booster.evalSet(evalMats, evalNames, eval, metricsOut); } else { evalInfo = booster.evalSet(evalMats, evalNames, iter, metricsOut); } for (int i = 0; i < metricsOut.length; i++) { metrics[i][iter] = metricsOut[i]; } // If there is more than one evaluation datasets, the last one would be used // to determinate early stop. float score = metricsOut[metricsOut.length - 1]; if (isMaximizeEvaluation(params)) { // Update best score if the current score is better (no update when equal) if (score > bestScore) { bestScore = score; bestIteration = iter; } } else { if (score < bestScore) { bestScore = score; bestIteration = iter; } } if (earlyStoppingRounds > 0) { if (shouldEarlyStop(earlyStoppingRounds, iter, bestIteration)) { Rabit.trackerPrint(String.format( "early stopping after %d rounds away from the best iteration", earlyStoppingRounds)); break; } } if (Rabit.getRank() == 0 && shouldPrint(params, iter)) { if (shouldPrint(params, iter)){ Rabit.trackerPrint(evalInfo + '\n'); } } } booster.saveRabitCheckpoint(); } return booster; } private static Integer tryGetIntFromObject(Object o) { if (o instanceof Integer) { return (int)o; } else if (o instanceof String) { try { return Integer.parseInt((String)o); } catch (NumberFormatException e) { return null; } } else { return null; } } private static boolean shouldPrint(Map<String, Object> params, int iter) { Object silent = params.get("silent"); Integer silentInt = tryGetIntFromObject(silent); if (silent != null) { if (silent.equals("true") || silent.equals("True") || (silentInt != null && silentInt != 0)) { return false; // "silent" will stop printing, otherwise go look at "verbose_eval" } } Object verboseEval = params.get("verbose_eval"); Integer verboseEvalInt = tryGetIntFromObject(verboseEval); if (verboseEval == null) { return true; // Default to printing evalInfo } else if (verboseEval.equals("false") || verboseEval.equals("False")) { return false; } else if (verboseEvalInt != null) { if (verboseEvalInt == 0) { return false; } else { return iter % verboseEvalInt == 0; } } else { return true; // Don't understand the option, default to printing } } static boolean shouldEarlyStop(int earlyStoppingRounds, int iter, int bestIteration) { return iter - bestIteration >= earlyStoppingRounds; } private static boolean isMaximizeEvaluation(Map<String, Object> params) { try { String maximize = String.valueOf(params.get("maximize_evaluation_metrics")); assert(maximize != null); return Boolean.valueOf(maximize); } catch (Exception ex) { logger.error("maximize_evaluation_metrics has to be specified for enabling early stop," + " allowed value: true/false", ex); throw ex; } } /** * Cross-validation with given parameters. * * @param data Data to be trained. * @param params Booster params. * @param round Number of boosting iterations. * @param nfold Number of folds in CV. * @param metrics Evaluation metrics to be watched in CV. * @param obj customized objective (set to null if not used) * @param eval customized evaluation (set to null if not used) * @return evaluation history * @throws XGBoostError native error */ public static String[] crossValidation( DMatrix data, Map<String, Object> params, int round, int nfold, String[] metrics, IObjective obj, IEvaluation eval) throws XGBoostError { CVPack[] cvPacks = makeNFold(data, nfold, params, metrics); String[] evalHist = new String[round]; String[] results = new String[cvPacks.length]; for (int i = 0; i < round; i++) { for (CVPack cvPack : cvPacks) { if (obj != null) { cvPack.update(obj); } else { cvPack.update(i); } } for (int j = 0; j < cvPacks.length; j++) { if (eval != null) { results[j] = cvPacks[j].eval(eval); } else { results[j] = cvPacks[j].eval(i); } } evalHist[i] = aggCVResults(results); logger.info(evalHist[i]); } return evalHist; } /** * make an n-fold array of CVPack from random indices * * @param data original data * @param nfold num of folds * @param params booster parameters * @param evalMetrics Evaluation metrics * @return CV package array * @throws XGBoostError native error */ private static CVPack[] makeNFold(DMatrix data, int nfold, Map<String, Object> params, String[] evalMetrics) throws XGBoostError { List<Integer> samples = genRandPermutationNums(0, (int) data.rowNum()); int step = samples.size() / nfold; int[] testSlice = new int[step]; int[] trainSlice = new int[samples.size() - step]; int testid, trainid; CVPack[] cvPacks = new CVPack[nfold]; for (int i = 0; i < nfold; i++) { testid = 0; trainid = 0; for (int j = 0; j < samples.size(); j++) { if (j > (i * step) && j < (i * step + step) && testid < step) { testSlice[testid] = samples.get(j); testid++; } else { if (trainid < samples.size() - step) { trainSlice[trainid] = samples.get(j); trainid++; } else { testSlice[testid] = samples.get(j); testid++; } } } DMatrix dtrain = data.slice(trainSlice); DMatrix dtest = data.slice(testSlice); CVPack cvPack = new CVPack(dtrain, dtest, params); //set eval types if (evalMetrics != null) { for (String type : evalMetrics) { cvPack.booster.setParam("eval_metric", type); } } cvPacks[i] = cvPack; } return cvPacks; } private static List<Integer> genRandPermutationNums(int start, int end) { List<Integer> samples = new ArrayList<Integer>(); for (int i = start; i < end; i++) { samples.add(i); } Collections.shuffle(samples); return samples; } /** * Aggregate cross-validation results. * * @param results eval info from each data sample * @return cross-validation eval info */ private static String aggCVResults(String[] results) { Map<String, List<Float>> cvMap = new HashMap<String, List<Float>>(); String aggResult = results[0].split("\t")[0]; for (String result : results) { String[] items = result.split("\t"); for (int i = 1; i < items.length; i++) { String[] tup = items[i].split(":"); String key = tup[0]; Float value = Float.valueOf(tup[1]); if (!cvMap.containsKey(key)) { cvMap.put(key, new ArrayList<Float>()); } cvMap.get(key).add(value); } } for (String key : cvMap.keySet()) { float value = 0f; for (Float tvalue : cvMap.get(key)) { value += tvalue; } value /= cvMap.get(key).size(); aggResult += String.format("\tcv-%s:%f", key, value); } return aggResult; } /** * cross validation package for xgb * * @author hzx */ private static class CVPack { DMatrix dtrain; DMatrix dtest; DMatrix[] dmats; String[] names; Booster booster; /** * create an cross validation package * * @param dtrain train data * @param dtest test data * @param params parameters * @throws XGBoostError native error */ public CVPack(DMatrix dtrain, DMatrix dtest, Map<String, Object> params) throws XGBoostError { dmats = new DMatrix[]{dtrain, dtest}; booster = Booster.newBooster(params, dmats); names = new String[]{"train", "test"}; this.dtrain = dtrain; this.dtest = dtest; } /** * update one iteration * * @param iter iteration num * @throws XGBoostError native error */ public void update(int iter) throws XGBoostError { booster.update(dtrain, iter); } /** * update one iteration * * @param obj customized objective * @throws XGBoostError native error */ public void update(IObjective obj) throws XGBoostError { booster.update(dtrain, obj); } /** * evaluation * * @param iter iteration num * @return evaluation * @throws XGBoostError native error */ public String eval(int iter) throws XGBoostError { return booster.evalSet(dmats, names, iter); } /** * evaluation * * @param eval customized eval * @return evaluation * @throws XGBoostError native error */ public String eval(IEvaluation eval) throws XGBoostError { return booster.evalSet(dmats, names, eval); } } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/XGBoostError.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; /** * custom error class for xgboost * * @author hzx */ public class XGBoostError extends Exception { public XGBoostError(String message) { super(message); } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/XGBoostJNI.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.nio.ByteBuffer; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * xgboost JNI functions * change 2015-7-6: *use a long[] (length=1) as container of handle to get the output DMatrix or Booster * * @author hzx */ class XGBoostJNI { private static final Log logger = LogFactory.getLog(DMatrix.class); static { try { NativeLibLoader.initXGBoost(); } catch (Exception ex) { logger.error("Failed to load native library", ex); throw new RuntimeException(ex); } } /** * Check the return code of the JNI call. * * @throws XGBoostError if the call failed. */ static void checkCall(int ret) throws XGBoostError { if (ret != 0) { throw new XGBoostError(XGBGetLastError()); } } public final static native String XGBGetLastError(); public final static native int XGDMatrixCreateFromFile(String fname, int silent, long[] out); final static native int XGDMatrixCreateFromDataIter(java.util.Iterator<DataBatch> iter, String cache_info, long[] out); public final static native int XGDMatrixCreateFromCSREx(long[] indptr, int[] indices, float[] data, int shapeParam, long[] out); public final static native int XGDMatrixCreateFrom2DCSREx(long[][] indptr, int[][] indices, float[][] data, int shapeParam, int shapeParam2, long ndata, long[] out); public final static native int XGDMatrixCreateFromCSCEx(long[] colptr, int[] indices, float[] data, int shapeParam, long[] out); public final static native int XGDMatrixCreateFrom2DCSCEx(long[][] colptr, int[][] indices, float[][] data, int shapeParam, int shapeParam2, long ndata, long[] out); public final static native int XGDMatrixCreateFromMat(float[] data, int nrow, int ncol, float missing, long[] out); public final static native int XGDMatrixCreateFromMatRef(long dataRef, int nrow, int ncol, float missing, long[] out); public final static native int XGDMatrixCreateFrom2DMat(float[][] data, long nrow, int ncol, float missing, long[] out); public final static native int XGDMatrixSliceDMatrix(long handle, int[] idxset, long[] out); public final static native int XGDMatrixFree(long handle); public final static native int XGDMatrixSaveBinary(long handle, String fname, int silent); public final static native int XGDMatrixSetFloatInfo(long handle, String field, float[] array); public final static native int XGDMatrixSetUIntInfo(long handle, String field, int[] array); public final static native int XGDMatrixSetGroup(long handle, int[] group); public final static native int XGDMatrixGetFloatInfo(long handle, String field, float[][] info); public final static native int XGDMatrixGetUIntInfo(long handle, String filed, int[][] info); public final static native int XGDMatrixNumRow(long handle, long[] row); public final static native int XGBoosterCreate(long[] handles, long[] out); public final static native int XGBoosterFree(long handle); public final static native int XGBoosterSetParam(long handle, String name, String value); public final static native int XGBoosterUpdateOneIter(long handle, int iter, long dtrain); public final static native int XGBoosterBoostOneIter(long handle, long dtrain, float[] grad, float[] hess); public final static native int XGBoosterEvalOneIter(long handle, int iter, long[] dmats, String[] evnames, String[] eval_info); public final static native int XGBoosterPredict(long handle, long dmat, int option_mask, int ntree_limit, float[][] predicts); public final static native int XGBoosterLoadModel(long handle, String fname); public final static native int XGBoosterSaveModel(long handle, String fname); public final static native int XGBoosterLoadModelFromBuffer(long handle, byte[] bytes); public final static native int XGBoosterGetModelRaw(long handle, byte[][] out_bytes); public final static native int XGBoosterDumpModelEx(long handle, String fmap, int with_stats, String format, String[][] out_strings); public final static native int XGBoosterDumpModelExWithFeatures( long handle, String[] feature_names, int with_stats, String format, String[][] out_strings); public final static native int XGBoosterGetAttrNames(long handle, String[][] out_strings); public final static native int XGBoosterGetAttr(long handle, String key, String[] out_string); public final static native int XGBoosterSetAttr(long handle, String key, String value); public final static native int XGBoosterLoadRabitCheckpoint(long handle, int[] out_version); public final static native int XGBoosterSaveRabitCheckpoint(long handle); // rabit functions public final static native int RabitInit(String[] args); public final static native int RabitFinalize(); public final static native int RabitTrackerPrint(String msg); public final static native int RabitGetRank(int[] out); public final static native int RabitGetWorldSize(int[] out); public final static native int RabitVersionNumber(int[] out); // Perform Allreduce operation on data in sendrecvbuf. // This JNI function does not support the callback function for data preparation yet. final static native int RabitAllreduce(ByteBuffer sendrecvbuf, int count, int enum_dtype, int enum_op); }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/util/BigDenseMatrix.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java.util; /** * Off-heap implementation of a Dense Matrix, matrix size is only limited by the amount of the available memory and * the matrix dimension cannot exceed Integer.MAX_VALUE (this is consistent with XGBoost API restrictions on maximum * length of a response). */ public final class BigDenseMatrix { private final static int FLOAT_BYTE_SIZE = 4; public static final long MAX_MATRIX_SIZE = Long.MAX_VALUE / FLOAT_BYTE_SIZE; public final int nrow; public final int ncol; public final long address; public BigDenseMatrix(int nrow, int ncol) { final long size = (long) nrow * ncol; if (size > MAX_MATRIX_SIZE) throw new IllegalArgumentException("Matrix too large; matrix size cannot exceed " + MAX_MATRIX_SIZE); this.nrow = nrow; this.ncol = ncol; this.address = UtilUnsafe.UNSAFE.allocateMemory(size * FLOAT_BYTE_SIZE); } public static void setDirect(long valAddress, float val) { UtilUnsafe.UNSAFE.putFloat(valAddress, val); } public final void set(long idx, float val) { setDirect(address + idx * FLOAT_BYTE_SIZE, val); } public final void set(int i, int j, float val) { set(index(i, j), val); } public static float getDirect(long valAddress) { return UtilUnsafe.UNSAFE.getFloat(valAddress); } public final float get(long idx) { return getDirect(address + idx * FLOAT_BYTE_SIZE); } public final float get(int i, int j) { return get(index(i, j)); } public final void dispose() { UtilUnsafe.UNSAFE.freeMemory(address); } private long index(int i, int j) { return (long) i * ncol + j; } }
0
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java
java-sources/ai/h2o/xgboost4j/0.90.6/ml/dmlc/xgboost4j/java/util/UtilUnsafe.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java.util; import sun.misc.Unsafe; import java.lang.reflect.Field; /** * Simple class to obtain access to the {@link Unsafe} object. Use responsibly :) */ public final class UtilUnsafe { static Unsafe UNSAFE = getUnsafe(); private UtilUnsafe() { } // dummy private constructor private static Unsafe getUnsafe() { // Not on bootclasspath if( UtilUnsafe.class.getClassLoader() == null ) return Unsafe.getUnsafe(); try { final Field fld = Unsafe.class.getDeclaredField("theUnsafe"); fld.setAccessible(true); return (Unsafe) fld.get(UtilUnsafe.class); } catch (Exception e) { throw new RuntimeException("Could not obtain access to sun.misc.Unsafe", e); } } }
0
java-sources/ai/h2o/xgboost4j-linux-gpuv3/0.83.17/ai
java-sources/ai/h2o/xgboost4j-linux-gpuv3/0.83.17/ai/h2o/App.java
package ai.h2o; public class App { public static final String VERSION = "0.83.17"; public static final String BACKEND = "gpuv3"; public static final String OS = "linux"; public static void main(String[] args) { System.out.println(String.format("XGBoost Library Details:\n\tVersion: %s\n\tBackend: %s\n\tOS: %s", VERSION, BACKEND, OS)); } }
0
java-sources/ai/h2o/xgboost4j-linux-gpuv4/1.6.1.24/ai
java-sources/ai/h2o/xgboost4j-linux-gpuv4/1.6.1.24/ai/h2o/App.java
package ai.h2o; public class App { public static final String VERSION = "1.6.1.24"; public static final String BACKEND = "gpuv4"; public static final String OS = "linux"; public static void main(String[] args) { System.out.println(String.format("XGBoost Library Details:\n\tVersion: %s\n\tBackend: %s\n\tOS: %s", VERSION, BACKEND, OS)); } }
0
java-sources/ai/h2o/xgboost4j-linux-minimal/1.6.1.24/ai
java-sources/ai/h2o/xgboost4j-linux-minimal/1.6.1.24/ai/h2o/App.java
package ai.h2o; public class App { public static final String VERSION = "1.6.1.24"; public static final String BACKEND = "minimal"; public static final String OS = "linux"; public static void main(String[] args) { System.out.println(String.format("XGBoost Library Details:\n\tVersion: %s\n\tBackend: %s\n\tOS: %s", VERSION, BACKEND, OS)); } }
0
java-sources/ai/h2o/xgboost4j-linux-ompv3/0.83.17/ai
java-sources/ai/h2o/xgboost4j-linux-ompv3/0.83.17/ai/h2o/App.java
package ai.h2o; public class App { public static final String VERSION = "0.83.17"; public static final String BACKEND = "ompv3"; public static final String OS = "linux"; public static void main(String[] args) { System.out.println(String.format("XGBoost Library Details:\n\tVersion: %s\n\tBackend: %s\n\tOS: %s", VERSION, BACKEND, OS)); } }
0
java-sources/ai/h2o/xgboost4j-linux-ompv4/1.6.1.24/ai
java-sources/ai/h2o/xgboost4j-linux-ompv4/1.6.1.24/ai/h2o/App.java
package ai.h2o; public class App { public static final String VERSION = "1.6.1.24"; public static final String BACKEND = "ompv4"; public static final String OS = "linux"; public static void main(String[] args) { System.out.println(String.format("XGBoost Library Details:\n\tVersion: %s\n\tBackend: %s\n\tOS: %s", VERSION, BACKEND, OS)); } }
0
java-sources/ai/h2o/xgboost4j-osx-minimal/1.6.1.24/ai
java-sources/ai/h2o/xgboost4j-osx-minimal/1.6.1.24/ai/h2o/App.java
package ai.h2o; public class App { public static final String VERSION = "1.2.0-SNAPSHOT"; public static final String BACKEND = "minimal"; public static final String OS = "osx"; public static void main(String[] args) { System.out.println(String.format("XGBoost Library Details:\n\tVersion: %s\n\tBackend: %s\n\tOS: %s", VERSION, BACKEND, OS)); } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/Booster.java
/* Copyright (c) 2014-2022 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.io.*; import java.lang.reflect.Constructor; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Booster for xgboost, this is a model API that support interactive build of a XGBoost Model */ public class Booster implements Serializable { private static final Log logger = LogFactory.getLog(Booster.class); private static final boolean USE_KRYO_BOOSTER; private static final Class<?> KRYO_BOOSTER_CLASS; static { boolean useKryo; try { Class.forName("com.esotericsoftware.kryo.KryoSerializable"); useKryo = true; } catch (ClassNotFoundException e) { useKryo = false; logger.debug("Kryo is not available", e); } Class<?> kryoBoosterClass; if (useKryo) { try { String kryoBoosterClassName = Booster.class.getPackage().getName() + ".KryoBooster"; kryoBoosterClass = Class.forName(kryoBoosterClassName); } catch (ClassNotFoundException e) { logger.error("KryoBooster is not available", e); kryoBoosterClass = null; } } else { kryoBoosterClass = null; } USE_KRYO_BOOSTER = kryoBoosterClass != null; KRYO_BOOSTER_CLASS = kryoBoosterClass; } // handle to the booster. protected long handle = 0; protected int version = 0; /** * Create a new Booster with empty stage. * * @param params Model parameters * @param cacheMats Cached DMatrix entries, * the prediction of these DMatrices will become faster than not-cached data. * @throws XGBoostError native error */ static Booster newBooster(Map<String, Object> params, DMatrix[] cacheMats) throws XGBoostError { if (USE_KRYO_BOOSTER) { return newKryoBooster(params, cacheMats); } else { return new Booster(params, cacheMats, false); } } private static Booster newKryoBooster(Map<String, Object> params, DMatrix[] cacheMats) throws XGBoostError { try { Constructor<?> constuctor = KRYO_BOOSTER_CLASS.getDeclaredConstructors()[0]; return (Booster) constuctor.newInstance(params, cacheMats); } catch (ReflectiveOperationException | IllegalArgumentException e) { logger.error(e); throw new XGBoostError(e.getMessage()); } } protected Booster(Map<String, Object> params, DMatrix[] cacheMats, boolean isKryoBooster) throws XGBoostError { this(isKryoBooster); init(cacheMats); setParams(params); } // Booster is not actually initialized in this constructor; must be // initialized later - used in deserialization protected Booster(boolean isKryoBooster) { if (USE_KRYO_BOOSTER != isKryoBooster) { throw new IllegalStateException( "Attempt to instantiate a Booster without support for Kryo " + "in an environment that supports Kryo." ); } } /** * Load a new Booster model from modelPath * @param modelPath The path to the model. * @return The created Booster. * @throws XGBoostError */ static Booster loadModel(String modelPath) throws XGBoostError { if (modelPath == null) { throw new NullPointerException("modelPath : null"); } Booster ret = newBooster(new HashMap<>(), new DMatrix[0]); XGBoostJNI.checkCall(XGBoostJNI.XGBoosterLoadModel(ret.handle, modelPath)); return ret; } /** * Load a new Booster model from a byte array buffer. * The assumption is the array only contains one XGBoost Model. * This can be used to load existing booster models saved by other xgboost bindings. * * @param buffer The byte contents of the booster. * @return The created boosted * @throws XGBoostError */ static Booster loadModel(byte[] buffer) throws XGBoostError { Booster ret = newBooster(new HashMap<>(), new DMatrix[0]); XGBoostJNI.checkCall(XGBoostJNI.XGBoosterLoadModelFromBuffer(ret.handle, buffer)); return ret; } /** * Set parameter to the Booster. * * @param key param name * @param value param value * @throws XGBoostError native error */ public final void setParam(String key, Object value) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGBoosterSetParam(handle, key, value.toString())); } /** * Set parameters to the Booster. * * @param params parameters key-value map * @throws XGBoostError native error */ public void setParams(Map<String, Object> params) throws XGBoostError { if (params != null) { for (Map.Entry<String, Object> entry : params.entrySet()) { setParam(entry.getKey(), entry.getValue().toString()); } } } /** * Get attributes stored in the Booster as a Map. * * @return A map contain attribute pairs. * @throws XGBoostError native error */ public final Map<String, String> getAttrs() throws XGBoostError { String[][] attrNames = new String[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterGetAttrNames(handle, attrNames)); Map<String, String> attrMap = new HashMap<>(); for (String name: attrNames[0]) { attrMap.put(name, this.getAttr(name)); } return attrMap; } /** * Get attribute from the Booster. * * @param key attribute key * @return attribute value * @throws XGBoostError native error */ public final String getAttr(String key) throws XGBoostError { String[] attrValue = new String[1]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterGetAttr(handle, key, attrValue)); return attrValue[0]; } /** * Set attribute to the Booster. * * @param key attribute key * @param value attribute value * @throws XGBoostError native error */ public final void setAttr(String key, String value) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGBoosterSetAttr(handle, key, value)); } /** * Set attributes to the Booster. * * @param attrs attributes key-value map * @throws XGBoostError native error */ public void setAttrs(Map<String, String> attrs) throws XGBoostError { if (attrs != null) { for (Map.Entry<String, String> entry : attrs.entrySet()) { setAttr(entry.getKey(), entry.getValue()); } } } /** * Update the booster for one iteration. * * @param dtrain training data * @param iter current iteration number * @throws XGBoostError native error */ public void update(DMatrix dtrain, int iter) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGBoosterUpdateOneIter(handle, iter, dtrain.getHandle())); } /** * Update with customize obj func * * @param dtrain training data * @param obj customized objective class * @throws XGBoostError native error */ public void update(DMatrix dtrain, IObjective obj) throws XGBoostError { float[][] predicts = this.predict(dtrain, true, 0, false, false); List<float[]> gradients = obj.getGradient(predicts, dtrain); boost(dtrain, gradients.get(0), gradients.get(1)); } /** * update with give grad and hess * * @param dtrain training data * @param grad first order of gradient * @param hess seconde order of gradient * @throws XGBoostError native error */ public void boost(DMatrix dtrain, float[] grad, float[] hess) throws XGBoostError { if (grad.length != hess.length) { throw new AssertionError(String.format("grad/hess length mismatch %s / %s", grad.length, hess.length)); } XGBoostJNI.checkCall(XGBoostJNI.XGBoosterBoostOneIter(handle, dtrain.getHandle(), grad, hess)); } /** * evaluate with given dmatrixs. * * @param evalMatrixs dmatrixs for evaluation * @param evalNames name for eval dmatrixs, used for check results * @param iter current eval iteration * @return eval information * @throws XGBoostError native error */ public String evalSet(DMatrix[] evalMatrixs, String[] evalNames, int iter) throws XGBoostError { long[] handles = dmatrixsToHandles(evalMatrixs); String[] evalInfo = new String[1]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterEvalOneIter(handle, iter, handles, evalNames, evalInfo)); return evalInfo[0]; } /** * evaluate with given dmatrixs. * * @param evalMatrixs dmatrixs for evaluation * @param evalNames name for eval dmatrixs, used for check results * @param iter current eval iteration * @param metricsOut output array containing the evaluation metrics for each evalMatrix * @return eval information * @throws XGBoostError native error */ public String evalSet(DMatrix[] evalMatrixs, String[] evalNames, int iter, float[] metricsOut) throws XGBoostError { String stringFormat = evalSet(evalMatrixs, evalNames, iter); String[] metricPairs = stringFormat.split("\t"); for (int i = 1; i < metricPairs.length; i++) { String value = metricPairs[i].split(":")[1]; if (value.equalsIgnoreCase("nan")) { metricsOut[i - 1] = Float.NaN; } else if (value.equalsIgnoreCase("-nan")) { metricsOut[i - 1] = -Float.NaN; } else { metricsOut[i - 1] = Float.valueOf(value); } } return stringFormat; } /** * evaluate with given customized Evaluation class * * @param evalMatrixs evaluation matrix * @param evalNames evaluation names * @param eval custom evaluator * @return eval information * @throws XGBoostError native error */ public String evalSet(DMatrix[] evalMatrixs, String[] evalNames, IEvaluation eval) throws XGBoostError { // Hopefully, a tiny redundant allocation wouldn't hurt. return evalSet(evalMatrixs, evalNames, eval, new float[evalNames.length]); } public String evalSet(DMatrix[] evalMatrixs, String[] evalNames, IEvaluation eval, float[] metricsOut) throws XGBoostError { String evalInfo = ""; for (int i = 0; i < evalNames.length; i++) { String evalName = evalNames[i]; DMatrix evalMat = evalMatrixs[i]; float evalResult = eval.eval(predict(evalMat), evalMat); String evalMetric = eval.getMetric(); evalInfo += String.format("\t%s-%s:%f", evalName, evalMetric, evalResult); metricsOut[i] = evalResult; } return evalInfo; } /** * Advanced predict function with all the options. * * @param data data * @param outputMargin output margin * @param treeLimit limit number of trees, 0 means all trees. * @param predLeaf prediction minimum to keep leafs * @param predContribs prediction feature contributions * @return predict results */ private synchronized float[][] predict(DMatrix data, boolean outputMargin, int treeLimit, boolean predLeaf, boolean predContribs) throws XGBoostError { int optionMask = 0; if (outputMargin) { optionMask = 1; } if (predLeaf) { optionMask = 2; } if (predContribs) { optionMask = 4; } float[][] rawPredicts = new float[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterPredict(handle, data.getHandle(), optionMask, treeLimit, rawPredicts)); int row = (int) data.rowNum(); int col = rawPredicts[0].length / row; float[][] predicts = new float[row][col]; int r, c; for (int i = 0; i < rawPredicts[0].length; i++) { r = i / col; c = i % col; predicts[r][c] = rawPredicts[0][i]; } return predicts; } /** * Predict leaf indices given the data * * @param data The input data. * @param treeLimit Number of trees to include, 0 means all trees. * @return The leaf indices of the instance. * @throws XGBoostError */ public float[][] predictLeaf(DMatrix data, int treeLimit) throws XGBoostError { return this.predict(data, false, treeLimit, true, false); } /** * Output feature contributions toward predictions of given data * * @param data The input data. * @param treeLimit Number of trees to include, 0 means all trees. * @return The feature contributions and bias. * @throws XGBoostError */ public float[][] predictContrib(DMatrix data, int treeLimit) throws XGBoostError { return this.predict(data, false, treeLimit, true, true); } /** * Predict with data * * @param data dmatrix storing the input * @return predict result * @throws XGBoostError native error */ public float[][] predict(DMatrix data) throws XGBoostError { return this.predict(data, false, 0, false, false); } /** * Predict with data * * @param data data * @param outputMargin output margin * @return predict results */ public float[][] predict(DMatrix data, boolean outputMargin) throws XGBoostError { return this.predict(data, outputMargin, 0, false, false); } /** * Advanced predict function with all the options. * * @param data data * @param outputMargin output margin * @param treeLimit limit number of trees, 0 means all trees. * @return predict results */ public float[][] predict(DMatrix data, boolean outputMargin, int treeLimit) throws XGBoostError { return this.predict(data, outputMargin, treeLimit, false, false); } /** * Save model to modelPath * * @param modelPath model path */ public void saveModel(String modelPath) throws XGBoostError{ XGBoostJNI.checkCall(XGBoostJNI.XGBoosterSaveModel(handle, modelPath)); } /** * Save the model to file opened as output stream. * The model format is compatible with other xgboost bindings. * The output stream can only save one xgboost model. * This function will close the OutputStream after the save. * * @param out The output stream */ public void saveModel(OutputStream out) throws XGBoostError, IOException { out.write(this.toByteArray()); out.close(); } /** * Get the dump of the model as a string array * * @param withStats Controls whether the split statistics are output. * @return dumped model information * @throws XGBoostError native error */ public String[] getModelDump(String featureMap, boolean withStats) throws XGBoostError { return getModelDump(featureMap, withStats, "text"); } public String[] getModelDump(String featureMap, boolean withStats, String format) throws XGBoostError { int statsFlag = 0; if (featureMap == null) { featureMap = ""; } if (withStats) { statsFlag = 1; } if (format == null) { format = "text"; } String[][] modelInfos = new String[1][]; XGBoostJNI.checkCall( XGBoostJNI.XGBoosterDumpModelEx(handle, featureMap, statsFlag, format, modelInfos)); return modelInfos[0]; } /** * Get the dump of the model as a string array with specified feature names. * * @param featureNames Names of the features. * @return dumped model information * @throws XGBoostError */ public String[] getModelDump(String[] featureNames, boolean withStats) throws XGBoostError { return getModelDump(featureNames, withStats, "text"); } public String[] getModelDump(String[] featureNames, boolean withStats, String format) throws XGBoostError { int statsFlag = 0; if (withStats) { statsFlag = 1; } if (format == null) { format = "text"; } String[][] modelInfos = new String[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterDumpModelExWithFeatures( handle, featureNames, statsFlag, format, modelInfos)); return modelInfos[0]; } /** * Supported feature importance types * * WEIGHT = Number of nodes that a feature was used to determine a split * GAIN = Average information gain per split for a feature * COVER = Average cover per split for a feature * TOTAL_GAIN = Total information gain over all splits of a feature * TOTAL_COVER = Total cover over all splits of a feature */ public static class FeatureImportanceType { public static final String WEIGHT = "weight"; public static final String GAIN = "gain"; public static final String COVER = "cover"; public static final String TOTAL_GAIN = "total_gain"; public static final String TOTAL_COVER = "total_cover"; public static final Set<String> ACCEPTED_TYPES = new HashSet<>( Arrays.asList(WEIGHT, GAIN, COVER, TOTAL_GAIN, TOTAL_COVER)); } /** * Get importance of each feature with specified feature names. * * @return featureScoreMap key: feature name, value: feature importance score, can be nill. * @throws XGBoostError native error */ public Map<String, Integer> getFeatureScore(String[] featureNames) throws XGBoostError { String[] modelInfos = getModelDump(featureNames, false); return getFeatureWeightsFromModel(modelInfos); } /** * Get importance of each feature * * @return featureScoreMap key: feature index, value: feature importance score, can be nill * @throws XGBoostError native error */ public Map<String, Integer> getFeatureScore(String featureMap) throws XGBoostError { String[] modelInfos = getModelDump(featureMap, false); return getFeatureWeightsFromModel(modelInfos); } /** * Get the importance of each feature based purely on weights (number of splits) * * @return featureScoreMap key: feature index, * value: feature importance score based on weight * @throws XGBoostError native error */ private Map<String, Integer> getFeatureWeightsFromModel(String[] modelInfos) throws XGBoostError { Map<String, Integer> featureScore = new HashMap<>(); for (String tree : modelInfos) { for (String node : tree.split("\n")) { String[] array = node.split("\\["); if (array.length == 1) { continue; } String fid = array[1].split("\\]")[0]; fid = fid.split("<")[0]; if (featureScore.containsKey(fid)) { featureScore.put(fid, 1 + featureScore.get(fid)); } else { featureScore.put(fid, 1); } } } return featureScore; } /** * Get the feature importances for gain or cover (average or total) * * @return featureImportanceMap key: feature index, * values: feature importance score based on gain or cover * @throws XGBoostError native error */ public Map<String, Double> getScore( String[] featureNames, String importanceType) throws XGBoostError { String[] modelInfos = getModelDump(featureNames, true); return getFeatureImportanceFromModel(modelInfos, importanceType); } /** * Get the feature importances for gain or cover (average or total), with feature names * * @return featureImportanceMap key: feature name, * values: feature importance score based on gain or cover * @throws XGBoostError native error */ public Map<String, Double> getScore( String featureMap, String importanceType) throws XGBoostError { String[] modelInfos = getModelDump(featureMap, true); return getFeatureImportanceFromModel(modelInfos, importanceType); } /** * Get the importance of each feature based on information gain or cover * * @return featureImportanceMap key: feature index, value: feature importance score * based on information gain or cover * @throws XGBoostError native error */ private Map<String, Double> getFeatureImportanceFromModel( String[] modelInfos, String importanceType) throws XGBoostError { if (!FeatureImportanceType.ACCEPTED_TYPES.contains(importanceType)) { throw new AssertionError(String.format("Importance type %s is not supported", importanceType)); } Map<String, Double> importanceMap = new HashMap<>(); Map<String, Double> weightMap = new HashMap<>(); if (importanceType.equals(FeatureImportanceType.WEIGHT)) { Map<String, Integer> importanceWeights = getFeatureWeightsFromModel(modelInfos); for (String feature: importanceWeights.keySet()) { importanceMap.put(feature, new Double(importanceWeights.get(feature))); } return importanceMap; } /* Each split in the tree has this text form: "0:[f28<-9.53674316e-07] yes=1,no=2,missing=1,gain=4000.53101,cover=1628.25" So the line has to be split according to whether cover or gain is desired */ String splitter = "gain="; if (importanceType.equals(FeatureImportanceType.COVER) || importanceType.equals(FeatureImportanceType.TOTAL_COVER)) { splitter = "cover="; } for (String tree: modelInfos) { for (String node: tree.split("\n")) { String[] array = node.split("\\["); if (array.length == 1) { continue; } String[] fidWithImportance = array[1].split("\\]"); // Extract gain or cover from string after closing bracket Double importance = Double.parseDouble( fidWithImportance[1].split(splitter)[1].split(",")[0] ); String fid = fidWithImportance[0].split("<")[0]; if (importanceMap.containsKey(fid)) { importanceMap.put(fid, importance + importanceMap.get(fid)); weightMap.put(fid, 1d + weightMap.get(fid)); } else { importanceMap.put(fid, importance); weightMap.put(fid, 1d); } } } /* By default we calculate total gain and total cover. Divide by the number of nodes per feature to get gain / cover */ if (importanceType.equals(FeatureImportanceType.COVER) || importanceType.equals(FeatureImportanceType.GAIN)) { for (String fid: importanceMap.keySet()) { importanceMap.put(fid, importanceMap.get(fid)/weightMap.get(fid)); } } return importanceMap; } /** * Save the model as byte array representation. * Write these bytes to a file will give compatible format with other xgboost bindings. * * If java natively support HDFS file API, use toByteArray and write the ByteArray * * @param withStats Controls whether the split statistics are output. * @return dumped model information * @throws XGBoostError native error */ private String[] getDumpInfo(boolean withStats) throws XGBoostError { int statsFlag = 0; if (withStats) { statsFlag = 1; } String[][] modelInfos = new String[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterDumpModelEx(handle, "", statsFlag, "text", modelInfos)); return modelInfos[0]; } public int getVersion() { return this.version; } public void setVersion(int version) { this.version = version; } /** * Save model into raw byte array. Currently it's using the deprecated format as * default, which will be changed into `ubj` in future releases. * * @return the saved byte array * @throws XGBoostError native error */ public byte[] toByteArray() throws XGBoostError { return this.toByteArray("deprecated"); } /** * Save model into raw byte array. * * @param format The output format. Available options are "json", "ubj" and "deprecated". * * @return the saved byte array * @throws XGBoostError native error */ public byte[] toByteArray(String format) throws XGBoostError { byte[][] bytes = new byte[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterSaveModelToBuffer(this.handle, format, bytes)); return bytes[0]; } /** * Load the booster model from thread-local rabit checkpoint. * This is only used in distributed training. * @return the stored version number of the checkpoint. * @throws XGBoostError */ int loadRabitCheckpoint() throws XGBoostError { int[] out = new int[1]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterLoadRabitCheckpoint(this.handle, out)); version = out[0]; return version; } /** * Save the booster model into thread-local rabit checkpoint and increment the version. * This is only used in distributed training. * @throws XGBoostError */ void saveRabitCheckpoint() throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGBoosterSaveRabitCheckpoint(this.handle)); version += 1; } /** * Get number of model features. * @return the number of features. * @throws XGBoostError */ public long getNumFeature() throws XGBoostError { long[] numFeature = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterGetNumFeature(this.handle, numFeature)); return numFeature[0]; } /** * Internal initialization function. * @param cacheMats The cached DMatrix. * @throws XGBoostError */ protected void init(DMatrix[] cacheMats) throws XGBoostError { long[] handles = null; if (cacheMats != null) { handles = dmatrixsToHandles(cacheMats); } long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGBoosterCreate(handles, out)); handle = out[0]; } /** * transfer DMatrix array to handle array (used for native functions) * * @param dmatrixs * @return handle array for input dmatrixs */ private static long[] dmatrixsToHandles(DMatrix[] dmatrixs) { long[] handles = new long[dmatrixs.length]; for (int i = 0; i < dmatrixs.length; i++) { handles[i] = dmatrixs[i].getHandle(); } return handles; } // making Booster serializable private void writeObject(java.io.ObjectOutputStream out) throws IOException { try { out.writeInt(version); out.writeObject(this.toByteArray()); } catch (XGBoostError ex) { ex.printStackTrace(); logger.error(ex.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { try { this.init(null); this.version = in.readInt(); byte[] bytes = (byte[])in.readObject(); initFromBytes(bytes); } catch (XGBoostError ex) { ex.printStackTrace(); logger.error(ex.getMessage()); } } protected void initFromBytes(byte[] bytes) throws XGBoostError { this.init(null); XGBoostJNI.checkCall(XGBoostJNI.XGBoosterLoadModelFromBuffer(this.handle, bytes)); } @Override protected void finalize() throws Throwable { super.finalize(); dispose(); } public synchronized void dispose() { if (handle != 0L) { XGBoostJNI.XGBoosterFree(handle); handle = 0; } } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/Column.java
/* Copyright (c) 2021 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; /** * The abstracted XGBoost Column to get the cuda array interface which is used to * set the information for DMatrix. * */ public abstract class Column implements AutoCloseable { /** * Get the cuda array interface json string for the Column which can be representing * weight, label, base margin column. * * This API will be called by * {@link DMatrix#setLabel(Column)} * {@link DMatrix#setWeight(Column)} * {@link DMatrix#setBaseMargin(Column)} */ public abstract String getArrayInterfaceJson(); @Override public void close() throws Exception {} }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/ColumnBatch.java
/* Copyright (c) 2021 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.util.Iterator; /** * The abstracted XGBoost ColumnBatch to get array interface from columnar data format. * For example, the cuDF dataframe which employs apache arrow specification. */ public abstract class ColumnBatch implements AutoCloseable { /** * Get the cuda array interface json string for the whole ColumnBatch including * the must-have feature, label columns and the optional weight, base margin columns. * * This function is be called by native code during iteration and can be made as private * method. We keep it as public simply to silent the linter. */ public final String getArrayInterfaceJson() { StringBuilder builder = new StringBuilder(); builder.append("{"); String featureStr = this.getFeatureArrayInterface(); if (featureStr == null || featureStr.isEmpty()) { throw new RuntimeException("Feature array interface must not be empty"); } else { builder.append("\"features_str\":" + featureStr); } String labelStr = this.getLabelsArrayInterface(); if (labelStr == null || labelStr.isEmpty()) { throw new RuntimeException("Label array interface must not be empty"); } else { builder.append(",\"label_str\":" + labelStr); } String weightStr = getWeightsArrayInterface(); if (weightStr != null && ! weightStr.isEmpty()) { builder.append(",\"weight_str\":" + weightStr); } String baseMarginStr = getBaseMarginsArrayInterface(); if (baseMarginStr != null && ! baseMarginStr.isEmpty()) { builder.append(",\"basemargin_str\":" + baseMarginStr); } builder.append("}"); return builder.toString(); } /** * Get the cuda array interface of the feature columns. * The returned value must not be null or empty */ public abstract String getFeatureArrayInterface(); /** * Get the cuda array interface of the label columns. * The returned value must not be null or empty if we're creating * {@link DeviceQuantileDMatrix#DeviceQuantileDMatrix(Iterator, float, int, int)} */ public abstract String getLabelsArrayInterface(); /** * Get the cuda array interface of the weight columns. * The returned value can be null or empty */ public abstract String getWeightsArrayInterface(); /** * Get the cuda array interface of the base margin columns. * The returned value can be null or empty */ public abstract String getBaseMarginsArrayInterface(); @Override public void close() throws Exception {} }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/DMatrix.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.util.Iterator; import ml.dmlc.xgboost4j.LabeledPoint; import ml.dmlc.xgboost4j.java.util.BigDenseMatrix; /** * DMatrix for xgboost. * * @author hzx */ public class DMatrix { protected long handle = 0; /** * sparse matrix type (CSR or CSC) */ public static enum SparseType { CSR, CSC; } /** * Create DMatrix from iterator. * * @param iter The data iterator of mini batch to provide the data. * @param cacheInfo Cache path information, used for external memory setting, can be null. * @throws XGBoostError */ public DMatrix(Iterator<LabeledPoint> iter, String cacheInfo) throws XGBoostError { if (iter == null) { throw new NullPointerException("iter: null"); } // 32k as batch size int batchSize = 32 << 10; Iterator<DataBatch> batchIter = new DataBatch.BatchIterator(iter, batchSize); long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromDataIter(batchIter, cacheInfo, out)); handle = out[0]; } /** * Create DMatrix by loading libsvm file from dataPath * * @param dataPath The path to the data. * @throws XGBoostError */ public DMatrix(String dataPath) throws XGBoostError { if (dataPath == null) { throw new NullPointerException("dataPath: null"); } long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromFile(dataPath, 1, out)); handle = out[0]; } /** * Create DMatrix from Sparse matrix in CSR/CSC format. * @param headers The row index of the matrix. * @param indices The indices of presenting entries. * @param data The data content. * @param st Type of sparsity. * @throws XGBoostError */ @Deprecated public DMatrix(long[] headers, int[] indices, float[] data, DMatrix.SparseType st) throws XGBoostError { long[] out = new long[1]; if (st == SparseType.CSR) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromCSREx(headers, indices, data, 0, out)); } else if (st == SparseType.CSC) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromCSCEx(headers, indices, data, 0, out)); } else { throw new UnknownError("unknow sparsetype"); } handle = out[0]; } /** * Create DMatrix from Sparse matrix in CSR/CSC format. * @param headers The row index of the matrix. * @param indices The indices of presenting entries. * @param data The data content. * @param st Type of sparsity. * @param shapeParam when st is CSR, it specifies the column number, otherwise it is taken as * row number * @throws XGBoostError */ public DMatrix(long[] headers, int[] indices, float[] data, DMatrix.SparseType st, int shapeParam) throws XGBoostError { long[] out = new long[1]; if (st == SparseType.CSR) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromCSREx(headers, indices, data, shapeParam, out)); } else if (st == SparseType.CSC) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromCSCEx(headers, indices, data, shapeParam, out)); } else { throw new UnknownError("unknow sparsetype"); } handle = out[0]; } /** * Create DMatrix from Sparse matrix in CSR/CSC format. * 2D arrays since underlying array can accomodate that many elements. * @param headers The row index of the matrix. * @param indices The indices of presenting entries. * @param data The data content. * @param st Type of sparsity. * @param ndata number of nonzero elements * @throws XGBoostError */ public DMatrix(long[][] headers, int[][] indices, float[][] data, SparseType st, int shapeParam2, long ndata) throws XGBoostError { long[] out = new long[1]; if (st == SparseType.CSR) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFrom2DCSREx(headers, indices, data, 0, shapeParam2, ndata, out)); } else if (st == SparseType.CSC) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFrom2DCSCEx(headers, indices, data, 0, shapeParam2, ndata, out)); } else { throw new UnknownError("unknow sparsetype"); } handle = out[0]; } /** * Create DMatrix from Sparse matrix in CSR/CSC format. * 2D arrays since underlying array can accomodate that many elements. * @param headers The row index of the matrix. * @param indices The indices of presenting entries. * @param data The data content. * @param st Type of sparsity. * @param shapeParam when st is CSR, it specifies the column number, otherwise it is taken as * row number * @param shapeParam2 when st is CSR, it specifies the row number, otherwise it is taken as * column number * @param ndata number of nonzero elements * @throws XGBoostError */ public DMatrix(long[][] headers, int[][] indices, float[][] data, SparseType st, int shapeParam, int shapeParam2, long ndata) throws XGBoostError { long[] out = new long[1]; if (st == SparseType.CSR) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFrom2DCSREx(headers, indices, data, shapeParam, shapeParam2, ndata, out)); } else if (st == SparseType.CSC) { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFrom2DCSCEx(headers, indices, data, shapeParam, shapeParam2, ndata, out)); } else { throw new UnknownError("unknow sparsetype"); } handle = out[0]; } /** * create DMatrix from dense matrix * * @param data data values * @param nrow number of rows * @param ncol number of columns * @throws XGBoostError native error * * @deprecated Please specify the missing value explicitly using * {@link DMatrix(float[], int, int, float)} */ @Deprecated public DMatrix(float[] data, int nrow, int ncol) throws XGBoostError { long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromMat(data, nrow, ncol, 0.0f, out)); handle = out[0]; } /** * create DMatrix from a BigDenseMatrix * * @param matrix instance of BigDenseMatrix * @throws XGBoostError native error */ public DMatrix(BigDenseMatrix matrix) throws XGBoostError { this(matrix, 0.0f); } /** * create DMatrix from dense matrix * @param data data values * @param nrow number of rows * @param ncol number of columns * @param missing the specified value to represent the missing value */ public DMatrix(float[] data, int nrow, int ncol, float missing) throws XGBoostError { long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromMat(data, nrow, ncol, missing, out)); handle = out[0]; } /** * create DMatrix from dense matrix * @param matrix instance of BigDenseMatrix * @param missing the specified value to represent the missing value */ public DMatrix(BigDenseMatrix matrix, float missing) throws XGBoostError { long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromMatRef(matrix.address, matrix.nrow, matrix.ncol, missing, out)); handle = out[0]; } /** * used for DMatrix slice */ protected DMatrix(long handle) { this.handle = handle; } /** * Create the normal DMatrix from column array interface * @param columnBatch the XGBoost ColumnBatch to provide the cuda array interface * of feature columns * @param missing missing value * @param nthread threads number * @throws XGBoostError */ public DMatrix(ColumnBatch columnBatch, float missing, int nthread) throws XGBoostError { long[] out = new long[1]; String json = columnBatch.getFeatureArrayInterface(); if (json == null || json.isEmpty()) { throw new XGBoostError("Expecting non-empty feature columns' array interface"); } XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromArrayInterfaceColumns( json, missing, nthread, out)); handle = out[0]; } /** * Set label of DMatrix from cuda array interface * * @param column the XGBoost Column to provide the cuda array interface * of label column * @throws XGBoostError native error */ public void setLabel(Column column) throws XGBoostError { setXGBDMatrixInfo("label", column.getArrayInterfaceJson()); } /** * Set weight of DMatrix from cuda array interface * * @param column the XGBoost Column to provide the cuda array interface * of weight column * @throws XGBoostError native error */ public void setWeight(Column column) throws XGBoostError { setXGBDMatrixInfo("weight", column.getArrayInterfaceJson()); } /** * Set base margin of DMatrix from cuda array interface * * @param column the XGBoost Column to provide the cuda array interface * of base margin column * @throws XGBoostError native error */ public void setBaseMargin(Column column) throws XGBoostError { setXGBDMatrixInfo("base_margin", column.getArrayInterfaceJson()); } private void setXGBDMatrixInfo(String type, String json) throws XGBoostError { if (json == null || json.isEmpty()) { throw new XGBoostError("Empty " + type + " columns' array interface"); } XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetInfoFromInterface(handle, type, json)); } /** * set label of dmatrix * * @param labels labels * @throws XGBoostError native error */ public void setLabel(float[] labels) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetFloatInfo(handle, "label", labels)); } /** * set weight of each instance * * @param weights weights * @throws XGBoostError native error */ public void setWeight(float[] weights) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetFloatInfo(handle, "weight", weights)); } /** * Set base margin (initial prediction). * * The margin must have the same number of elements as the number of * rows in this matrix. */ public void setBaseMargin(float[] baseMargin) throws XGBoostError { if (baseMargin.length != rowNum()) { throw new IllegalArgumentException(String.format( "base margin must have exactly %s elements, got %s", rowNum(), baseMargin.length)); } XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetFloatInfo(handle, "base_margin", baseMargin)); } /** * Set base margin (initial prediction). */ public void setBaseMargin(float[][] baseMargin) throws XGBoostError { setBaseMargin(flatten(baseMargin)); } /** * Set group sizes of DMatrix (used for ranking) * * @param group group size as array * @throws XGBoostError native error */ public void setGroup(int[] group) throws XGBoostError { XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetUIntInfo(handle, "group", group)); } /** * Get group sizes of DMatrix * * @throws XGBoostError native error * @return group size as array */ public int[] getGroup() throws XGBoostError { return getIntInfo("group_ptr"); } private float[] getFloatInfo(String field) throws XGBoostError { float[][] infos = new float[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixGetFloatInfo(handle, field, infos)); return infos[0]; } private int[] getIntInfo(String field) throws XGBoostError { int[][] infos = new int[1][]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixGetUIntInfo(handle, field, infos)); return infos[0]; } /** * get label values * * @return label * @throws XGBoostError native error */ public float[] getLabel() throws XGBoostError { return getFloatInfo("label"); } /** * get weight of the DMatrix * * @return weights * @throws XGBoostError native error */ public float[] getWeight() throws XGBoostError { return getFloatInfo("weight"); } /** * Get base margin of the DMatrix. */ public float[] getBaseMargin() throws XGBoostError { return getFloatInfo("base_margin"); } /** * Slice the DMatrix and return a new DMatrix that only contains `rowIndex`. * * @param rowIndex row index * @return sliced new DMatrix * @throws XGBoostError native error */ public DMatrix slice(int[] rowIndex) throws XGBoostError { long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSliceDMatrix(handle, rowIndex, out)); long sHandle = out[0]; DMatrix sMatrix = new DMatrix(sHandle); return sMatrix; } /** * get the row number of DMatrix * * @return number of rows * @throws XGBoostError native error */ public long rowNum() throws XGBoostError { long[] rowNum = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixNumRow(handle, rowNum)); return rowNum[0]; } /** * save DMatrix to filePath */ public void saveBinary(String filePath) { XGBoostJNI.XGDMatrixSaveBinary(handle, filePath, 1); } /** * Get the handle */ public long getHandle() { return handle; } /** * flatten a mat to array */ private static float[] flatten(float[][] mat) { int size = 0; for (float[] array : mat) size += array.length; float[] result = new float[size]; int pos = 0; for (float[] ar : mat) { System.arraycopy(ar, 0, result, pos, ar.length); pos += ar.length; } return result; } @Override protected void finalize() { dispose(); } public synchronized void dispose() { if (handle != 0) { XGBoostJNI.XGDMatrixFree(handle); handle = 0; } } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/DataBatch.java
package ml.dmlc.xgboost4j.java; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import ml.dmlc.xgboost4j.LabeledPoint; /** * A mini-batch of data that can be converted to DMatrix. * The data is in sparse matrix CSR format. * * This class is used to support advanced creation of DMatrix from Iterator of DataBatch, */ class DataBatch { private static final Log logger = LogFactory.getLog(DataBatch.class); /** The offset of each rows in the sparse matrix */ final long[] rowOffset; /** weight of each data point, can be null */ final float[] weight; /** label of each data point, can be null */ final float[] label; /** index of each feature(column) in the sparse matrix */ final int[] featureIndex; /** value of each non-missing entry in the sparse matrix */ final float[] featureValue ; /** feature columns */ final int featureCols; DataBatch(long[] rowOffset, float[] weight, float[] label, int[] featureIndex, float[] featureValue, int featureCols) { this.rowOffset = rowOffset; this.weight = weight; this.label = label; this.featureIndex = featureIndex; this.featureValue = featureValue; this.featureCols = featureCols; } static class BatchIterator implements Iterator<DataBatch> { private final Iterator<LabeledPoint> base; private final int batchSize; BatchIterator(Iterator<LabeledPoint> base, int batchSize) { this.base = base; this.batchSize = batchSize; } @Override public boolean hasNext() { return base.hasNext(); } @Override public DataBatch next() { try { int numRows = 0; int numElem = 0; int numCol = -1; List<LabeledPoint> batch = new ArrayList<>(batchSize); while (base.hasNext() && batch.size() < batchSize) { LabeledPoint labeledPoint = base.next(); if (numCol == -1) { numCol = labeledPoint.size(); } else if (numCol != labeledPoint.size()) { throw new RuntimeException("Feature size is not the same"); } batch.add(labeledPoint); numElem += labeledPoint.values().length; numRows++; } long[] rowOffset = new long[numRows + 1]; float[] label = new float[numRows]; int[] featureIndex = new int[numElem]; float[] featureValue = new float[numElem]; float[] weight = new float[numRows]; int offset = 0; for (int i = 0; i < batch.size(); i++) { LabeledPoint labeledPoint = batch.get(i); rowOffset[i] = offset; label[i] = labeledPoint.label(); weight[i] = labeledPoint.weight(); if (labeledPoint.indices() != null) { System.arraycopy(labeledPoint.indices(), 0, featureIndex, offset, labeledPoint.indices().length); } else { for (int j = 0; j < labeledPoint.values().length; j++) { featureIndex[offset + j] = j; } } System.arraycopy(labeledPoint.values(), 0, featureValue, offset, labeledPoint.values().length); offset += labeledPoint.values().length; } rowOffset[batch.size()] = offset; return new DataBatch(rowOffset, weight, label, featureIndex, featureValue, numCol); } catch (RuntimeException runtimeError) { logger.error(runtimeError); return null; } } @Override public void remove() { throw new UnsupportedOperationException("DataBatch.BatchIterator.remove"); } } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/DeviceQuantileDMatrix.java
package ml.dmlc.xgboost4j.java; import java.util.Iterator; /** * DeviceQuantileDMatrix will only be used to train */ public class DeviceQuantileDMatrix extends DMatrix { /** * Create DeviceQuantileDMatrix from iterator based on the cuda array interface * @param iter the XGBoost ColumnBatch batch to provide the corresponding cuda array interface * @param missing the missing value * @param maxBin the max bin * @param nthread the parallelism * @throws XGBoostError */ public DeviceQuantileDMatrix( Iterator<ColumnBatch> iter, float missing, int maxBin, int nthread) throws XGBoostError { super(0); long[] out = new long[1]; XGBoostJNI.checkCall(XGBoostJNI.XGDeviceQuantileDMatrixCreateFromCallback( iter, missing, maxBin, nthread, out)); handle = out[0]; } @Override public void setLabel(Column column) throws XGBoostError { throw new XGBoostError("DeviceQuantileDMatrix does not support setLabel."); } @Override public void setWeight(Column column) throws XGBoostError { throw new XGBoostError("DeviceQuantileDMatrix does not support setWeight."); } @Override public void setBaseMargin(Column column) throws XGBoostError { throw new XGBoostError("DeviceQuantileDMatrix does not support setBaseMargin."); } @Override public void setLabel(float[] labels) throws XGBoostError { throw new XGBoostError("DeviceQuantileDMatrix does not support setLabel."); } @Override public void setWeight(float[] weights) throws XGBoostError { throw new XGBoostError("DeviceQuantileDMatrix does not support setWeight."); } @Override public void setBaseMargin(float[] baseMargin) throws XGBoostError { throw new XGBoostError("DeviceQuantileDMatrix does not support setBaseMargin."); } @Override public void setBaseMargin(float[][] baseMargin) throws XGBoostError { throw new XGBoostError("DeviceQuantileDMatrix does not support setBaseMargin."); } @Override public void setGroup(int[] group) throws XGBoostError { throw new XGBoostError("DeviceQuantileDMatrix does not support setGroup."); } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/ExternalCheckpointManager.java
package ml.dmlc.xgboost4j.java; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.*; import java.util.stream.Collectors; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; public class ExternalCheckpointManager { private Log logger = LogFactory.getLog("ExternalCheckpointManager"); private String modelSuffix = ".model"; private Path checkpointPath; private FileSystem fs; public ExternalCheckpointManager(String checkpointPath, FileSystem fs) throws XGBoostError { if (checkpointPath == null || checkpointPath.isEmpty()) { throw new XGBoostError("cannot create ExternalCheckpointManager with null or" + " empty checkpoint path"); } this.checkpointPath = new Path(checkpointPath); this.fs = fs; } private String getPath(int version) { return checkpointPath.toUri().getPath() + "/" + version + modelSuffix; } private List<Integer> getExistingVersions() throws IOException { if (!fs.exists(checkpointPath)) { return new ArrayList<>(); } else { return Arrays.stream(fs.listStatus(checkpointPath)) .map(path -> path.getPath().getName()) .filter(fileName -> fileName.endsWith(modelSuffix)) .map(fileName -> Integer.valueOf( fileName.substring(0, fileName.length() - modelSuffix.length()))) .collect(Collectors.toList()); } } public void cleanPath() throws IOException { fs.delete(checkpointPath, true); } public Booster loadCheckpointAsBooster() throws IOException, XGBoostError { List<Integer> versions = getExistingVersions(); if (versions.size() > 0) { int latestVersion = versions.stream().max(Comparator.comparing(Integer::valueOf)).get(); String checkpointPath = getPath(latestVersion); InputStream in = fs.open(new Path(checkpointPath)); logger.info("loaded checkpoint from " + checkpointPath); Booster booster = XGBoost.loadModel(in); booster.setVersion(latestVersion); return booster; } else { return null; } } public void updateCheckpoint(Booster boosterToCheckpoint) throws IOException, XGBoostError { List<String> prevModelPaths = getExistingVersions().stream() .map(this::getPath).collect(Collectors.toList()); String eventualPath = getPath(boosterToCheckpoint.getVersion()); String tempPath = eventualPath + "-" + UUID.randomUUID(); try (OutputStream out = fs.create(new Path(tempPath), true)) { boosterToCheckpoint.saveModel(out); fs.rename(new Path(tempPath), new Path(eventualPath)); logger.info("saving checkpoint with version " + boosterToCheckpoint.getVersion()); prevModelPaths.stream().forEach(path -> { try { fs.delete(new Path(path), true); } catch (IOException e) { logger.error("failed to delete outdated checkpoint at " + path, e); } }); } } public void cleanUpHigherVersions(int currentRound) throws IOException { getExistingVersions().stream().filter(v -> v / 2 >= currentRound).forEach(v -> { try { fs.delete(new Path(getPath(v)), true); } catch (IOException e) { logger.error("failed to clean checkpoint from other training instance", e); } }); } public List<Integer> getCheckpointRounds(int checkpointInterval, int numOfRounds) throws IOException { if (checkpointInterval > 0) { List<Integer> prevRounds = getExistingVersions().stream().map(v -> v / 2).collect(Collectors.toList()); prevRounds.add(0); int firstCheckpointRound = prevRounds.stream() .max(Comparator.comparing(Integer::valueOf)).get() + checkpointInterval; List<Integer> arr = new ArrayList<>(); for (int i = firstCheckpointRound; i <= numOfRounds; i += checkpointInterval) { arr.add(i); } arr.add(numOfRounds); return arr; } else if (checkpointInterval <= 0) { List<Integer> l = new ArrayList<Integer>(); l.add(numOfRounds); return l; } else { throw new IllegalArgumentException("parameters \"checkpoint_path\" should also be set."); } } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/KryoBooster.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.util.Map; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.KryoSerializable; import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @SuppressWarnings("unused") public class KryoBooster extends Booster implements KryoSerializable { private static final Log logger = LogFactory.getLog(KryoBooster.class); KryoBooster(Map<String, Object> params, DMatrix[] cacheMats) throws XGBoostError { super(params, cacheMats, true); } KryoBooster() { super(true); } @Override public void write(Kryo kryo, Output output) { try { byte[] serObj = this.toByteArray(); int serObjSize = serObj.length; output.writeInt(serObjSize); output.writeInt(version); output.write(serObj); } catch (XGBoostError ex) { logger.error(ex.getMessage(), ex); throw new RuntimeException("Booster serialization failed", ex); } } @Override public void read(Kryo kryo, Input input) { try { this.init(null); int serObjSize = input.readInt(); this.version = input.readInt(); byte[] bytes = new byte[serObjSize]; input.readBytes(bytes); XGBoostJNI.checkCall(XGBoostJNI.XGBoosterLoadModelFromBuffer(this.handle, bytes)); } catch (XGBoostError ex) { logger.error(ex.getMessage(), ex); throw new RuntimeException("Booster deserialization failed", ex); } } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/NativeLibLoader.java
/* Copyright (c) 2014, 2021 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.io.*; import java.lang.reflect.Field; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Locale; import java.util.Optional; import java.util.stream.Stream; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * class to load native library * * @author hzx */ public class NativeLibLoader { private static final Log logger = LogFactory.getLog(NativeLibLoader.class); private static Path mappedFilesBaseDir = Paths.get("/proc/self/map_files"); /** * Supported OS enum. */ enum OS { WINDOWS("windows"), MACOS("macos"), LINUX("linux"), LINUX_MUSL("linux-musl"), SOLARIS("solaris"); final String name; OS(String name) { this.name = name; } static void setMappedFilesBaseDir(Path baseDir) { mappedFilesBaseDir = baseDir; } /** * Detects the OS using the system properties. * Throws IllegalStateException if the OS is not recognized. * @return The OS. */ static OS detectOS() { String os = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH); if (os.contains("mac") || os.contains("darwin")) { return MACOS; } else if (os.contains("win")) { return WINDOWS; } else if (os.contains("nux")) { return isMuslBased() ? LINUX_MUSL : LINUX; } else if (os.contains("sunos")) { return SOLARIS; } else { throw new IllegalStateException("Unsupported OS:" + os); } } /** * Checks if the Linux OS is musl based. For this, we check the memory-mapped * filenames and see if one of those contains the string "musl". * * @return true if the Linux OS is musl based, false otherwise. */ static boolean isMuslBased() { try (Stream<Path> dirStream = Files.list(mappedFilesBaseDir)) { Optional<String> muslRelatedMemoryMappedFilename = dirStream .map(OS::toRealPath) .filter(s -> s.toLowerCase().contains("musl")) .findFirst(); muslRelatedMemoryMappedFilename.ifPresent(muslFilename -> { logger.debug("Assuming that detected Linux OS is musl-based, " + "because a memory-mapped file '" + muslFilename + "' was found."); }); return muslRelatedMemoryMappedFilename.isPresent(); } catch (Exception ignored) { // ignored } return false; } private static String toRealPath(Path path) { try { return path.toRealPath().toString(); } catch (IOException e) { return ""; } } } /** * Supported architecture enum. */ enum Arch { X86_64("x86_64"), AARCH64("aarch64"), SPARC("sparc"); final String name; Arch(String name) { this.name = name; } /** * Detects the chip architecture using the system properties. * Throws IllegalStateException if the architecture is not recognized. * @return The architecture. */ static Arch detectArch() { String arch = System.getProperty("os.arch", "generic").toLowerCase(Locale.ENGLISH); if (arch.startsWith("amd64") || arch.startsWith("x86_64")) { return X86_64; } else if (arch.startsWith("aarch64") || arch.startsWith("arm64")) { return AARCH64; } else if (arch.startsWith("sparc")) { return SPARC; } else { throw new IllegalStateException("Unsupported architecture:" + arch); } } } private static boolean initialized = false; private static INativeLibLoader loader = null; private static final String nativePath = "../../lib/"; private static final String nativeResourcePath = "/lib"; private static final String[] libNames = new String[]{"xgboost4j"}; /** * Loads the XGBoost library. * <p> * Throws IllegalStateException if the architecture or OS is unsupported. * <ul> * <li>Supported OS: macOS, Windows, Linux, Solaris.</li> * <li>Supported Architectures: x86_64, aarch64, sparc.</li> * </ul> * Throws UnsatisfiedLinkError if the library failed to load its dependencies. * @throws IOException If the library could not be extracted from the jar. */ public static synchronized void initXGBoost() throws IOException { if (!initialized) { // patch classloader class IOException nativeAddEx = null; try { addNativeDir(nativePath); // best effort, don't worry about outcome } catch (IOException e) { nativeAddEx = e; // will be logged later only if there is an actual issue with // loading of the native library } // initialize the Loader NativeLibLoaderService loaderService = NativeLibLoaderService.getInstance(); loader = loaderService.createLoader(); // load the native libs try { loader.loadNativeLibs(); } catch (Exception e) { if (nativeAddEx != null) { logger.error("Failed to add native path to the classpath at runtime", nativeAddEx); } throw e; } initialized = true; } } public static synchronized INativeLibLoader getLoader() throws IOException { initXGBoost(); return loader; } public static class DefaultNativeLibLoader implements INativeLibLoader { @Override public String name() { return "DefaultNativeLibLoader"; } @Override public int priority() { return 0; } @Override public void loadNativeLibs() throws IOException { OS os = OS.detectOS(); Arch arch = Arch.detectArch(); String platform = os.name + "/" + arch.name; for (String libName : libNames) { try { String libraryPathInJar = nativeResourcePath + "/" + platform + "/" + System.mapLibraryName(libName); loadLibraryFromJar(libraryPathInJar); } catch (UnsatisfiedLinkError ule) { String failureMessageIncludingOpenMPHint = "Failed to load " + libName + " " + "due to missing native dependencies for " + "platform " + platform + ", " + "this is likely due to a missing OpenMP dependency"; switch (os) { case WINDOWS: logger.error(failureMessageIncludingOpenMPHint); logger.error("You may need to install 'vcomp140.dll' or 'libgomp-1.dll'"); break; case MACOS: logger.error(failureMessageIncludingOpenMPHint); logger.error("You may need to install 'libomp.dylib', via `brew install libomp` " + "or similar"); break; case LINUX: logger.error(failureMessageIncludingOpenMPHint); logger.error("You may need to install 'libgomp.so' (or glibc) via your package " + "manager."); logger.error("Alternatively, your Linux OS is musl-based " + "but wasn't detected as such."); break; case LINUX_MUSL: logger.error(failureMessageIncludingOpenMPHint); logger.error("You may need to install 'libgomp.so' (or glibc) via your package " + "manager."); logger.error("Alternatively, your Linux OS was wrongly detected as musl-based, " + "although it is not."); break; case SOLARIS: logger.error(failureMessageIncludingOpenMPHint); logger.error("You may need to install 'libgomp.so' (or glibc) via your package " + "manager."); break; } throw ule; } catch (IOException ioe) { logger.error("Failed to load " + libName + " library from jar for platform " + platform); throw ioe; } } } } /** * Loads library from current JAR archive * <p/> * The file from JAR is copied into system temporary directory and then loaded. * The temporary file is deleted after exiting. * Method uses String as filename because the pathname is "abstract", not system-dependent. * <p/> * The restrictions of {@link File#createTempFile(java.lang.String, java.lang.String)} apply to * {@code path}. * * @param path The filename inside JAR as absolute path (beginning with '/'), * e.g. /package/File.ext * @throws IOException If temporary file creation or read/write operation fails * @throws IllegalArgumentException If source file (param path) does not exist * @throws IllegalArgumentException If the path is not absolute or if the filename is shorter than * three characters */ private static void loadLibraryFromJar(String path) throws IOException, IllegalArgumentException { String temp = createTempFileFromResource(path); System.load(temp); } /** * Create a temp file that copies the resource from current JAR archive * <p/> * The file from JAR is copied into system temp file. * The temporary file is deleted after exiting. * Method uses String as filename because the pathname is "abstract", not system-dependent. * <p/> * The restrictions of {@link File#createTempFile(java.lang.String, java.lang.String)} apply to * {@code path}. * @param path Path to the resources in the jar * @return The created temp file. * @throws IOException If it failed to read the file. * @throws IllegalArgumentException If the filename is invalid. */ static String createTempFileFromResource(String path) throws IOException, IllegalArgumentException { // Obtain filename from path if (!path.startsWith("/")) { throw new IllegalArgumentException("The path has to be absolute (start with '/')."); } String[] parts = path.split("/"); String filename = (parts.length > 1) ? parts[parts.length - 1] : null; // Split filename to prefix and suffix (extension) String prefix = ""; String suffix = null; if (filename != null) { parts = filename.split("\\.", 2); prefix = parts[0]; suffix = (parts.length > 1) ? "." + parts[parts.length - 1] : null; // Thanks, davs! :-) } // Check if the filename is okay if (filename == null || prefix.length() < 3) { throw new IllegalArgumentException("The filename has to be at least 3 characters long."); } // Prepare temporary file File temp = File.createTempFile(prefix, suffix); temp.deleteOnExit(); if (!temp.exists()) { throw new FileNotFoundException("File " + temp.getAbsolutePath() + " does not exist."); } // Prepare buffer for data copying byte[] buffer = new byte[1024]; int readBytes; // Open and check input stream try (InputStream is = NativeLibLoader.class.getResourceAsStream(path); OutputStream os = new FileOutputStream(temp)) { if (is == null) { throw new FileNotFoundException("File " + path + " was not found inside JAR."); } // Open output stream and copy data between source file in JAR and the temporary file while ((readBytes = is.read(buffer)) != -1) { os.write(buffer, 0, readBytes); } } return temp.getAbsolutePath(); } /** * load native library, this method will first try to load library from java.library.path, then * try to load library in jar package. * * @param libName library path * @throws IOException exception */ private static void smartLoad(String libName) throws IOException { try { System.loadLibrary(libName); } catch (UnsatisfiedLinkError e) { try { String libraryFromJar = nativeResourcePath + System.mapLibraryName(libName); loadLibraryFromJar(libraryFromJar); } catch (IOException ioe) { logger.error("failed to load library from both native path and jar"); throw ioe; } } } /** * Add libPath to java.library.path, then native library in libPath would be load properly * * @param libPath library path * @throws IOException exception */ private static void addNativeDir(String libPath) throws IOException { try { Field field = ClassLoader.class.getDeclaredField("usr_paths"); field.setAccessible(true); String[] paths = (String[]) field.get(null); for (String path : paths) { if (libPath.equals(path)) { return; } } String[] tmp = new String[paths.length + 1]; System.arraycopy(paths, 0, tmp, 0, paths.length); tmp[paths.length] = libPath; field.set(null, tmp); } catch (IllegalAccessException e) { throw new IOException("Failed to get permissions to set library path"); } catch (NoSuchFieldException e) { throw new IOException("Failed to get field handle to set library path"); } } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/Rabit.java
package ml.dmlc.xgboost4j.java; import java.io.Serializable; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * Rabit global class for synchronization. */ public class Rabit { public enum OpType implements Serializable { MAX(0), MIN(1), SUM(2), BITWISE_OR(3); private int op; public int getOperand() { return this.op; } OpType(int op) { this.op = op; } } public enum DataType implements Serializable { CHAR(0, 1), UCHAR(1, 1), INT(2, 4), UNIT(3, 4), LONG(4, 8), ULONG(5, 8), FLOAT(6, 4), DOUBLE(7, 8), LONGLONG(8, 8), ULONGLONG(9, 8); private int enumOp; private int size; public int getEnumOp() { return this.enumOp; } public int getSize() { return this.size; } DataType(int enumOp, int size) { this.enumOp = enumOp; this.size = size; } } private static void checkCall(int ret) throws XGBoostError { if (ret != 0) { throw new XGBoostError(XGBoostJNI.XGBGetLastError()); } } // used as way to test/debug passed rabit init parameters public static Map<String, String> rabitEnvs; public static List<String> mockList = new LinkedList<>(); /** * Initialize the rabit library on current working thread. * @param envs The additional environment variables to pass to rabit. * @throws XGBoostError */ public static void init(Map<String, String> envs) throws XGBoostError { rabitEnvs = envs; String[] args = new String[envs.size() + mockList.size()]; int idx = 0; for (java.util.Map.Entry<String, String> e : envs.entrySet()) { args[idx++] = e.getKey() + '=' + e.getValue(); } // pass list of rabit mock strings eg mock=0,1,0,0 for(String mock : mockList) { args[idx++] = "mock=" + mock; } checkCall(XGBoostJNI.RabitInit(args)); } /** * Shutdown the rabit engine in current working thread, equals to finalize. * @throws XGBoostError */ public static void shutdown() throws XGBoostError { checkCall(XGBoostJNI.RabitFinalize()); } /** * Print the message on rabit tracker. * @param msg * @throws XGBoostError */ public static void trackerPrint(String msg) throws XGBoostError { checkCall(XGBoostJNI.RabitTrackerPrint(msg)); } /** * Get version number of current stored model in the thread. * which means how many calls to CheckPoint we made so far. * @return version Number. * @throws XGBoostError */ public static int versionNumber() throws XGBoostError { int[] out = new int[1]; checkCall(XGBoostJNI.RabitVersionNumber(out)); return out[0]; } /** * get rank of current thread. * @return the rank. * @throws XGBoostError */ public static int getRank() throws XGBoostError { int[] out = new int[1]; checkCall(XGBoostJNI.RabitGetRank(out)); return out[0]; } /** * get world size of current job. * @return the worldsize * @throws XGBoostError */ public static int getWorldSize() throws XGBoostError { int[] out = new int[1]; checkCall(XGBoostJNI.RabitGetWorldSize(out)); return out[0]; } /** * perform Allreduce on distributed float vectors using operator op. * This implementation of allReduce does not support customized prepare function callback in the * native code, as this function is meant for testing purposes only (to test the Rabit tracker.) * * @param elements local elements on distributed workers. * @param op operator used for Allreduce. * @return All-reduced float elements according to the given operator. */ public static float[] allReduce(float[] elements, OpType op) { DataType dataType = DataType.FLOAT; ByteBuffer buffer = ByteBuffer.allocateDirect(dataType.getSize() * elements.length) .order(ByteOrder.nativeOrder()); for (float el : elements) { buffer.putFloat(el); } buffer.flip(); XGBoostJNI.RabitAllreduce(buffer, elements.length, dataType.getEnumOp(), op.getOperand()); float[] results = new float[elements.length]; buffer.asFloatBuffer().get(results); return results; } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/RabitTracker.java
package ml.dmlc.xgboost4j.java; import java.io.*; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Java implementation of the Rabit tracker to coordinate distributed workers. * As a wrapper of the Python Rabit tracker, this implementation does not handle timeout for both * start() and waitFor() methods (i.e., the timeout is infinite.) * * For systems lacking Python environment, or for timeout functionality, consider using the Scala * Rabit tracker (ml.dmlc.xgboost4j.scala.rabit.RabitTracker) which does not depend on Python, and * provides timeout support. * * The tracker must be started on driver node before running distributed jobs. */ public class RabitTracker implements IRabitTracker { // Maybe per tracker logger? private static final Log logger = LogFactory.getLog(RabitTracker.class); // tracker python file. private static String tracker_py = null; private static TrackerProperties trackerProperties = TrackerProperties.getInstance(); // environment variable to be pased. private Map<String, String> envs = new HashMap<String, String>(); // number of workers to be submitted. private int numWorkers; private String hostIp = ""; private String pythonExec = ""; private AtomicReference<Process> trackerProcess = new AtomicReference<Process>(); static { try { initTrackerPy(); } catch (IOException ex) { logger.error("load tracker library failed."); logger.error(ex); } } /** * Tracker logger that logs output from tracker. */ private class TrackerProcessLogger implements Runnable { public void run() { Log trackerProcessLogger = LogFactory.getLog(TrackerProcessLogger.class); BufferedReader reader = new BufferedReader(new InputStreamReader( trackerProcess.get().getErrorStream())); String line; try { while ((line = reader.readLine()) != null) { trackerProcessLogger.info(line); } trackerProcess.get().waitFor(); trackerProcessLogger.info("Tracker Process ends with exit code " + trackerProcess.get().exitValue()); } catch (IOException ex) { trackerProcessLogger.error(ex.toString()); } catch (InterruptedException ie) { // we should not get here as RabitTracker is accessed in the main thread ie.printStackTrace(); logger.error("the RabitTracker thread is terminated unexpectedly"); } } } private static void initTrackerPy() throws IOException { try { tracker_py = NativeLibLoader.createTempFileFromResource("/tracker.py"); } catch (IOException ioe) { logger.trace("cannot access tracker python script"); throw ioe; } } public RabitTracker(int numWorkers) throws XGBoostError { if (numWorkers < 1) { throw new XGBoostError("numWorkers must be greater equal to one"); } this.numWorkers = numWorkers; } public RabitTracker(int numWorkers, String hostIp, String pythonExec) throws XGBoostError { this(numWorkers); this.hostIp = hostIp; this.pythonExec = pythonExec; } public void uncaughtException(Thread t, Throwable e) { logger.error("Uncaught exception thrown by worker:", e); try { Thread.sleep(5000L); } catch (InterruptedException ex) { logger.error(ex); } finally { trackerProcess.get().destroy(); } } /** * Get environments that can be used to pass to worker. * @return The environment settings. */ public Map<String, String> getWorkerEnvs() { return envs; } private void loadEnvs(InputStream ins) throws IOException { try { BufferedReader reader = new BufferedReader(new InputStreamReader(ins)); assert reader.readLine().trim().equals("DMLC_TRACKER_ENV_START"); String line; while ((line = reader.readLine()) != null) { if (line.trim().equals("DMLC_TRACKER_ENV_END")) { break; } String[] sep = line.split("="); if (sep.length == 2) { envs.put(sep[0], sep[1]); } } reader.close(); } catch (IOException ioe){ logger.error("cannot get runtime configuration from tracker process"); ioe.printStackTrace(); throw ioe; } } /** visible for testing */ public String getRabitTrackerCommand() { StringBuilder sb = new StringBuilder(); if (pythonExec == null || pythonExec.isEmpty()) { sb.append("python "); } else { sb.append(pythonExec + " "); } sb.append(" " + tracker_py + " "); sb.append(" --log-level=DEBUG" + " "); sb.append(" --num-workers=" + numWorkers + " "); // we first check the property then check the parameter String hostIpFromProperties = trackerProperties.getHostIp(); if(hostIpFromProperties != null && !hostIpFromProperties.isEmpty()) { logger.debug("Using provided host-ip: " + hostIpFromProperties + " from properties"); sb.append(" --host-ip=" + hostIpFromProperties + " "); } else if (hostIp != null & !hostIp.isEmpty()) { logger.debug("Using the parametr host-ip: " + hostIp); sb.append(" --host-ip=" + hostIp + " "); } return sb.toString(); } private boolean startTrackerProcess() { try { String cmd = getRabitTrackerCommand(); trackerProcess.set(Runtime.getRuntime().exec(cmd)); loadEnvs(trackerProcess.get().getInputStream()); return true; } catch (IOException ioe) { ioe.printStackTrace(); return false; } } public void stop() { if (trackerProcess.get() != null) { trackerProcess.get().destroy(); } } public boolean start(long timeout) { if (timeout > 0L) { logger.warn("Python RabitTracker does not support timeout. " + "The tracker will wait for all workers to connect indefinitely, unless " + "it is interrupted manually. Use the Scala RabitTracker for timeout support."); } if (startTrackerProcess()) { logger.debug("Tracker started, with env=" + envs.toString()); System.out.println("Tracker started, with env=" + envs.toString()); // also start a tracker logger Thread logger_thread = new Thread(new TrackerProcessLogger()); logger_thread.setDaemon(true); logger_thread.start(); return true; } else { logger.error("FAULT: failed to start tracker process"); stop(); return false; } } public int waitFor(long timeout) { if (timeout > 0L) { logger.warn("Python RabitTracker does not support timeout. " + "The tracker will wait for either all workers to finish tasks and send " + "shutdown signal, or manual interruptions. " + "Use the Scala RabitTracker for timeout support."); } try { trackerProcess.get().waitFor(); int returnVal = trackerProcess.get().exitValue(); logger.info("Tracker Process ends with exit code " + returnVal); stop(); return returnVal; } catch (InterruptedException e) { // we should not get here as RabitTracker is accessed in the main thread e.printStackTrace(); logger.error("the RabitTracker thread is terminated unexpectedly"); return TrackerStatus.INTERRUPTED.getStatusCode(); } } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/XGBoost.java
/* Copyright (c) 2014,2021 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.io.*; import java.util.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.fs.FileSystem; /** * trainer for xgboost * * @author hzx */ public class XGBoost { private static final Log logger = LogFactory.getLog(XGBoost.class); /** * load model from modelPath * * @param modelPath booster modelPath (model generated by booster.saveModel) * @throws XGBoostError native error */ public static Booster loadModel(String modelPath) throws XGBoostError { return Booster.loadModel(modelPath); } /** * Load a new Booster model from a file opened as input stream. * The assumption is the input stream only contains one XGBoost Model. * This can be used to load existing booster models saved by other xgboost bindings. * * @param in The input stream of the file, * will be closed after this function call. * @return The create boosted * @throws XGBoostError * @throws IOException */ public static Booster loadModel(InputStream in) throws XGBoostError, IOException { int size; byte[] buf = new byte[1<<20]; ByteArrayOutputStream os = new ByteArrayOutputStream(); while ((size = in.read(buf)) != -1) { os.write(buf, 0, size); } in.close(); return Booster.loadModel(os.toByteArray()); } /** * Load a new Booster model from a byte array buffer. * The assumption is the array only contains one XGBoost Model. * This can be used to load existing booster models saved by other xgboost bindings. * * @param buffer The byte contents of the booster. * @return The create boosted * @throws XGBoostError */ public static Booster loadModel(byte[] buffer) throws XGBoostError, IOException { return Booster.loadModel(buffer); } /** * Train a booster given parameters. * * @param dtrain Data to be trained. * @param params Parameters. * @param round Number of boosting iterations. * @param watches a group of items to be evaluated during training, this allows user to watch * performance on the validation set. * @param obj customized objective * @param eval customized evaluation * @return The trained booster. */ public static Booster train( DMatrix dtrain, Map<String, Object> params, int round, Map<String, DMatrix> watches, IObjective obj, IEvaluation eval) throws XGBoostError { return train(dtrain, params, round, watches, null, obj, eval, 0); } /** * Train a booster given parameters. * * @param dtrain Data to be trained. * @param params Parameters. * @param round Number of boosting iterations. * @param watches a group of items to be evaluated during training, this allows user to watch * performance on the validation set. * @param metrics array containing the evaluation metrics for each matrix in watches for each * iteration * @param earlyStoppingRound if non-zero, training would be stopped * after a specified number of consecutive * increases in any evaluation metric. * @param obj customized objective * @param eval customized evaluation * @return The trained booster. */ public static Booster train( DMatrix dtrain, Map<String, Object> params, int round, Map<String, DMatrix> watches, float[][] metrics, IObjective obj, IEvaluation eval, int earlyStoppingRound) throws XGBoostError { return train(dtrain, params, round, watches, metrics, obj, eval, earlyStoppingRound, null); } private static void saveCheckpoint( Booster booster, int iter, Set<Integer> checkpointIterations, ExternalCheckpointManager ecm) throws XGBoostError { try { if (checkpointIterations.contains(iter)) { ecm.updateCheckpoint(booster); } } catch (Exception e) { logger.error("failed to save checkpoint in XGBoost4J at iteration " + iter, e); throw new XGBoostError("failed to save checkpoint in XGBoost4J at iteration" + iter, e); } } public static Booster trainAndSaveCheckpoint( DMatrix dtrain, Map<String, Object> params, int numRounds, Map<String, DMatrix> watches, float[][] metrics, IObjective obj, IEvaluation eval, int earlyStoppingRounds, Booster booster, int checkpointInterval, String checkpointPath, FileSystem fs) throws XGBoostError, IOException { //collect eval matrixs String[] evalNames; DMatrix[] evalMats; float bestScore; int bestIteration; List<String> names = new ArrayList<String>(); List<DMatrix> mats = new ArrayList<DMatrix>(); Set<Integer> checkpointIterations = new HashSet<>(); ExternalCheckpointManager ecm = null; if (checkpointPath != null) { ecm = new ExternalCheckpointManager(checkpointPath, fs); } for (Map.Entry<String, DMatrix> evalEntry : watches.entrySet()) { names.add(evalEntry.getKey()); mats.add(evalEntry.getValue()); } evalNames = names.toArray(new String[names.size()]); evalMats = mats.toArray(new DMatrix[mats.size()]); if (isMaximizeEvaluation(params)) { bestScore = -Float.MAX_VALUE; } else { bestScore = Float.MAX_VALUE; } bestIteration = 0; metrics = metrics == null ? new float[evalNames.length][numRounds] : metrics; //collect all data matrixs DMatrix[] allMats; if (evalMats.length > 0) { allMats = new DMatrix[evalMats.length + 1]; allMats[0] = dtrain; System.arraycopy(evalMats, 0, allMats, 1, evalMats.length); } else { allMats = new DMatrix[1]; allMats[0] = dtrain; } //initialize booster if (booster == null) { // Start training on a new booster booster = Booster.newBooster(params, allMats); booster.loadRabitCheckpoint(); } else { // Start training on an existing booster booster.setParams(params); } if (ecm != null) { checkpointIterations = new HashSet<>(ecm.getCheckpointRounds(checkpointInterval, numRounds)); } // begin to train for (int iter = booster.getVersion() / 2; iter < numRounds; iter++) { if (booster.getVersion() % 2 == 0) { if (obj != null) { booster.update(dtrain, obj); } else { booster.update(dtrain, iter); } saveCheckpoint(booster, iter, checkpointIterations, ecm); booster.saveRabitCheckpoint(); } //evaluation if (evalMats.length > 0) { float[] metricsOut = new float[evalMats.length]; String evalInfo; if (eval != null) { evalInfo = booster.evalSet(evalMats, evalNames, eval, metricsOut); } else { evalInfo = booster.evalSet(evalMats, evalNames, iter, metricsOut); } for (int i = 0; i < metricsOut.length; i++) { metrics[i][iter] = metricsOut[i]; } // If there is more than one evaluation datasets, the last one would be used // to determinate early stop. float score = metricsOut[metricsOut.length - 1]; if (isMaximizeEvaluation(params)) { // Update best score if the current score is better (no update when equal) if (score > bestScore) { bestScore = score; bestIteration = iter; booster.setAttr("best_iteration", String.valueOf(bestIteration)); booster.setAttr("best_score", String.valueOf(bestScore)); } } else { if (score < bestScore) { bestScore = score; bestIteration = iter; booster.setAttr("best_iteration", String.valueOf(bestIteration)); booster.setAttr("best_score", String.valueOf(bestScore)); } } if (shouldEarlyStop(earlyStoppingRounds, iter, bestIteration)) { if (shouldPrint(params, iter)) { Rabit.trackerPrint(String.format( "early stopping after %d rounds away from the best iteration", earlyStoppingRounds )); } break; } if (Rabit.getRank() == 0 && shouldPrint(params, iter)) { if (shouldPrint(params, iter)){ Rabit.trackerPrint(evalInfo + '\n'); } } } booster.saveRabitCheckpoint(); } return booster; } /** * Train a booster given parameters. * * @param dtrain Data to be trained. * @param params Parameters. * @param round Number of boosting iterations. * @param watches a group of items to be evaluated during training, this allows user to watch * performance on the validation set. * @param metrics array containing the evaluation metrics for each matrix in watches for each * iteration * @param earlyStoppingRounds if non-zero, training would be stopped * after a specified number of consecutive * goes to the unexpected direction in any evaluation metric. * @param obj customized objective * @param eval customized evaluation * @param booster train from scratch if set to null; train from an existing booster if not null. * @return The trained booster. */ public static Booster train( DMatrix dtrain, Map<String, Object> params, int round, Map<String, DMatrix> watches, float[][] metrics, IObjective obj, IEvaluation eval, int earlyStoppingRounds, Booster booster) throws XGBoostError { try { return trainAndSaveCheckpoint(dtrain, params, round, watches, metrics, obj, eval, earlyStoppingRounds, booster, -1, null, null); } catch (IOException e) { logger.error("training failed in xgboost4j", e); throw new XGBoostError("training failed in xgboost4j ", e); } } private static Integer tryGetIntFromObject(Object o) { if (o instanceof Integer) { return (int)o; } else if (o instanceof String) { try { return Integer.parseInt((String)o); } catch (NumberFormatException e) { return null; } } else { return null; } } private static boolean shouldPrint(Map<String, Object> params, int iter) { Object silent = params.get("silent"); Integer silentInt = tryGetIntFromObject(silent); if (silent != null) { if (silent.equals("true") || silent.equals("True") || (silentInt != null && silentInt != 0)) { return false; // "silent" will stop printing, otherwise go look at "verbose_eval" } } Object verboseEval = params.get("verbose_eval"); Integer verboseEvalInt = tryGetIntFromObject(verboseEval); if (verboseEval == null) { return true; // Default to printing evalInfo } else if (verboseEval.equals("false") || verboseEval.equals("False")) { return false; } else if (verboseEvalInt != null) { if (verboseEvalInt == 0) { return false; } else { return iter % verboseEvalInt == 0; } } else { return true; // Don't understand the option, default to printing } } static boolean shouldEarlyStop(int earlyStoppingRounds, int iter, int bestIteration) { if (earlyStoppingRounds <= 0) { return false; } return iter - bestIteration >= earlyStoppingRounds; } private static boolean isMaximizeEvaluation(Map<String, Object> params) { try { String maximize = String.valueOf(params.get("maximize_evaluation_metrics")); assert(maximize != null); return Boolean.valueOf(maximize); } catch (Exception ex) { logger.error("maximize_evaluation_metrics has to be specified for enabling early stop," + " allowed value: true/false", ex); throw ex; } } /** * Cross-validation with given parameters. * * @param data Data to be trained. * @param params Booster params. * @param round Number of boosting iterations. * @param nfold Number of folds in CV. * @param metrics Evaluation metrics to be watched in CV. * @param obj customized objective (set to null if not used) * @param eval customized evaluation (set to null if not used) * @return evaluation history * @throws XGBoostError native error */ public static String[] crossValidation( DMatrix data, Map<String, Object> params, int round, int nfold, String[] metrics, IObjective obj, IEvaluation eval) throws XGBoostError { CVPack[] cvPacks = makeNFold(data, nfold, params, metrics); String[] evalHist = new String[round]; String[] results = new String[cvPacks.length]; for (int i = 0; i < round; i++) { for (CVPack cvPack : cvPacks) { if (obj != null) { cvPack.update(obj); } else { cvPack.update(i); } } for (int j = 0; j < cvPacks.length; j++) { if (eval != null) { results[j] = cvPacks[j].eval(eval); } else { results[j] = cvPacks[j].eval(i); } } evalHist[i] = aggCVResults(results); logger.info(evalHist[i]); } return evalHist; } /** * make an n-fold array of CVPack from random indices * * @param data original data * @param nfold num of folds * @param params booster parameters * @param evalMetrics Evaluation metrics * @return CV package array * @throws XGBoostError native error */ private static CVPack[] makeNFold(DMatrix data, int nfold, Map<String, Object> params, String[] evalMetrics) throws XGBoostError { List<Integer> samples = genRandPermutationNums(0, (int) data.rowNum()); int step = samples.size() / nfold; int[] testSlice = new int[step]; int[] trainSlice = new int[samples.size() - step]; int testid, trainid; CVPack[] cvPacks = new CVPack[nfold]; for (int i = 0; i < nfold; i++) { testid = 0; trainid = 0; for (int j = 0; j < samples.size(); j++) { if (j > (i * step) && j < (i * step + step) && testid < step) { testSlice[testid] = samples.get(j); testid++; } else { if (trainid < samples.size() - step) { trainSlice[trainid] = samples.get(j); trainid++; } else { testSlice[testid] = samples.get(j); testid++; } } } DMatrix dtrain = data.slice(trainSlice); DMatrix dtest = data.slice(testSlice); CVPack cvPack = new CVPack(dtrain, dtest, params); //set eval types if (evalMetrics != null) { for (String type : evalMetrics) { cvPack.booster.setParam("eval_metric", type); } } cvPacks[i] = cvPack; } return cvPacks; } private static List<Integer> genRandPermutationNums(int start, int end) { List<Integer> samples = new ArrayList<Integer>(); for (int i = start; i < end; i++) { samples.add(i); } Collections.shuffle(samples); return samples; } /** * Aggregate cross-validation results. * * @param results eval info from each data sample * @return cross-validation eval info */ private static String aggCVResults(String[] results) { Map<String, List<Float>> cvMap = new HashMap<String, List<Float>>(); String aggResult = results[0].split("\t")[0]; for (String result : results) { String[] items = result.split("\t"); for (int i = 1; i < items.length; i++) { String[] tup = items[i].split(":"); String key = tup[0]; Float value = Float.valueOf(tup[1]); if (!cvMap.containsKey(key)) { cvMap.put(key, new ArrayList<Float>()); } cvMap.get(key).add(value); } } for (String key : cvMap.keySet()) { float value = 0f; for (Float tvalue : cvMap.get(key)) { value += tvalue; } value /= cvMap.get(key).size(); aggResult += String.format("\tcv-%s:%f", key, value); } return aggResult; } /** * cross validation package for xgb * * @author hzx */ private static class CVPack { DMatrix dtrain; DMatrix dtest; DMatrix[] dmats; String[] names; Booster booster; /** * create an cross validation package * * @param dtrain train data * @param dtest test data * @param params parameters * @throws XGBoostError native error */ public CVPack(DMatrix dtrain, DMatrix dtest, Map<String, Object> params) throws XGBoostError { dmats = new DMatrix[]{dtrain, dtest}; booster = Booster.newBooster(params, dmats); names = new String[]{"train", "test"}; this.dtrain = dtrain; this.dtest = dtest; } /** * update one iteration * * @param iter iteration num * @throws XGBoostError native error */ public void update(int iter) throws XGBoostError { booster.update(dtrain, iter); } /** * update one iteration * * @param obj customized objective * @throws XGBoostError native error */ public void update(IObjective obj) throws XGBoostError { booster.update(dtrain, obj); } /** * evaluation * * @param iter iteration num * @return evaluation * @throws XGBoostError native error */ public String eval(int iter) throws XGBoostError { return booster.evalSet(dmats, names, iter); } /** * evaluation * * @param eval customized eval * @return evaluation * @throws XGBoostError native error */ public String eval(IEvaluation eval) throws XGBoostError { return booster.evalSet(dmats, names, eval); } } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/XGBoostError.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; /** * custom error class for xgboost * * @author hzx */ public class XGBoostError extends Exception { public XGBoostError(String message) { super(message); } public XGBoostError(String message, Throwable cause) { super(message, cause); } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/XGBoostJNI.java
/* Copyright (c) 2014-2022 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java; import java.nio.ByteBuffer; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * xgboost JNI functions * change 2015-7-6: *use a long[] (length=1) as container of handle to get the output DMatrix or Booster * * @author hzx */ class XGBoostJNI { private static final Log logger = LogFactory.getLog(DMatrix.class); static { try { NativeLibLoader.initXGBoost(); } catch (Exception ex) { logger.error("Failed to load native library", ex); throw new RuntimeException(ex); } } /** * Check the return code of the JNI call. * * @throws XGBoostError if the call failed. */ static void checkCall(int ret) throws XGBoostError { if (ret != 0) { throw new XGBoostError(XGBGetLastError()); } } public final static native String XGBGetLastError(); public final static native int XGDMatrixCreateFromFile(String fname, int silent, long[] out); final static native int XGDMatrixCreateFromDataIter(java.util.Iterator<DataBatch> iter, String cache_info, long[] out); public final static native int XGDMatrixCreateFromCSREx(long[] indptr, int[] indices, float[] data, int shapeParam, long[] out); public final static native int XGDMatrixCreateFrom2DCSREx(long[][] indptr, int[][] indices, float[][] data, int shapeParam, int shapeParam2, long ndata, long[] out); public final static native int XGDMatrixCreateFromCSCEx(long[] colptr, int[] indices, float[] data, int shapeParam, long[] out); public final static native int XGDMatrixCreateFrom2DCSCEx(long[][] colptr, int[][] indices, float[][] data, int shapeParam, int shapeParam2, long ndata, long[] out); public final static native int XGDMatrixCreateFromMat(float[] data, int nrow, int ncol, float missing, long[] out); public final static native int XGDMatrixCreateFromMatRef(long dataRef, int nrow, int ncol, float missing, long[] out); public final static native int XGDMatrixSliceDMatrix(long handle, int[] idxset, long[] out); public final static native int XGDMatrixFree(long handle); public final static native int XGDMatrixSaveBinary(long handle, String fname, int silent); public final static native int XGDMatrixSetFloatInfo(long handle, String field, float[] array); public final static native int XGDMatrixSetUIntInfo(long handle, String field, int[] array); public final static native int XGDMatrixGetFloatInfo(long handle, String field, float[][] info); public final static native int XGDMatrixGetUIntInfo(long handle, String filed, int[][] info); public final static native int XGDMatrixNumRow(long handle, long[] row); public final static native int XGBoosterCreate(long[] handles, long[] out); public final static native int XGBoosterFree(long handle); public final static native int XGBoosterSetParam(long handle, String name, String value); public final static native int XGBoosterUpdateOneIter(long handle, int iter, long dtrain); public final static native int XGBoosterBoostOneIter(long handle, long dtrain, float[] grad, float[] hess); public final static native int XGBoosterEvalOneIter(long handle, int iter, long[] dmats, String[] evnames, String[] eval_info); public final static native int XGBoosterPredict(long handle, long dmat, int option_mask, int ntree_limit, float[][] predicts); public final static native int XGBoosterLoadModel(long handle, String fname); public final static native int XGBoosterSaveModel(long handle, String fname); public final static native int XGBoosterLoadModelFromBuffer(long handle, byte[] bytes); public final static native int XGBoosterSaveModelToBuffer(long handle, String format, byte[][] out_bytes); public final static native int XGBoosterDumpModelEx(long handle, String fmap, int with_stats, String format, String[][] out_strings); public final static native int XGBoosterDumpModelExWithFeatures( long handle, String[] feature_names, int with_stats, String format, String[][] out_strings); public final static native int XGBoosterGetAttrNames(long handle, String[][] out_strings); public final static native int XGBoosterGetAttr(long handle, String key, String[] out_string); public final static native int XGBoosterSetAttr(long handle, String key, String value); public final static native int XGBoosterLoadRabitCheckpoint(long handle, int[] out_version); public final static native int XGBoosterSaveRabitCheckpoint(long handle); public final static native int XGBoosterGetNumFeature(long handle, long[] feature); // rabit functions public final static native int RabitInit(String[] args); public final static native int RabitFinalize(); public final static native int RabitTrackerPrint(String msg); public final static native int RabitGetRank(int[] out); public final static native int RabitGetWorldSize(int[] out); public final static native int RabitVersionNumber(int[] out); // Perform Allreduce operation on data in sendrecvbuf. // This JNI function does not support the callback function for data preparation yet. final static native int RabitAllreduce(ByteBuffer sendrecvbuf, int count, int enum_dtype, int enum_op); public final static native int XGDMatrixSetInfoFromInterface( long handle, String field, String json); public final static native int XGDeviceQuantileDMatrixCreateFromCallback( java.util.Iterator<ColumnBatch> iter, float missing, int nthread, int maxBin, long[] out); public final static native int XGDMatrixCreateFromArrayInterfaceColumns( String featureJson, float missing, int nthread, long[] out); }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/util/BigDenseMatrix.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java.util; /** * Off-heap implementation of a Dense Matrix, matrix size is only limited by the * amount of the available memory and the matrix dimension cannot exceed * Integer.MAX_VALUE (this is consistent with XGBoost API restrictions on maximum * length of a response). */ public final class BigDenseMatrix { private static final int FLOAT_BYTE_SIZE = 4; public static final long MAX_MATRIX_SIZE = Long.MAX_VALUE / FLOAT_BYTE_SIZE; public final int nrow; public final int ncol; public final long address; public static void setDirect(long valAddress, float val) { UtilUnsafe.UNSAFE.putFloat(valAddress, val); } public static float getDirect(long valAddress) { return UtilUnsafe.UNSAFE.getFloat(valAddress); } public BigDenseMatrix(int nrow, int ncol) { final long size = (long) nrow * ncol; if (size > MAX_MATRIX_SIZE) { throw new IllegalArgumentException("Matrix too large; matrix size cannot exceed " + MAX_MATRIX_SIZE); } this.nrow = nrow; this.ncol = ncol; this.address = UtilUnsafe.UNSAFE.allocateMemory(size * FLOAT_BYTE_SIZE); } public final void set(long idx, float val) { setDirect(address + idx * FLOAT_BYTE_SIZE, val); } public final void set(int i, int j, float val) { set(index(i, j), val); } public final float get(long idx) { return getDirect(address + idx * FLOAT_BYTE_SIZE); } public final float get(int i, int j) { return get(index(i, j)); } public final void dispose() { UtilUnsafe.UNSAFE.freeMemory(address); } private long index(int i, int j) { return (long) i * ncol + j; } }
0
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java
java-sources/ai/h2o/xgboost4j_2.12/1.6.1.24/ml/dmlc/xgboost4j/java/util/UtilUnsafe.java
/* Copyright (c) 2014 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ml.dmlc.xgboost4j.java.util; import java.lang.reflect.Field; import sun.misc.Unsafe; /** * Simple class to obtain access to the {@link Unsafe} object. Use responsibly :) */ public final class UtilUnsafe { static Unsafe UNSAFE = getUnsafe(); private UtilUnsafe() { } // dummy private constructor private static Unsafe getUnsafe() { // Not on bootclasspath if (UtilUnsafe.class.getClassLoader() == null) { return Unsafe.getUnsafe(); } try { final Field fld = Unsafe.class.getDeclaredField("theUnsafe"); fld.setAccessible(true); return (Unsafe) fld.get(UtilUnsafe.class); } catch (Exception e) { throw new RuntimeException("Could not obtain access to sun.misc.Unsafe", e); } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/common/SockTransportProperties.java
package com.mapd.common; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.SSLSocketFactory; import org.apache.http.conn.ssl.X509HostnameVerifier; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContextBuilder; import org.apache.http.ssl.SSLContexts; import org.apache.thrift.transport.THttpClient; import org.apache.thrift.transport.TSSLTransportFactory; import org.apache.thrift.transport.TServerSocket; import org.apache.thrift.transport.TServerTransport; import org.apache.thrift.transport.TSocket; import org.apache.thrift.transport.TTransport; import org.slf4j.LoggerFactory; import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.Arrays; import javax.net.ssl.KeyManager; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; public class SockTransportProperties { final static org.slf4j.Logger HEAVYDBLOGGER = LoggerFactory.getLogger(SockTransportProperties.class); /* * The following static 'factory' methods have been added to make usage of this * class simpler. The previously defined constructors have been left public to * limit the scope of the current change, though ideally they should be removed * and the calling code replaced with use of these static methods. */ /** Unencrypted Client method */ static public SockTransportProperties getUnencryptedClient() throws Exception { boolean validate_server_name = false; return new SockTransportProperties( TransportType.unencryptedClient, validate_server_name); } /** Encrypted Client method */ static public SockTransportProperties getEncryptedClientDefaultTrustStore( boolean validate_server_name) throws Exception { return new SockTransportProperties( TransportType.encryptedClientDefaultTrustStore, validate_server_name); } // TODO for simplicity this method should be removed static public SockTransportProperties getEncryptedClientSpecifiedTrustStore( String trustStoreName, String trustStorePassword) throws Exception { return getEncryptedClientSpecifiedTrustStore( trustStoreName, trustStorePassword, true); } static public SockTransportProperties getEncryptedClientSpecifiedTrustStore( String trustStoreName, String trustStorePassword, boolean validate_server_name) throws Exception { return new SockTransportProperties(TransportType.encryptedClientSpecifiedTrustStore, trustStoreName, trustStorePassword, validate_server_name); } /** Server methods */ static public SockTransportProperties getEncryptedServer( String keyStoreName, String keyStorePassword) throws Exception { boolean validate_server_name = false; if (keyStoreName == null || keyStorePassword == null) { String errStr = new String( "Invalid null parameter(s) used for getEncryptedServer. Both keyStoreName and keyStorePassword must be specified"); RuntimeException rE = new RuntimeException(errStr); HEAVYDBLOGGER.error(errStr, rE); throw(rE); } return new SockTransportProperties(TransportType.encryptedServer, keyStoreName, keyStorePassword, validate_server_name); } static public SockTransportProperties getUnecryptedServer() throws Exception { boolean validate_server_name = false; return new SockTransportProperties( TransportType.unencryptedServer, validate_server_name); } /** End static method */ // There are nominally 5 different 'types' of this class. private enum TransportType { encryptedServer, unencryptedServer, unencryptedClient, encryptedClientDefaultTrustStore, encryptedClientSpecifiedTrustStore } /** public constructor (for backward compatibility) */ public SockTransportProperties(String truststore_name, String truststore_passwd) throws Exception { this(TransportType.encryptedClientSpecifiedTrustStore, truststore_name, truststore_passwd, true); } /** private constructors called from public static methods */ private SockTransportProperties(TransportType tT, String store_name, String passwd, boolean validate_server_name) throws Exception { x509HostnameVerifier_ = (validate_server_name == true) ? SSLConnectionSocketFactory.STRICT_HOSTNAME_VERIFIER : SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER; transportType = tT; char[] store_password = "".toCharArray(); if (passwd != null && !passwd.isEmpty()) { store_password = passwd.toCharArray(); } switch (transportType) { case encryptedServer: { key_store_password = store_password; key_store_name = store_name; break; } case encryptedClientSpecifiedTrustStore: { if (store_name == null) { initializeAcceptedIssuers(null); } else { KeyStore trust_store = KeyStore.getInstance(KeyStore.getDefaultType()); try { java.io.FileInputStream fis = new java.io.FileInputStream(store_name); trust_store.load(fis, store_password); } catch (Exception eX) { String err_str = new String("Error loading key/trust store [" + store_name + "]"); HEAVYDBLOGGER.error(err_str, eX); throw(eX); } initializeAcceptedIssuers(trust_store); } break; } default: { String errStr = new String( "Invalid transportType [" + transportType + "] used in constructor"); RuntimeException rE = new RuntimeException(errStr); HEAVYDBLOGGER.error(errStr, rE); throw(rE); } } } private SockTransportProperties( TransportType transportType, boolean validate_server_name) throws Exception { x509HostnameVerifier_ = (validate_server_name == true) ? SSLConnectionSocketFactory.STRICT_HOSTNAME_VERIFIER : SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER; this.transportType = transportType; switch (transportType) { case encryptedClientDefaultTrustStore: // load default trust_store initializeAcceptedIssuers((KeyStore) null); break; case unencryptedClient: case unencryptedServer: break; default: String errStr = new String( "Invalid transportType [" + transportType + "] used in constructor"); RuntimeException rE = new RuntimeException(errStr); HEAVYDBLOGGER.error(errStr, rE); throw(rE); } } /** end private constructors */ private void initializeAcceptedIssuers(KeyStore trust_store) throws Exception { // Initialize a trust manager to either the trust store already loaded or the // default trust store. Order of searching for default is: // 1. system property javax.net.ssl.trustStore // 2. <java-home>/lib/security/jssecacerts // 3. <java-home</lib/security/cacerts TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("PKIX"); // If trust_store is null init will load the default trust_store trustManagerFactory.init(trust_store); trustManagers = trustManagerFactory.getTrustManagers(); } /* * public client open transport methods * * openClientTransport opensHttpClientTransport, openHttpsClientTransport * */ public TTransport openClientTransport(String server_host, int port) throws org.apache.thrift.TException { TTransport tTransport = null; switch (transportType) { case encryptedClientDefaultTrustStore: case encryptedClientSpecifiedTrustStore: tTransport = openBinaryEncrypted(server_host, port); break; case unencryptedClient: tTransport = new TSocket(server_host, port); break; default: String errStr = new String("Invalid transportType [" + transportType + "] used in openClientTransport"); RuntimeException rE = new RuntimeException(errStr); HEAVYDBLOGGER.error(errStr, rE); throw(rE); } return tTransport; } private TTransport openBinaryEncrypted(String server_host, int port) throws org.apache.thrift.TException { // Used to set Socket.setSoTimeout ms. 0 == inifinite. int socket_so_timeout_ms = 0; TSocket tsocket = null; try { SSLContext sc = SSLContext.getInstance("TLS"); sc.init(null, trustManagers, new java.security.SecureRandom()); SSLSocket sx = (SSLSocket) sc.getSocketFactory().createSocket(server_host, port); sx.setSoTimeout(socket_so_timeout_ms); tsocket = new TSocket(sx); } catch (Exception ex) { String errStr = new String("Error openBinaryEncrypted [" + server_host + ":" + port + "] used in openClientTransport - "); errStr += ex.toString(); RuntimeException rE = new RuntimeException(errStr); HEAVYDBLOGGER.error(errStr, rE); throw(rE); } return tsocket; } public TTransport openHttpsClientTransport(String server_host, int port) throws Exception { if (transportType != TransportType.encryptedClientDefaultTrustStore && transportType != TransportType.encryptedClientSpecifiedTrustStore) { String errStr = new String("Invalid transportType [" + transportType + "] used in openHttpsClientTransport"); RuntimeException rE = new RuntimeException(errStr); HEAVYDBLOGGER.error(errStr, rE); throw(rE); } TTransport transport = null; try { SSLContext sc = SSLContext.getInstance("TLS"); sc.init(null, trustManagers, new java.security.SecureRandom()); SSLConnectionSocketFactory sslConnectionSocketFactory = null; sslConnectionSocketFactory = new SSLConnectionSocketFactory(sc, x509HostnameVerifier_); CloseableHttpClient closeableHttpClient = HttpClients.custom() .setSSLSocketFactory(sslConnectionSocketFactory) .build(); transport = new THttpClient("https://" + server_host + ":" + port, closeableHttpClient); } catch (Exception ex) { String err_str = new String("Exception:" + ex.getClass().getCanonicalName() + " thrown. Unable to create Secure socket for the HTTPS connection"); HEAVYDBLOGGER.error(err_str, ex); throw ex; } return transport; } public TTransport openHttpClientTransport(String server_host, int port) throws org.apache.thrift.TException { if (transportType != TransportType.unencryptedClient) { String errStr = new String("Invalid transportType [" + transportType + "] used in openHttpClientTransport"); RuntimeException rE = new RuntimeException(errStr); HEAVYDBLOGGER.error(errStr, rE); throw(rE); } String url = "http://" + server_host + ":" + port; return (new THttpClient(url)); } /* * open Binary Server transport *** */ public TServerTransport openServerTransport(int port) throws org.apache.thrift.TException { if (transportType == TransportType.encryptedServer) { return openServerTransportEncrypted(port); } else if (transportType == TransportType.unencryptedServer) { return (new TServerSocket(port)); } else { String errStr = new String("Invalid transportType [" + transportType + "] used in openServerTransport"); RuntimeException rE = new RuntimeException(errStr); HEAVYDBLOGGER.error(errStr, rE); throw(rE); } } private TServerTransport openServerTransportEncrypted(int port) throws org.apache.thrift.TException { // Used to set Socket.setSoTimeout ms. 0 == inifinite. int socket_so_timeout_ms = 0; TSSLTransportFactory.TSSLTransportParameters params = new TSSLTransportFactory.TSSLTransportParameters(); params.setKeyStore(key_store_name, (key_store_password != null) ? new String(key_store_password) : null); params.requireClientAuth(false); // return TSSLTransportFactory.getClientSocket(server_host, port, // socket_so_timeout_ms, params); TServerTransport t = TSSLTransportFactory.getServerSocket( port, socket_so_timeout_ms, null, params); return t; } private TrustManager[] trustManagers; private TransportType transportType = null; private KeyManager[] keyManagers; private String key_store_name = null; private char[] key_store_password = null; X509HostnameVerifier x509HostnameVerifier_ = SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER; }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIArray.java
package ai.heavy.jdbc; import static java.lang.Math.toIntExact; import java.math.BigDecimal; import java.sql.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.Map; import ai.heavy.thrift.server.*; public class HeavyAIArray implements java.sql.Array { private TDatumType type; private Object[] elements; public HeavyAIArray(TDatumType type, Object[] elements) throws SQLException { if (elements == null) { throw new SQLException("Elements[] cannot be null"); } this.type = type; this.elements = elements; Class<?> elements_class = elements.getClass().getComponentType(); switch (type) { case TINYINT: checkClass(elements_class, Byte.class); break; case SMALLINT: checkClass(elements_class, Short.class); break; case INT: checkClass(elements_class, Integer.class); break; case BIGINT: checkClass(elements_class, Long.class); break; case BOOL: checkClass(elements_class, Boolean.class); break; case TIME: checkClass(elements_class, java.sql.Time.class); break; case TIMESTAMP: checkClass(elements_class, java.sql.Timestamp.class); break; case DATE: checkClass(elements_class, java.sql.Date.class); break; case FLOAT: checkClass(elements_class, Float.class); break; case DECIMAL: checkClass(elements_class, BigDecimal.class); break; case DOUBLE: checkClass(elements_class, Double.class); break; case STR: case POINT: case LINESTRING: case MULTILINESTRING: case POLYGON: case MULTIPOLYGON: checkClass(elements_class, String.class); break; default: throw new AssertionError(type.toString()); } } @Override public String getBaseTypeName() throws SQLException { return type.name(); } @Override public int getBaseType() throws SQLException { return HeavyAIType.toJava(type); } @Override public Object getArray() throws SQLException { return elements; } @Override public Object getArray(long start, int size) throws SQLException { checkSize(toIntExact(start), size); return Arrays.copyOfRange(elements, toIntExact(start), size); } @Override public ResultSet getResultSet() throws SQLException { return getResultSet(0, elements.length); } @Override public ResultSet getResultSet(long start, int size) throws SQLException { checkSize(toIntExact(start), size); ArrayList<TColumnType> columnTypes = new ArrayList<>(2); TTypeInfo idxType = new TTypeInfo(TDatumType.BIGINT, TEncodingType.NONE, false, false, 0, 0, 0); columnTypes.add(new TColumnType("INDEX", idxType, false, "", false, false, 0)); // @NOTE(Max): The problem here is that it's hard to know precision and scale. // But it looks like we don't use those anywhere in ResultSet ??? int precision = (type == TDatumType.TIMESTAMP || type == TDatumType.TIME || type == TDatumType.DATE ? 3 : 0); TTypeInfo valueType = new TTypeInfo(type, TEncodingType.NONE, true, false, precision, 0, 0); columnTypes.add(new TColumnType("VALUE", valueType, false, "", false, false, 1)); Long[] indexes = new Long[size]; // indexes in SQL arrays start from 1 for (int i = 0; i < size; ++i) { indexes[i] = (long) (i + 1); } TColumnData idxData = new TColumnData(Arrays.asList(indexes), null, null, null); ArrayList<Boolean> idxNulls = new ArrayList<>(size); for (int i = 0; i < size; ++i) { idxNulls.add(Boolean.FALSE); } TColumnData valuesData; Long[] int_values = new Long[size]; Double[] real_values = new Double[size]; String[] string_values = new String[size]; boolean is_real = false, is_string = false; ArrayList<Boolean> valueNulls = new ArrayList<>(size); for (int i = toIntExact(start); i < start + size; ++i) { if (elements[i] == null) { valueNulls.add(true); } else { valueNulls.add(false); switch (type) { case TINYINT: int_values[i] = ((Byte) elements[i]).longValue(); break; case SMALLINT: int_values[i] = ((Short) elements[i]).longValue(); break; case INT: int_values[i] = ((Integer) elements[i]).longValue(); break; case BIGINT: int_values[i] = (Long) elements[i]; break; case BOOL: int_values[i] = elements[i] == Boolean.TRUE ? 1l : 0l; break; case TIME: int_values[i] = ((Time) elements[i]).getTime(); break; case TIMESTAMP: int_values[i] = ((Timestamp) elements[i]).getTime(); break; case DATE: int_values[i] = ((Date) elements[i]).getTime(); break; case FLOAT: is_real = true; real_values[i] = ((Float) elements[i]).doubleValue(); break; case DECIMAL: is_real = true; real_values[i] = ((BigDecimal) elements[i]).doubleValue(); break; case DOUBLE: is_real = true; real_values[i] = (Double) elements[i]; break; case STR: case POINT: case LINESTRING: case MULTILINESTRING: case POLYGON: case MULTIPOLYGON: is_string = true; string_values[i] = (String) elements[i]; break; default: throw new AssertionError(type.toString()); } } } if (is_real) { valuesData = new TColumnData(null, Arrays.asList(real_values), null, null); } else if (is_string) { valuesData = new TColumnData(null, null, Arrays.asList(string_values), null); } else { valuesData = new TColumnData(Arrays.asList(int_values), null, null, null); } ArrayList<TColumn> columns = new ArrayList<>(2); columns.add(new TColumn(idxData, idxNulls)); columns.add(new TColumn(valuesData, valueNulls)); TRowSet rowSet = new TRowSet(columnTypes, null, columns, true); TQueryResult result = new TQueryResult(rowSet, 0, 0, "", "", true, TQueryType.READ); return new HeavyAIResultSet(result, ""); } @Override public void free() throws SQLException { elements = null; } @Override public String toString() { if (elements == null) { return "NULL"; } else { switch (type) { case STR: case POINT: case LINESTRING: case MULTILINESTRING: case POLYGON: case MULTIPOLYGON: case TIME: case TIMESTAMP: case DATE: { StringBuilder sb = new StringBuilder("{"); for (Object e : elements) { if (e != null) { sb.append("'").append(e.toString()).append("', "); } else { sb.append("NULL").append(", "); } } if (elements.length > 0) { sb.delete(sb.length() - 2, sb.length()); } sb.append("}"); return sb.toString(); } default: { String arr_str = Arrays.toString(elements); return "{" + arr_str.substring(1, arr_str.length() - 1) + "}"; } } } } @Override public ResultSet getResultSet(long start, int size, Map<String, Class<?>> map) throws SQLException { throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getResultSet(Map<String, Class<?>> map) throws SQLException { throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Object getArray(long start, int size, Map<String, Class<?>> map) throws SQLException { throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Object getArray(Map<String, Class<?>> map) throws SQLException { throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } private void checkSize(int start, int size) throws SQLException { if (start < 0 || start >= elements.length || start + size > elements.length) { throw new SQLException("Array length = " + Integer.toString(elements.length) + ", slice start index = " + Integer.toString(start) + ", slice length = " + Integer.toString(size)); } } private void checkClass(Class<?> given, Class<?> expected) throws SQLException { if (!expected.isAssignableFrom(given)) { throw new SQLException("For array of " + getBaseTypeName() + ", elements of type " + expected + " are expected. Got " + given + " instead"); } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIConnection.java
/* * Copyright 2022 HEAVY.AI, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.heavy.jdbc; import com.mapd.common.SockTransportProperties; import org.apache.thrift.TException; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TJSONProtocol; import org.apache.thrift.protocol.TProtocol; import org.apache.thrift.transport.TTransport; import org.apache.thrift.transport.TTransportException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; import java.security.*; import java.security.cert.X509Certificate; import java.sql.Array; import java.sql.Blob; import java.sql.CallableStatement; import java.sql.Clob; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.NClob; import java.sql.PreparedStatement; import java.sql.SQLClientInfoException; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.SQLXML; import java.sql.Savepoint; import java.sql.Statement; import java.sql.Struct; import java.util.*; import java.util.concurrent.Executor; import javax.crypto.Cipher; import ai.heavy.thrift.server.Heavy; import ai.heavy.thrift.server.TDBException; import ai.heavy.thrift.server.TDatumType; import ai.heavy.thrift.server.TServerStatus; import sun.security.provider.X509Factory; class KeyLoader { static class S_struct { public String cert; public Key key; } public static String getX509(X509Certificate cert) throws Exception { String encoded = Base64.getMimeEncoder().encodeToString(cert.getEncoded()); // Note mimeEncoder inserts \r\n in the text - the server is okay with that. encoded = X509Factory.BEGIN_CERT + "\n" + encoded + "\n" + X509Factory.END_CERT; return encoded; } public static S_struct getDetails_pkcs12(String filename, String password) throws Exception { S_struct s_struct = new S_struct(); try { KeyStore keystore = KeyStore.getInstance("PKCS12"); java.io.FileInputStream fis = new java.io.FileInputStream(filename); keystore.load(fis, password.toCharArray()); String alias = null; Enumeration<String> eE = keystore.aliases(); int count = 0; while (eE.hasMoreElements()) { alias = eE.nextElement(); count++; } if (count != 1) { throw new SQLException("pkcs12 file [" + filename + "] contains an incorrect number [" + count + "] of certificate(s); only a single certificate is allowed"); } X509Certificate cert = (X509Certificate) keystore.getCertificate(alias); s_struct.cert = getX509(cert); s_struct.key = keystore.getKey(alias, password.toCharArray()); } catch (Exception eX) { HeavyAIConnection.logger.error(eX.getMessage()); throw eX; } return s_struct; } } class Options { // The Options class supplies the keys for the // Connection_properties class static String host_name = "host_name"; static String port_num = "port_num"; static String db_name = "db_name"; static String protocol = "protocol"; static String server_trust_store = "server_trust_store"; static String server_trust_store_pwd = "server_trust_store_pwd"; static String pkiauth = "pkiauth"; static String sslcert = "sslcert"; static String sslkey = "sslkey"; static String sslkey_password = "sslkey_password"; static String max_rows = "max_rows"; static String user = "user"; static String password = "password"; // The order in the array corresponds to the order the value will appear in the // ':' // separated URL. Used to loop over the incoming URL and store in the properties // struct // Note user and password are not expected to come via the main body of the url // However they may be supplied in the query string portion. static String[] option_order = {host_name, port_num, db_name, protocol, server_trust_store, server_trust_store_pwd, pkiauth, sslcert, sslkey, sslkey_password, max_rows}; } public class HeavyAIConnection implements java.sql.Connection, Cloneable { final static Logger logger = LoggerFactory.getLogger(HeavyAIConnection.class); Set<String> protocol_set = new HashSet<String>( Arrays.asList("binary", "binary_tls", "http", "https", "https_insecure")); class Connection_properties extends Properties { // Properties can come in three ways: // 1. via main part of the url, // 2, via the query string portion of the URL or // 3. via a Properties param // // Example url. Note the first two fields are constants and must be present. ' // jdbc:heavyai:localhost:4247:db_name?max_rows=2000&protocol=binary // // Priority is given to the URL data, followed by the query fragment data and // lastly the Properties information // // All connection parameters can be supplied via the main portion of the // connection // URL, however as this structure is position dependent the nth argument must be // preceded by the n - 1 arguments. In the case of complex connection strings it // is // recommended to use either a properties object or the query string portion of // the // URL. // // Note the class java.sql.DriverManager expects the URL to contain three // components // the literal string JDBC a 'subprotocol' followed by a 'subname', as in // 'jdbc:heavyao:localhost' For this reason host mame must be supplied in the // main // part of the URL and should not be supplied in the query portion. private String extract_and_remove_query_components( String connection_url, Properties query_props) throws SQLException { // The heavy.ai version of the connection_url is a ':' separated list // with an optional 'query component' at the end (see example above). // The query component starts with the first '?' in the string. // Its is made up of key=value pairs separated by the '&' character. // // The query component is terminated by the end of the string and is // assumed to be at the end of the URL String[] url_components = connection_url.split("\\?"); if (url_components.length == 2) { // Query component are separated by an '&' - replace each with a '\n' // will allow Properties.load method to build a properties obj StringReader reader = new StringReader(url_components[1].replace('&', '\n')); try { query_props.load(reader); } catch (IOException iex) { throw new SQLException(iex.toString()); } } else if (url_components.length > 2) { throw new SQLException( "Invalid connection string. Multiple query components included [" + connection_url + "]"); } // return the url with out any query component return url_components[0]; } public Connection_properties(String connection_url, Properties baseProperties) throws SQLException { connection_url = extract_and_remove_query_components(connection_url, this); String[] url_values = connection_url.split(":"); // add 2 for the default jdbc:heavy.ai at the start of the url. if (url_values.length > Options.option_order.length + 2) { // would be nice to print the url at this stage, but the user may have added // their // password into the list. throw new SQLException("Invalid number of arguments provided in url [" + url_values.length + "]. Maximum allowed [" + (Options.option_order.length + 2) + "]"); } for (int i = 2; i < url_values.length; i++) { // the offest of 2 is caused by the 2 lables 'jdbc:heavyai' at the start if the // URL String existingValue = getProperty(Options.option_order[i - 2]); if (existingValue != null && !existingValue.equals((url_values[i]))) { logger.warn("Connection property [" + Options.option_order[i - 2] + "] has been provided with different values in the URL and query component of the url. Defaulting to the URL value"); } setProperty(Options.option_order[i - 2], url_values[i]); } for (String key : baseProperties.stringPropertyNames()) { String existingValue = getProperty(key); if (existingValue != null && !existingValue.equals(baseProperties.getProperty(key))) { logger.warn("Connection property " + key + "] has been provided with different values in the properties object and the url. Defaulting to the URL value"); } else { setProperty(key, baseProperties.getProperty(key)); } } validate_params(); } private void validate_params() throws SQLException { // Warn if config values with invalid keys have been used. for (String key : this.stringPropertyNames()) { if (key != Options.user && key != Options.password && !Arrays.asList(Options.option_order).contains(key)) { logger.warn("Unsupported configuration key" + key + " used."); } } // if present remove "//" from front of hostname if (containsKey(Options.host_name)) { String hN = this.getProperty(Options.host_name); if (hN.startsWith("//")) { this.setProperty(Options.host_name, hN.substring(2)); } } // Default to binary if no protocol specified String protocol = "binary"; if (this.containsKey(Options.protocol)) { protocol = this.getProperty(Options.protocol); protocol.toLowerCase(); if (!protocol_set.contains(protocol)) { logger.warn("Incorrect protcol [" + protocol + "] supplied. Possible values are [" + protocol_set.toString() + "]. Using binary as default"); protocol = "binary"; } } this.setProperty(Options.protocol, protocol); if (this.containsKey(Options.port_num)) { try { Integer.parseInt(getProperty(Options.port_num)); } catch (NumberFormatException nfe) { throw new SQLException( "Invalid port number supplied" + getProperty(Options.port_num)); } } if (this.containsKey(Options.server_trust_store) && !this.containsKey(Options.server_trust_store_pwd)) { logger.warn("server trust store [" + (String) this.getProperty(Options.server_trust_store) + " specfied without a password"); } if (this.containsKey(Options.server_trust_store_pwd) && !this.containsKey(Options.server_trust_store)) { logger.warn("server trust store password specified without a keystore file"); } if (!this.containsKey(Options.max_rows)) { this.setProperty(Options.max_rows, "100000"); } else { try { Integer.parseInt(getProperty(Options.max_rows)); } catch (NumberFormatException nfe) { throw new SQLException( "Invalid value supplied for max rows " + getProperty(Options.max_rows)); } } } boolean isHttpProtocol() { return (this.containsKey(Options.protocol) && this.getProperty(Options.protocol).equals("http")); } boolean isHttpsProtocol_insecure() { return (this.containsKey(Options.protocol) && this.getProperty(Options.protocol).equals("https_insecure")); } boolean isHttpsProtocol() { return (this.containsKey(Options.protocol) && this.getProperty(Options.protocol).equals("https")); } boolean isBinary() { return (this.containsKey(Options.protocol) && this.getProperty(Options.protocol).equals("binary")); } boolean isBinary_tls() { return (this.containsKey(Options.protocol) && this.getProperty(Options.protocol).equals("binary_tls")); } boolean containsTrustStore() { return this.containsKey(Options.server_trust_store); } } /* * End class Connection_properties */ protected String session = null; protected Heavy.Client client = null; protected String catalog; protected TTransport transport; protected SQLWarning warnings; protected String url; protected Connection_properties cP = null; public HeavyAIConnection getAlternateConnection() throws SQLException { // Clones the orignal java connection object, and then reconnects // at the thrift layer - doesn't re-authenticate at the application // level. Instead reuses the orignal connections session number. logger.debug("HeavyAIConnection clone"); HeavyAIConnection dbConnection = null; try { dbConnection = (HeavyAIConnection) super.clone(); } catch (CloneNotSupportedException eE) { throw new SQLException( "Error cloning connection [" + HeavyAIExceptionText.getExceptionDetail(eE), eE); } // Now over write the old connection. try { TProtocol protocol = dbConnection.manageConnection(); dbConnection.client = new Heavy.Client(protocol); } catch (java.lang.Exception jE) { throw new SQLException("Error creating new connection " + HeavyAIExceptionText.getExceptionDetail(jE), jE); } return dbConnection; } // any java.lang.Exception thrown is caught downstream and converted // to a SQLException private TProtocol manageConnection() throws java.lang.Exception { SockTransportProperties skT = null; String trust_store = null; if (cP.getProperty(Options.server_trust_store) != null && !cP.getProperty(Options.server_trust_store).isEmpty()) { trust_store = cP.getProperty(Options.server_trust_store); } String trust_store_pwd = null; if (cP.getProperty(Options.server_trust_store_pwd) != null && !cP.getProperty(Options.server_trust_store_pwd).isEmpty()) { trust_store_pwd = cP.getProperty(Options.server_trust_store_pwd); } TProtocol protocol = null; if (this.cP.isHttpProtocol()) { // HTTP skT = SockTransportProperties.getUnencryptedClient(); transport = skT.openHttpClientTransport(this.cP.getProperty(Options.host_name), Integer.parseInt(this.cP.getProperty(Options.port_num))); transport.open(); protocol = new TJSONProtocol(transport); } else if (this.cP.isBinary()) { skT = SockTransportProperties.getUnencryptedClient(); transport = skT.openClientTransport(this.cP.getProperty(Options.host_name), Integer.parseInt(this.cP.getProperty(Options.port_num))); if (!transport.isOpen()) transport.open(); protocol = new TBinaryProtocol(transport); } else if (this.cP.isHttpsProtocol() || this.cP.isHttpsProtocol_insecure()) { if (trust_store == null) { skT = SockTransportProperties.getEncryptedClientDefaultTrustStore( !this.cP.isHttpsProtocol_insecure()); } else { skT = SockTransportProperties.getEncryptedClientSpecifiedTrustStore( trust_store, trust_store_pwd, !this.cP.isHttpsProtocol_insecure()); } transport = skT.openHttpsClientTransport(this.cP.getProperty(Options.host_name), Integer.parseInt(this.cP.getProperty(Options.port_num))); transport.open(); protocol = new TJSONProtocol(transport); } else if (cP.isBinary_tls()) { if (trust_store == null) { skT = SockTransportProperties.getEncryptedClientDefaultTrustStore(false); } else { skT = SockTransportProperties.getEncryptedClientSpecifiedTrustStore( trust_store, trust_store_pwd, false); } transport = skT.openClientTransport(this.cP.getProperty(Options.host_name), Integer.parseInt(this.cP.getProperty(Options.port_num))); if (!transport.isOpen()) transport.open(); protocol = new TBinaryProtocol(transport); } else { throw new SQLException("Invalid protocol supplied"); } return protocol; } private void setSession(Object pki_auth) throws java.lang.Exception { KeyLoader.S_struct s_struct = null; // If pki aut then stuff public cert into password. if (pki_auth != null && pki_auth.toString().equalsIgnoreCase("true")) { s_struct = KeyLoader.getDetails_pkcs12(this.cP.getProperty(Options.sslcert), this.cP.getProperty(Options.sslkey_password)); this.cP.setProperty(Options.password, s_struct.cert); } // Get the seesion for all connectioms session = client.connect((String) this.cP.getProperty(Options.user), (String) this.cP.getProperty(Options.password), (String) this.cP.getProperty(Options.db_name)); // if pki auth the session will be encoded. if (pki_auth != null && pki_auth.toString().equalsIgnoreCase("true")) { Cipher cipher = Cipher.getInstance(s_struct.key.getAlgorithm()); cipher.init(Cipher.DECRYPT_MODE, s_struct.key); // session is encrypted and encoded in b64 byte[] decodedBytes = Base64.getDecoder().decode(session); byte[] decoded_bytes = cipher.doFinal(decodedBytes); session = new String(decoded_bytes, "UTF-8"); } } public HeavyAIConnection(String url, Properties base_properties) throws SQLException { this.url = url; this.cP = new Connection_properties(url, base_properties); try { TProtocol protocol = manageConnection(); client = new Heavy.Client(protocol); setSession(this.cP.getProperty(Options.pkiauth)); catalog = (String) this.cP.getProperty(Options.db_name); } catch (TTransportException ex) { throw new SQLException("Thrift transport connection failed - " + HeavyAIExceptionText.getExceptionDetail(ex), ex); } catch (TDBException ex) { throw new SQLException("HEAVY.AI connection failed - " + HeavyAIExceptionText.getExceptionDetail(ex), ex); } catch (TException ex) { throw new SQLException( "Thrift failed - " + HeavyAIExceptionText.getExceptionDetail(ex), ex); } catch (java.lang.Exception ex) { throw new SQLException( "Connection failed - " + HeavyAIExceptionText.getExceptionDetail(ex), ex); } } @Override public Statement createStatement() throws SQLException { // logger.debug("Entered"); return new HeavyAIStatement(session, this); } @Override public PreparedStatement prepareStatement(String sql) throws SQLException { // logger.debug("Entered"); return new HeavyAIPreparedStatement(sql, session, this); } @Override public CallableStatement prepareCall(String sql) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public String nativeSQL(String sql) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setAutoCommit(boolean autoCommit) throws SQLException { // logger.debug("Entered"); // we always autocommit per statement } @Override public boolean getAutoCommit() throws SQLException { // logger.debug("Entered"); return true; } @Override public void commit() throws SQLException { // logger.debug("Entered"); // noop } @Override public void rollback() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void close() throws SQLException { // logger.debug("Entered"); try { logger.debug("Session at close is " + session); if (session != null) { client.disconnect(session); } closeConnection(); } catch (TDBException ex) { throw new SQLException("disconnect failed." + ex.getError_msg()); } catch (TException ex) { throw new SQLException("disconnect failed." + ex.toString()); } } // needs to be accessed by other classes with in the package protected void closeConnection() throws SQLException { // logger.debug("Entered"); session = null; transport.close(); } @Override public boolean isClosed() throws SQLException { // logger.debug("Entered"); if (session == null) { return true; } return false; } @Override public DatabaseMetaData getMetaData() throws SQLException { // logger.debug("Entered"); DatabaseMetaData dbMetaData = new HeavyAIDatabaseMetaData(this); return dbMetaData; } @Override public void setReadOnly(boolean readOnly) throws SQLException { // logger.debug("Entered"); // TODO MAT we can't push the readonly upstream currently // but we could make JDBC obey this command } @Override public boolean isReadOnly() throws SQLException { // logger.debug("Entered"); try { if (session != null) { TServerStatus server_status = client.get_server_status(session); return server_status.read_only; } } catch (TDBException ex) { throw new SQLException( "get_server_status failed during isReadOnly check." + ex.getError_msg()); } catch (TException ex) { throw new SQLException( "get_server_status failed during isReadOnly check." + ex.toString()); } // never should get here return true; } @Override public void setCatalog(String catalog) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public String getCatalog() throws SQLException { // logger.debug("Entered"); return catalog; } @Override public void setTransactionIsolation(int level) throws SQLException { // logger.debug("Entered"); } @Override public int getTransactionIsolation() throws SQLException { // logger.debug("Entered"); return Connection.TRANSACTION_NONE; } @Override public SQLWarning getWarnings() throws SQLException { // logger.debug("Entered"); return warnings; } @Override public void clearWarnings() throws SQLException { // logger.debug("Entered"); warnings = null; } @Override public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { // logger.debug("Entered"); return new HeavyAIStatement(session, this); } @Override public PreparedStatement prepareStatement( String sql, int resultSetType, int resultSetConcurrency) throws SQLException { // logger.debug("Entered"); return new HeavyAIPreparedStatement(sql, session, this); } @Override public CallableStatement prepareCall( String sql, int resultSetType, int resultSetConcurrency) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Map<String, Class<?>> getTypeMap() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setTypeMap(Map<String, Class<?>> map) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setHoldability(int holdability) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getHoldability() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Savepoint setSavepoint() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Savepoint setSavepoint(String name) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void rollback(Savepoint savepoint) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void releaseSavepoint(Savepoint savepoint) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Statement createStatement( int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Clob createClob() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Blob createBlob() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public NClob createNClob() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public SQLXML createSQLXML() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isValid(int timeout) throws SQLException { // logger.debug("Entered"); try { client.get_server_status(session); } catch (TTransportException ex) { throw new SQLException("Connection failed - " + ex.toString()); } catch (TDBException ex) { throw new SQLException("Connection failed - " + ex.getError_msg()); } catch (TException ex) { throw new SQLException("Connection failed - " + ex.toString()); } return true; } @Override public void setClientInfo(String name, String value) throws SQLClientInfoException { throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setClientInfo(Properties properties) throws SQLClientInfoException { throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public String getClientInfo(String name) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Properties getClientInfo() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Array createArrayOf(String typeName, Object[] elements) throws SQLException { // logger.debug("Entered"); TDatumType type; try { type = TDatumType.valueOf(typeName.toUpperCase()); } catch (IllegalArgumentException ex) { throw new SQLException("No matching heavyDB type for " + typeName); } return new HeavyAIArray(type, elements); } @Override public Struct createStruct(String typeName, Object[] attributes) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setSchema(String schema) throws SQLException { // logger.debug("Entered"); // Setting setSchema to be a NOOP allows integration with third party products // that require a successful call to setSchema to work. Object db_name = this.cP.getProperty(Options.db_name); if (db_name == null) { throw new SQLException("db name not set, " + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } if (!schema.equals(db_name.toString())) { logger.warn("Connected to schema [" + schema + "] differs from db name [" + db_name + "]."); } return; } @Override public String getSchema() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void abort(Executor executor) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getNetworkTimeout() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public <T> T unwrap(Class<T> iface) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIData.java
/* * Copyright 2022 HEAVY.AI, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.heavy.jdbc; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ai.heavy.thrift.server.TColumn; import ai.heavy.thrift.server.TColumnData; import ai.heavy.thrift.server.TDatumType; class HeavyAIData { final static Logger logger = LoggerFactory.getLogger(HeavyAIData.class); private TDatumType colType; TColumn tcolumn; HeavyAIData(TDatumType col_type) { tcolumn = new TColumn(); colType = col_type; tcolumn.data = new TColumnData(); } void add(String value) { tcolumn.data.addToStr_col(value); tcolumn.addToNulls(false); } void add(int value) { tcolumn.data.addToInt_col(value); tcolumn.addToNulls(false); } void setNull(boolean b) { if (colType == TDatumType.STR) tcolumn.data.addToStr_col(null); else tcolumn.data.addToInt_col(0); tcolumn.addToNulls(b); } TColumn getTColumn() { return tcolumn; } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIDatabaseMetaData.java
/* * Copyright 2022 HEAVY.AI, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.heavy.jdbc; import org.apache.thrift.TException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.RowIdLifetime; import java.sql.SQLException; import java.util.*; import ai.heavy.thrift.server.TColumn; import ai.heavy.thrift.server.TColumnData; import ai.heavy.thrift.server.TColumnType; import ai.heavy.thrift.server.TDBInfo; import ai.heavy.thrift.server.TDBObject; import ai.heavy.thrift.server.TDBObjectType; import ai.heavy.thrift.server.TDatumType; import ai.heavy.thrift.server.TEncodingType; import ai.heavy.thrift.server.TQueryResult; import ai.heavy.thrift.server.TRowSet; import ai.heavy.thrift.server.TTableDetails; import ai.heavy.thrift.server.TTablePermissions; import ai.heavy.thrift.server.TTypeInfo; class HeavyAIDatabaseMetaData implements DatabaseMetaData { final static Logger HEAVYDBLOGGER = LoggerFactory.getLogger(HeavyAIDatabaseMetaData.class); HeavyAIConnection con = null; int databaseMajorVersion = 0; int databaseMinorVersion = 0; String databaseVersion = null; public HeavyAIDatabaseMetaData(HeavyAIConnection connection) throws SQLException { this.con = connection; try { databaseVersion = con.client.get_version(); } catch (TException ex) { throw new SQLException("Failed to get DB version " + ex.toString()); } String vers[] = databaseVersion.split("\\."); try { databaseMajorVersion = Integer.parseInt(vers[0]); databaseMinorVersion = Integer.parseInt(vers[1]); } catch (NumberFormatException ex) { throw new SQLException( "Non-numeric version returned from HEAVY.AI server: " + ex.getMessage()); } } @Override public boolean allProceduresAreCallable() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean allTablesAreSelectable() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public String getURL() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return con.url; } @Override public String getUserName() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return (String) con.cP.get(Options.user); } @Override public boolean isReadOnly() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean nullsAreSortedHigh() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean nullsAreSortedLow() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean nullsAreSortedAtStart() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean nullsAreSortedAtEnd() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public String getDatabaseProductName() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return "OmniSciDB"; } @Override public String getDatabaseProductVersion() throws SQLException { // logger.debug("Entered"); HEAVYDBLOGGER.debug("Entered"); return this.databaseVersion; } @Override public String getDriverName() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return "OmniSciDB JDBC Driver"; } @Override public String getDriverVersion() throws SQLException { // logger.debug("Entered"); HEAVYDBLOGGER.debug("Entered"); return HeavyAIDriver.DriverVersion; } @Override public int getDriverMajorVersion() { return HeavyAIDriver.DriverMajorVersion; } @Override public int getDriverMinorVersion() { return HeavyAIDriver.DriverMinorVersion; } @Override public boolean usesLocalFiles() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean usesLocalFilePerTable() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsMixedCaseIdentifiers() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean storesUpperCaseIdentifiers() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean storesLowerCaseIdentifiers() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean storesMixedCaseIdentifiers() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean storesUpperCaseQuotedIdentifiers() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean storesLowerCaseQuotedIdentifiers() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean storesMixedCaseQuotedIdentifiers() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public String getIdentifierQuoteString() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return " "; } @Override public String getSQLKeywords() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return ""; } @Override public String getNumericFunctions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return "ACOS(float), ACOS(number), ASIN, ATAN2, CEIL, COS, COT, DEGREES, EXP, FLOOR, LN, LOG, PI(), POWER, SQRT" + ", RADIANS, ROUND, SIN, TAN, ATAN, ABS, MOD SIGN, TRUNCATE"; } @Override public String getStringFunctions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return "CHAR_LENGTH, CHAR, KEY_FOR_STRING"; } @Override public String getSystemFunctions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return ""; } @Override public String getTimeDateFunctions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); // return "NOW,CURDATE,SECOND,HOUR,YEAR,EXTRACT,QUARTER,WEEK,MONTH,DATETRUNC"; return "DATE_TRUNC, NOW, EXTRACT"; } @Override public String getSearchStringEscape() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return "\\"; } @Override public String getExtraNameCharacters() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return ""; } @Override public boolean supportsAlterTableWithAddColumn() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsAlterTableWithDropColumn() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsColumnAliasing() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean nullPlusNonNullIsNull() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsConvert() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsConvert(int fromType, int toType) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsTableCorrelationNames() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsDifferentTableCorrelationNames() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsExpressionsInOrderBy() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsOrderByUnrelated() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsGroupBy() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsGroupByUnrelated() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsGroupByBeyondSelect() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsLikeEscapeClause() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsMultipleResultSets() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsMultipleTransactions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsNonNullableColumns() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsMinimumSQLGrammar() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsCoreSQLGrammar() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsExtendedSQLGrammar() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsANSI92EntryLevelSQL() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsANSI92IntermediateSQL() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsANSI92FullSQL() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsIntegrityEnhancementFacility() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsOuterJoins() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsFullOuterJoins() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsLimitedOuterJoins() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public String getSchemaTerm() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return "Database"; } @Override public String getProcedureTerm() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return "N/A"; } @Override public String getCatalogTerm() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return "N/A"; } @Override public boolean isCatalogAtStart() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public String getCatalogSeparator() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return "."; } @Override public boolean supportsSchemasInDataManipulation() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsSchemasInProcedureCalls() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsSchemasInTableDefinitions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsSchemasInIndexDefinitions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsCatalogsInDataManipulation() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsCatalogsInProcedureCalls() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsCatalogsInTableDefinitions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsCatalogsInIndexDefinitions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsPositionedDelete() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsPositionedUpdate() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsSelectForUpdate() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsStoredProcedures() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsSubqueriesInComparisons() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsSubqueriesInExists() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsSubqueriesInIns() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsSubqueriesInQuantifieds() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public boolean supportsCorrelatedSubqueries() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsUnion() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsUnionAll() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsOpenCursorsAcrossCommit() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsOpenCursorsAcrossRollback() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsOpenStatementsAcrossCommit() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsOpenStatementsAcrossRollback() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public int getMaxBinaryLiteralLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxCharLiteralLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxColumnNameLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxColumnsInGroupBy() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxColumnsInIndex() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxColumnsInOrderBy() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxColumnsInSelect() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxColumnsInTable() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxConnections() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxCursorNameLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxIndexLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxSchemaNameLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxProcedureNameLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxCatalogNameLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxRowSize() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public boolean doesMaxRowSizeIncludeBlobs() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public int getMaxStatementLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxStatements() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxTableNameLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxTablesInSelect() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getMaxUserNameLength() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getDefaultTransactionIsolation() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return Connection.TRANSACTION_NONE; } @Override public boolean supportsTransactions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsTransactionIsolationLevel(int level) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsDataManipulationTransactionsOnly() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean dataDefinitionCausesTransactionCommit() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean dataDefinitionIgnoredInTransactions() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public ResultSet getProcedures( String catalog, String schemaPattern, String procedureNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return null; // throw new UnsupportedOperationException("Not supported yet," + " line:" + new // Throwable().getStackTrace()[0]. // getLineNumber() + " class:" + new // Throwable().getStackTrace()[0].getClassName() + " method:" + new // Throwable(). getStackTrace()[0].getMethodName()); } @Override public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } /* * Wrappers for creating new TColumnType. Required so that the Thrift struct * can be modified without breaking code. */ public TColumnType createTColumnType(String colName, TTypeInfo colType) { return createTColumnType(colName, colType, false); } public TColumnType createTColumnType(String colName, TTypeInfo colType, Boolean irk) { TColumnType ct = new TColumnType(); ct.col_name = colName; ct.col_type = colType; ct.is_reserved_keyword = irk; ct.is_system = false; ct.is_physical = false; return ct; } /* * Retrieves a description of the tables available in the given catalog. Only * table * descriptions matching the catalog, schema, table name and type criteria are * returned. They * are ordered by TABLE_TYPE, TABLE_CAT, TABLE_SCHEM and TABLE_NAME. Each table * description * has the following columns: * * TABLE_CAT String => table catalog (may be null) * TABLE_SCHEM String => table schema (may be null) * TABLE_NAME String => table name * TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", * "SYSTEM TABLE", * "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM". REMARKS String => * explanatory * comment on the table TYPE_CAT String => the types catalog (may be null) * TYPE_SCHEM String * => the types schema (may be null) TYPE_NAME String => type name (may be null) * SELF_REFERENCING_COL_NAME String => name of the designated "identifier" * column of a typed * table (may be null) REF_GENERATION String => specifies how values in * SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM", "USER", * "DERIVED". (may be * null) Note: Some databases may not return information for all tables. * * Parameters: * catalog - a catalog name; must match the catalog name as it is stored in the * database; "" * retrieves those without a catalog; null means that the catalog name should * not be used to * narrow the search schemaPattern - a schema name pattern; must match the * schema name as it * is stored in the database; "" retrieves those without a schema; null means * that the schema * name should not be used to narrow the search tableNamePattern - a table name * pattern; must * match the table name as it is stored in the database types - a list of table * types, which * must be from the list of table types returned from getTableTypes(),to * include; null * returns all types Returns: ResultSet - each row is a table description * Throws: * SQLException - if a database access error occurs */ @Override public ResultSet getTables( String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException { HEAVYDBLOGGER.debug("Entered"); List<String> tables; try { tables = con.client.get_tables_for_database(con.session, catalog); } catch (TException ex) { throw new SQLException("get_tables_for_database failed " + ex.toString()); } List<String> views; try { views = con.client.get_views(con.session); } catch (TException ex) { throw new SQLException("get_views failed " + ex.toString()); } TTypeInfo strTTI = new TTypeInfo(TDatumType.STR, TEncodingType.NONE, false, false, 0, 0, 0); TColumnType columns[] = {createTColumnType("TABLE_CAT", new TTypeInfo(strTTI)), createTColumnType("TABLE_SCHEM", new TTypeInfo(strTTI)), createTColumnType("TABLE_NAME", new TTypeInfo(strTTI)), createTColumnType("TABLE_TYPE", new TTypeInfo(strTTI)), createTColumnType("REMARKS", new TTypeInfo(strTTI)), createTColumnType("TYPE_CAT", new TTypeInfo(strTTI)), createTColumnType("TYPE_SCHEM", new TTypeInfo(strTTI)), createTColumnType("TYPE_NAME", new TTypeInfo(strTTI)), createTColumnType("SELF_REFERENCING_COL_NAME", new TTypeInfo(strTTI)), createTColumnType("REF_GENERATION", new TTypeInfo(strTTI))}; Map<String, ArrayList<String>> dataMap = new HashMap(columns.length); Map<String, ArrayList<Boolean>> nullMap = new HashMap(columns.length); // create component to contain the meta data for the rows // and create a container to store the data and the nul indicators List<TColumnType> rowDesc = new ArrayList(columns.length); for (TColumnType col : columns) { rowDesc.add(col); dataMap.put(col.col_name, new ArrayList()); nullMap.put(col.col_name, new ArrayList()); } if (schemaPattern == null || schemaPattern.toLowerCase().equals(con.getCatalog().toLowerCase())) { // Now add some actual details for table name for (String x : tables) { dataMap.get("TABLE_NAME").add(x); nullMap.get("TABLE_NAME").add(false); nullMap.get("TABLE_SCHEM").add(true); nullMap.get("TABLE_CAT").add(true); if (views.contains(x) == true) { dataMap.get("TABLE_TYPE").add("VIEW"); } else { dataMap.get("TABLE_TYPE").add("TABLE"); } nullMap.get("TABLE_TYPE").add(false); nullMap.get("REMARKS").add(true); nullMap.get("TYPE_CAT").add(true); nullMap.get("TYPE_SCHEM").add(true); nullMap.get("TYPE_NAME").add(true); nullMap.get("SELF_REFERENCING_COL_NAME").add(true); nullMap.get("REF_GENERATION").add(true); } } List<TColumn> columnsList = new ArrayList(columns.length); for (TColumnType col : columns) { TColumn schemaCol = createTColumnData(dataMap.get(col.col_name), nullMap.get(col.col_name)); columnsList.add(schemaCol); } // create a rowset for the result TRowSet rowSet = new TRowSet(rowDesc, null, columnsList, true); TQueryResult result = new TQueryResult( rowSet, 0, 0, null, null, true, ai.heavy.thrift.server.TQueryType.UNKNOWN); HeavyAIResultSet tab = new HeavyAIResultSet(result, "GetTables"); return tab; } // need to add type to this currently only does str type private TColumn createTColumnData(Object data, List<Boolean> nullsList) { TColumnData colData = new TColumnData(); colData.setStr_col((List<String>) data); TColumn col = new TColumn(colData, nullsList); return col; } @Override public ResultSet getSchemas() throws SQLException { HEAVYDBLOGGER.debug("Entered"); List<TDBInfo> databases = null; try { databases = con.client.get_databases(con.session); } catch (TException ex) { throw new SQLException("get_database failed " + ex.toString()); } // process info from databses into the resultset, // then place in regular return from HEAVY.AI TTypeInfo strTTI = new TTypeInfo(TDatumType.STR, TEncodingType.NONE, false, false, 0, 0, 0); TColumnType columns[] = {createTColumnType("TABLE_SCHEM", new TTypeInfo(strTTI)), createTColumnType("TABLE_CATALOG", new TTypeInfo(strTTI))}; // create component to contain the meta data for the rows List<TColumnType> rowDesc = new ArrayList(); for (TColumnType col : columns) { rowDesc.add(col); } // Now add some actual details for schema name List<String> schemaList = new ArrayList(); List<Boolean> nullList = new ArrayList(); List<Boolean> catalogNullList = new ArrayList(); for (TDBInfo x : databases) { schemaList.add(x.db_name); nullList.add(false); catalogNullList.add(true); } TColumnData colData = new TColumnData(); colData.setStr_col(schemaList); TColumn schemaCol = new TColumn(colData, nullList); TColumn catalogCol = new TColumn(null, catalogNullList); List<TColumn> columnsList = new ArrayList(); columnsList.add(schemaCol); columnsList.add(catalogCol); // create a rowset for the result TRowSet rowSet = new TRowSet(rowDesc, null, columnsList, true); TQueryResult result = new TQueryResult( rowSet, 0, 0, null, null, true, ai.heavy.thrift.server.TQueryType.UNKNOWN); HeavyAIResultSet schemas = new HeavyAIResultSet(result, "getSchemas"); return schemas; } @Override public ResultSet getCatalogs() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return getSchemas(); } @Override public ResultSet getTableTypes() throws SQLException { HEAVYDBLOGGER.debug("Entered"); TTypeInfo strTTI = new TTypeInfo(TDatumType.STR, TEncodingType.NONE, false, false, 0, 0, 0); TColumnType columns[] = {createTColumnType("TABLE_TYPE", new TTypeInfo(strTTI))}; Map<String, HeavyAIData> dataMap = new HashMap(columns.length); // create component to contain the meta data for the rows // and create a container to store the data and the nul indicators List<TColumnType> rowDesc = new ArrayList(columns.length); for (TColumnType col : columns) { rowDesc.add(col); dataMap.put(col.col_name, new HeavyAIData(col.col_type.type)); } // Now add some actual details for table name dataMap.get("TABLE_TYPE").add("TABLE"); dataMap.get("TABLE_TYPE").add("VIEW"); List<TColumn> columnsList = new ArrayList(columns.length); for (TColumnType col : columns) { TColumn schemaCol = dataMap.get(col.col_name).getTColumn(); columnsList.add(schemaCol); } // create a rowset for the result TRowSet rowSet = new TRowSet(rowDesc, null, columnsList, true); TQueryResult result = new TQueryResult( rowSet, 0, 0, null, null, true, ai.heavy.thrift.server.TQueryType.UNKNOWN); HeavyAIResultSet tab = new HeavyAIResultSet(result, "getTableTypes"); // logger.info("Dump result "+ result.toString()); return tab; } /* * Retrieves a description of table columns available in the specified catalog. * Only column descriptions matching the catalog, schema, table and column name * criteria are * returned. They are ordered by TABLE_CAT,TABLE_SCHEM, TABLE_NAME, and * ORDINAL_POSITION. * * Each column description has the following columns: * * TABLE_CAT String => table catalog (may be null) * TABLE_SCHEM String => table schema (may be null) * TABLE_NAME String => table name * COLUMN_NAME String => column name * DATA_TYPE int => SQL type from java.sql.Types * TYPE_NAME String => Data source dependent type name, for a UDT the type name * is fully * qualified COLUMN_SIZE int => column size. BUFFER_LENGTH is not used. * DECIMAL_DIGITS int => * the number of fractional digits. Null is returned for data types where * DECIMAL_DIGITS is * not applicable. NUM_PREC_RADIX int => Radix (typically either 10 or 2) * NULLABLE int => is * NULL allowed. columnNoNulls - might not allow NULL values columnNullable - * definitely * allows NULL values columnNullableUnknown - nullability unknown REMARKS String * => comment * describing column (may be null) COLUMN_DEF String => default value for the * column, which * should be interpreted as a string when the value is enclosed in single quotes * (may be * null) SQL_DATA_TYPE int => unused SQL_DATETIME_SUB int => unused * CHAR_OCTET_LENGTH int => * for char types the maximum number of bytes in the column ORDINAL_POSITION int * => index of * column in table (starting at 1) IS_NULLABLE String => ISO rules are used to * determine the * nullability for a column. YES --- if the column can include NULLs NO --- if * the column * cannot include NULLs empty string --- if the nullability for the column is * unknown * SCOPE_CATALOG String => catalog of table that is the scope of a reference * attribute (null * if DATA_TYPE isn't REF) SCOPE_SCHEMA String => schema of table that is the * scope of a * reference attribute (null if the DATA_TYPE isn't REF) SCOPE_TABLE String => * table name * that this the scope of a reference attribute (null if the DATA_TYPE isn't * REF) * SOURCE_DATA_TYPE short => source type of a distinct type or user-generated * Ref type, SQL * type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated * REF) * IS_AUTOINCREMENT String => Indicates whether this column is auto incremented * YES --- if the column is auto incremented * NO --- if the column is not auto incremented * empty string --- if it cannot be determined whether the column is auto * incremented * IS_GENERATEDCOLUMN String => Indicates whether this is a generated column * YES --- if this a generated column * NO --- if this not a generated column * empty string --- if it cannot be determined whether this is a generated * column * The COLUMN_SIZE column specifies the column size for the given column. For * numeric data, * this is the maximum precision. For character data, this is the length in * characters. For * datetime datatypes, this is the length in characters of the String * representation * (assuming the maximum allowed precision of the fractional seconds component). * For binary * data, this is the length in bytes. For the ROWID datatype, this is the length * in bytes. * Null is returned for data types where the column size is not applicable. * * Parameters: * catalog - a catalog name; must match the catalog name as it is stored in the * database; "" * retrieves those without a catalog; null means that the catalog name should * not be used to * narrow the search schemaPattern - a schema name pattern; must match the * schema name as it * is stored in the database; "" retrieves those without a schema; null means * that the schema * name should not be used to narrow the search tableNamePattern - a table name * pattern; must * match the table name as it is stored in the database columnNamePattern - a * column name * pattern; must match the column name as it is stored in the database Returns: * ResultSet - * each row is a column description Throws: SQLException - if a database access * error occurs */ @Override public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); HEAVYDBLOGGER.debug("TablePattern " + tableNamePattern + " columnNamePattern " + columnNamePattern); String modifiedTablePattern = tableNamePattern.replaceAll("%", ".*"); String modifiedColumnPattern = (columnNamePattern == null) ? null : columnNamePattern.replaceAll("%", ".*"); HEAVYDBLOGGER.debug("TablePattern " + tableNamePattern + " modifiedColumnPattern " + modifiedColumnPattern); // declare the columns in the result set TTypeInfo strTTI = new TTypeInfo(TDatumType.STR, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo intTTI = new TTypeInfo(TDatumType.INT, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo smallIntTTI = new TTypeInfo(TDatumType.SMALLINT, TEncodingType.NONE, false, false, 0, 0, 0); TColumnType columns[] = {createTColumnType("TABLE_CAT", new TTypeInfo(strTTI)), createTColumnType("TABLE_SCHEM", new TTypeInfo(strTTI)), createTColumnType("TABLE_NAME", new TTypeInfo(strTTI)), createTColumnType("COLUMN_NAME", new TTypeInfo(strTTI)), createTColumnType("DATA_TYPE", new TTypeInfo(intTTI)), createTColumnType("TYPE_NAME", new TTypeInfo(strTTI)), createTColumnType("COLUMN_SIZE", new TTypeInfo(intTTI)), createTColumnType("BUFFER_LENGTH", new TTypeInfo(strTTI)), createTColumnType("DECIMAL_DIGITS", new TTypeInfo(intTTI)), createTColumnType("NUM_PREC_RADIX", new TTypeInfo(intTTI)), createTColumnType("NULLABLE", new TTypeInfo(intTTI)), createTColumnType("REMARKS", new TTypeInfo(strTTI)), createTColumnType("COLUMN_DEF", new TTypeInfo(strTTI)), createTColumnType("SQL_DATA_TYPE", new TTypeInfo(intTTI)), createTColumnType("SQL_DATETIME_SUB", new TTypeInfo(intTTI)), createTColumnType("CHAR_OCTET_LENGTH", new TTypeInfo(intTTI)), createTColumnType("ORDINAL_POSITION", new TTypeInfo(intTTI)), createTColumnType("IS_NULLABLE", new TTypeInfo(strTTI)), createTColumnType("SCOPE_CATALOG", new TTypeInfo(strTTI)), createTColumnType("SCOPE_SCHEMA", new TTypeInfo(strTTI)), createTColumnType("SCOPE_TABLE", new TTypeInfo(strTTI)), createTColumnType("SOURCE_DATA_TYPE", new TTypeInfo(smallIntTTI)), createTColumnType("IS_AUTOINCREMENT", new TTypeInfo(strTTI)), createTColumnType("IS_GENERATEDCOLUMN", new TTypeInfo(strTTI))}; Map<String, HeavyAIData> dataMap = new HashMap(columns.length); // create component to contain the meta data for the rows // and create a container to store the data and the nul indicators List<TColumnType> rowDesc = new ArrayList(columns.length); for (TColumnType col : columns) { rowDesc.add(col); dataMap.put(col.col_name, new HeavyAIData(col.col_type.type)); } // Now add some actual details for table name List<String> tables; try { tables = con.client.get_tables_for_database(con.session, catalog); } catch (TException ex) { throw new SQLException("get_tables_for_database failed " + ex.toString()); } for (String tableName : tables) { // check if the table matches the input pattern if (tableNamePattern == null || tableNamePattern.equals(tableName)) { // grab meta data for table TTableDetails tableDetails; try { tableDetails = con.client.get_table_details(con.session, tableName); } catch (TException ex) { throw new SQLException("get_table_details failed " + ex.toString()); } int ordinal = 0; // iterate through the columns for (TColumnType value : tableDetails.row_desc) { ordinal++; if (columnNamePattern == null || value.col_name.matches(modifiedColumnPattern)) { dataMap.get("TABLE_CAT").setNull(true); dataMap.get("TABLE_SCHEM").setNull(true); dataMap.get("TABLE_NAME").add(tableName); dataMap.get("COLUMN_NAME").add(value.col_name); dataMap.get("DATA_TYPE").add(HeavyAIType.toJava(value.col_type.type)); dataMap.get("TYPE_NAME") .add((value.col_type.type.name() + (value.col_type.is_array ? "[]" : ""))); if (value.col_type.type == TDatumType.DECIMAL) { dataMap.get("COLUMN_SIZE").add(value.col_type.precision); } else { dataMap.get("COLUMN_SIZE").add(100); } dataMap.get("BUFFER_LENGTH").setNull(true); if (value.col_type.type == TDatumType.DECIMAL) { dataMap.get("DECIMAL_DIGITS").add(value.col_type.scale); } else { dataMap.get("DECIMAL_DIGITS").setNull(true); } dataMap.get("NUM_PREC_RADIX").add(10); dataMap.get("NULLABLE") .add(value.col_type.nullable ? DatabaseMetaData.columnNullable : DatabaseMetaData.columnNoNulls); dataMap.get("REMARKS").add(" "); dataMap.get("COLUMN_DEF").setNull(true); dataMap.get("SQL_DATA_TYPE").add(0); dataMap.get("SQL_DATETIME_SUB").setNull(true); dataMap.get("CHAR_OCTET_LENGTH").add(0); dataMap.get("ORDINAL_POSITION").add(ordinal); dataMap.get("IS_NULLABLE").add(value.col_type.nullable ? "YES" : "NO"); dataMap.get("SCOPE_CATALOG").setNull(true); dataMap.get("SCOPE_SCHEMA").setNull(true); dataMap.get("SCOPE_TABLE").setNull(true); dataMap.get("SOURCE_DATA_TYPE").add(HeavyAIType.toJava(value.col_type.type)); dataMap.get("IS_AUTOINCREMENT").add("NO"); dataMap.get("IS_GENERATEDCOLUMN").add("NO"); } } } } List<TColumn> columnsList = new ArrayList(columns.length); for (TColumnType col : columns) { TColumn schemaCol = dataMap.get(col.col_name).getTColumn(); // logger.info("Tcolumn is "+ schemaCol.toString()); columnsList.add(schemaCol); } // create a rowset for the result TRowSet rowSet = new TRowSet(rowDesc, null, columnsList, true); TQueryResult result = new TQueryResult( rowSet, 0, 0, null, null, true, ai.heavy.thrift.server.TQueryType.UNKNOWN); HeavyAIResultSet cols = new HeavyAIResultSet(result, "getColumns"); return cols; } @Override public ResultSet getColumnPrivileges( String catalog, String schema, String table, String columnNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } public ResultSet getEmptyResultSet() { return new HeavyAIResultSet(); } // this method is needed to build an empty resultset with columns names and // datatypes public ResultSet getEmptyResultSetWithDesc(TColumnType columns[]) throws SQLException { // for compatibility and future Map<String, HeavyAIData> dataMap = new HashMap(columns.length); List<TColumnType> rowDesc = new ArrayList(columns.length); for (TColumnType col : columns) { rowDesc.add(col); dataMap.put(col.col_name, new HeavyAIData(col.col_type.type)); } List<TColumn> columnsList = new ArrayList(columns.length); for (TColumnType col : columns) { TColumn schemaCol = dataMap.get(col.col_name).getTColumn(); columnsList.add(schemaCol); } TRowSet rowSet = new TRowSet(rowDesc, null, columnsList, true); TQueryResult result = new TQueryResult( rowSet, 0, 0, null, null, true, ai.heavy.thrift.server.TQueryType.UNKNOWN); HeavyAIResultSet cols = new HeavyAIResultSet(result, "getColumns"); return cols; } private void tablePermProcess( List<String> tables, Map<String, HeavyAIData> dataMap, String tableNamePattern) throws TException { for (String table : tables) { if (tableNamePattern != null && !table.matches(tableNamePattern)) { continue; } List<TDBObject> db_objects = con.client.get_db_object_privs( con.session, table, TDBObjectType.TableDBObjectType); // check if the table matches the input pattern for (TDBObject db_object : db_objects) { // If the user is a super user then the objectName will be super // and needs to be changed to the table name. if (db_object.objectName.equalsIgnoreCase("super")) { db_object.objectName = table; } // A bunch of db objects come back. Any with a different name throw away if (!db_object.objectName.equalsIgnoreCase(table)) { continue; } // Create set of table permissions based ont he db_object. This seems to // be the only way - though being hardwired on the number of privs is not great. TTablePermissions tt = new TTablePermissions(db_object.privs.get(0), db_object.privs.get(1), db_object.privs.get(2), db_object.privs.get(3), db_object.privs.get(4), db_object.privs.get(5), db_object.privs.get(6), db_object.privs.get(7)); int ordinal = 1; for (TTablePermissions._Fields field = tt.fieldForId(ordinal); field != null; field = tt.fieldForId(++ordinal)) { Boolean x = (Boolean) tt.getFieldValue(field); if (x == false) { continue; } // standardise the fieldName upper case and remove trailing '_'. create_ => // CREATE dataMap.get("PRIVILEGE") .add(field.getFieldName().toUpperCase().replace("_", "")); dataMap.get("TABLE_CAT").setNull(true); dataMap.get("TABLE_SCHEM").setNull(true); dataMap.get("TABLE_NAME").add(db_object.objectName); dataMap.get("GRANTOR").setNull(true); dataMap.get("GRANTEE").add(db_object.grantee); dataMap.get("IS_GRANTABLE").add("NO"); } } } } @Override public ResultSet getTablePrivileges( String catalog, String schemaPattern, String tableNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); String modifiedTablePattern = (tableNamePattern == null) ? null : tableNamePattern.replaceAll("%", ".*"); HEAVYDBLOGGER.debug("TablePattern " + tableNamePattern + " modifiedTableNamePattern " + modifiedTablePattern); // declare the columns in the result set final TTypeInfo strTTI = new TTypeInfo(TDatumType.STR, TEncodingType.NONE, false, false, 0, 0, 0); final TDatumType datumType = strTTI.type; Map<String, HeavyAIData> dataMap = new HashMap() { { put("TABLE_CAT", new HeavyAIData(datumType)); put("TABLE_SCHEM", new HeavyAIData(datumType)); put("TABLE_NAME", new HeavyAIData(datumType)); put("GRANTOR", new HeavyAIData(datumType)); put("GRANTEE", new HeavyAIData(datumType)); put("PRIVILEGE", new HeavyAIData(datumType)); put("IS_GRANTABLE", new HeavyAIData(datumType)); } }; try { // Get all the tables and then pattern match them in tablePermProcess List<String> tables = con.client.get_tables(con.session); tablePermProcess(tables, dataMap, modifiedTablePattern); } catch (TException ex) { throw new SQLException("get_privileges failed " + ex.toString()); } // create component to contain the meta data for the rows // and create a container to store the data and the nul indicators // List<TColumnType> rowDesc = new ArrayList(columns.length); List<TColumnType> rowDesc = new ArrayList(dataMap.size()); List<TColumn> columnsList = new ArrayList(dataMap.size()); for (Map.Entry<String, HeavyAIData> pair : dataMap.entrySet()) { columnsList.add(pair.getValue().getTColumn()); rowDesc.add(createTColumnType(pair.getKey(), new TTypeInfo(strTTI))); } // create a rowset for the result TRowSet rowSet = new TRowSet(rowDesc, null, columnsList, true); TQueryResult result = new TQueryResult( rowSet, 0, 0, null, null, true, ai.heavy.thrift.server.TQueryType.UNKNOWN); HeavyAIResultSet cols = new HeavyAIResultSet(result, "getPrivileges"); return cols; } @Override public ResultSet getBestRowIdentifier( String catalog, String schema, String table, int scope, boolean nullable) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException { HEAVYDBLOGGER.debug("Entered"); TTypeInfo strTTI = new TTypeInfo(TDatumType.STR, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo intTTI = new TTypeInfo(TDatumType.INT, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo smallIntTTI = new TTypeInfo(TDatumType.SMALLINT, TEncodingType.NONE, false, false, 0, 0, 0); TColumnType columns[] = {createTColumnType("TABLE_CAT", new TTypeInfo(strTTI)), createTColumnType("TABLE_SCHEM", new TTypeInfo(strTTI)), createTColumnType("TABLE_NAME", new TTypeInfo(strTTI)), createTColumnType("COLUMN_NAME", new TTypeInfo(strTTI)), createTColumnType("KEY_SEQ", new TTypeInfo(smallIntTTI)), createTColumnType("PK_NAME", new TTypeInfo(strTTI))}; return getEmptyResultSetWithDesc(columns); } @Override public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException { HEAVYDBLOGGER.debug("Entered"); TTypeInfo strTTI = new TTypeInfo(TDatumType.STR, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo intTTI = new TTypeInfo(TDatumType.INT, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo smallIntTTI = new TTypeInfo(TDatumType.SMALLINT, TEncodingType.NONE, false, false, 0, 0, 0); TColumnType columns[] = {createTColumnType("PKTABLE_CAT", new TTypeInfo(strTTI)), createTColumnType("PKTABLE_SCHEM", new TTypeInfo(strTTI)), createTColumnType("PKTABLE_NAME", new TTypeInfo(strTTI)), createTColumnType("PKCOLUMN_NAME", new TTypeInfo(strTTI)), createTColumnType("FKTABLE_CAT", new TTypeInfo(strTTI)), createTColumnType("FKTABLE_SCHEM", new TTypeInfo(strTTI)), createTColumnType("FKTABLE_NAME", new TTypeInfo(strTTI)), createTColumnType("FKCOLUMN_NAME", new TTypeInfo(strTTI)), createTColumnType("KEY_SEQ", new TTypeInfo(smallIntTTI)), createTColumnType("UPDATE_RULE", new TTypeInfo(smallIntTTI)), createTColumnType("DELETE_RULE", new TTypeInfo(smallIntTTI)), createTColumnType("FK_NAME", new TTypeInfo(strTTI)), createTColumnType("PK_NAME", new TTypeInfo(strTTI)), createTColumnType("DEFERRABILITY", new TTypeInfo(smallIntTTI))}; return getEmptyResultSetWithDesc(columns); } @Override public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException { HEAVYDBLOGGER.debug("Entered"); TTypeInfo strTTI = new TTypeInfo(TDatumType.STR, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo intTTI = new TTypeInfo(TDatumType.INT, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo smallIntTTI = new TTypeInfo(TDatumType.SMALLINT, TEncodingType.NONE, false, false, 0, 0, 0); TColumnType columns[] = {createTColumnType("FKTABLE_CAT", new TTypeInfo(strTTI)), createTColumnType("FKTABLE_SCHEM", new TTypeInfo(strTTI)), createTColumnType("FKTABLE_NAME", new TTypeInfo(strTTI)), createTColumnType("FKCOLUMN_NAME", new TTypeInfo(strTTI)), createTColumnType("PKTABLE_CAT", new TTypeInfo(strTTI)), createTColumnType("PKTABLE_SCHEM", new TTypeInfo(strTTI)), createTColumnType("PKTABLE_NAME", new TTypeInfo(strTTI)), createTColumnType("PKCOLUMN_NAME", new TTypeInfo(strTTI)), createTColumnType("KEY_SEQ", new TTypeInfo(smallIntTTI)), createTColumnType("UPDATE_RULE", new TTypeInfo(smallIntTTI)), createTColumnType("DELETE_RULE", new TTypeInfo(smallIntTTI)), createTColumnType("PK_NAME", new TTypeInfo(strTTI)), createTColumnType("FK_NAME", new TTypeInfo(strTTI)), createTColumnType("DEFERRABILITY", new TTypeInfo(smallIntTTI))}; return getEmptyResultSetWithDesc(columns); } @Override public ResultSet getCrossReference(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } /* * Retrieves a description of all the data types supported by this database. * They are * ordered by DATA_TYPE and then by how closely the data type maps to the * corresponding JDBC * SQL type. If the database supports SQL distinct types, then getTypeInfo() * will return a * single row with a TYPE_NAME of DISTINCT and a DATA_TYPE of Types.DISTINCT. If * the database * supports SQL structured types, then getTypeInfo() will return a single row * with a * TYPE_NAME of STRUCT and a DATA_TYPE of Types.STRUCT. * * If SQL distinct or structured types are supported, then information on the * individual * types may be obtained from the getUDTs() method. * * Each type description has the following columns: * * TYPE_NAME String => Type name * DATA_TYPE int => SQL data type from java.sql.Types * PRECISION int => maximum precision * LITERAL_PREFIX String => prefix used to quote a literal (may be null) * LITERAL_SUFFIX String => suffix used to quote a literal (may be null) * CREATE_PARAMS String => parameters used in creating the type (may be null) * NULLABLE short => can you use NULL for this type. * typeNoNulls - does not allow NULL values * typeNullable - allows NULL values * typeNullableUnknown - nullability unknown * CASE_SENSITIVE boolean=> is it case sensitive. * SEARCHABLE short => can you use "WHERE" based on this type: * typePredNone - No support * typePredChar - Only supported with WHERE .. LIKE * typePredBasic - Supported except for WHERE .. LIKE * typeSearchable - Supported for all WHERE .. * UNSIGNED_ATTRIBUTE boolean => is it unsigned. * FIXED_PREC_SCALE boolean => can it be a money value. * AUTO_INCREMENT boolean => can it be used for an auto-increment value. * LOCAL_TYPE_NAME String => localized version of type name (may be null) * MINIMUM_SCALE short => minimum scale supported * MAXIMUM_SCALE short => maximum scale supported * SQL_DATA_TYPE int => unused * SQL_DATETIME_SUB int => unused * NUM_PREC_RADIX int => usually 2 or 10 * The PRECISION column represents the maximum column size that the server * supports for the * given datatype. For numeric data, this is the maximum precision. For * character data, this * is the length in characters. For datetime datatypes, this is the length in * characters of * the String representation (assuming the maximum allowed precision of the * fractional * seconds component). For binary data, this is the length in bytes. For the * ROWID datatype, * this is the length in bytes. Null is returned for data types where the column * size is not * applicable. * * Returns: * a ResultSet object in which each row is an SQL type description * Throws: * SQLException - if a database access error occurs */ @Override public ResultSet getTypeInfo() throws SQLException { HEAVYDBLOGGER.debug("Entered"); // declare the columns in the result set TTypeInfo strTTI = new TTypeInfo(TDatumType.STR, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo intTTI = new TTypeInfo(TDatumType.INT, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo smallIntTTI = new TTypeInfo(TDatumType.SMALLINT, TEncodingType.NONE, false, false, 0, 0, 0); TTypeInfo boolTTI = new TTypeInfo(TDatumType.BOOL, TEncodingType.NONE, false, false, 0, 0, 0); TColumnType columns[] = {createTColumnType("TYPE_NAME", new TTypeInfo(strTTI)), createTColumnType("DATA_TYPE", new TTypeInfo(intTTI)), createTColumnType("PRECISION", new TTypeInfo(intTTI)), createTColumnType("LITERAL_PREFIX", new TTypeInfo(strTTI)), createTColumnType("LITERAL_SUFFIX", new TTypeInfo(strTTI)), createTColumnType("CREATE_PARAMS", new TTypeInfo(strTTI)), createTColumnType("NULLABLE", new TTypeInfo(smallIntTTI)), createTColumnType("CASE_SENSITIVE", new TTypeInfo(boolTTI)), createTColumnType("SEARCHABLE", new TTypeInfo(smallIntTTI)), createTColumnType("UNSIGNED_ATTRIBUTE", new TTypeInfo(boolTTI)), createTColumnType("FIXED_PREC_SCALE", new TTypeInfo(boolTTI)), createTColumnType("AUTO_INCREMENT", new TTypeInfo(boolTTI)), createTColumnType("LOCAL_TYPE_NAME", new TTypeInfo(strTTI)), createTColumnType("MINIMUM_SCALE", new TTypeInfo(smallIntTTI)), createTColumnType("MAXIMUM_SCALE", new TTypeInfo(smallIntTTI)), createTColumnType("SQL_DATA_TYPE", new TTypeInfo(intTTI)), createTColumnType("SQL_DATETIME_SUB", new TTypeInfo(intTTI)), createTColumnType("NUM_PREC_RADIX", new TTypeInfo(intTTI))}; Map<String, HeavyAIData> dataMap = new HashMap(columns.length); // create component to contain the meta data for the rows // and create a container to store the data and the nul indicators List<TColumnType> rowDesc = new ArrayList(columns.length); for (TColumnType col : columns) { rowDesc.add(col); dataMap.put(col.col_name, new HeavyAIData(col.col_type.type)); } // TODO this is currently a work in progress need to add actual details here // Now add some actual details for table name dataMap.get("TYPE_NAME").setNull(true); // String => Type name dataMap.get("DATA_TYPE").setNull(true); // int => SQL data type from java.sql.Types dataMap.get("PRECISION").setNull(true); // int => maximum precision dataMap.get("LITERAL_PREFIX").setNull(true); // .setNull(true);// String => prefix // used to quote a literal (may be null) dataMap.get("LITERAL_SUFFIX").setNull(true); // .setNull(true);// String => suffix // used to quote a literal (may be null) dataMap.get("CREATE_PARAMS") .setNull( true); // String => parameters used in creating the type (may be null) dataMap.get("NULLABLE").setNull(true); // short => can you use NULL for this type. // typeNoNulls - does not allow NULL values // typeNullable - allows NULL values // typeNullableUnknown - nullability unknown dataMap.get("CASE_SENSITIVE").setNull(true); // boolean=> is it case sensitive. dataMap.get("SEARCHABLE") .setNull(true); // short => can you use "WHERE" based on this type: // typePredNone - No support // typePredChar - Only supported with WHERE .. LIKE // typePredBasic - Supported except for WHERE .. LIKE // typeSearchable - Supported for all WHERE .. dataMap.get("UNSIGNED_ATTRIBUTE").setNull(true); // boolean => is it unsigned. dataMap.get("FIXED_PREC_SCALE").setNull(true); // boolean => can it be a money value. dataMap.get("AUTO_INCREMENT") .setNull(false); // boolean => can it be used for an auto-increment value. dataMap.get("LOCAL_TYPE_NAME") .setNull(true); // String => localized version of type name (may be null) dataMap.get("MINIMUM_SCALE").setNull(true); // short => minimum scale supported dataMap.get("MAXIMUM_SCALE").setNull(true); // short => maximum scale supported dataMap.get("SQL_DATA_TYPE").setNull(true); // int => unused dataMap.get("SQL_DATETIME_SUB").setNull(true); // int => unused dataMap.get("NUM_PREC_RADIX").setNull(true); // List<TColumn> columnsList = new ArrayList(columns.length); for (TColumnType col : columns) { TColumn schemaCol = dataMap.get(col.col_name).getTColumn(); // logger.info("Tcolumn is "+ schemaCol.toString()); columnsList.add(schemaCol); } // create a rowset for the result TRowSet rowSet = new TRowSet(rowDesc, null, columnsList, true); TQueryResult result = new TQueryResult( rowSet, 0, 0, null, null, true, ai.heavy.thrift.server.TQueryType.UNKNOWN); HeavyAIResultSet cols = new HeavyAIResultSet(result, "getTypeInfo"); return cols; } @Override public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return getEmptyResultSet(); } @Override public boolean supportsResultSetType(int type) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean ownUpdatesAreVisible(int type) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean ownDeletesAreVisible(int type) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean ownInsertsAreVisible(int type) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean othersUpdatesAreVisible(int type) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean othersDeletesAreVisible(int type) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean othersInsertsAreVisible(int type) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean updatesAreDetected(int type) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean deletesAreDetected(int type) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean insertsAreDetected(int type) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsBatchUpdates() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return true; } @Override public ResultSet getUDTs( String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Connection getConnection() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return con; } @Override public boolean supportsSavepoints() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsNamedParameters() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsMultipleOpenResults() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsGetGeneratedKeys() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public ResultSet getSuperTypes( String catalog, String schemaPattern, String typeNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getSuperTables( String catalog, String schemaPattern, String tableNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean supportsResultSetHoldability(int holdability) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public int getResultSetHoldability() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return ResultSet.CLOSE_CURSORS_AT_COMMIT; } @Override public int getDatabaseMajorVersion() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return this.databaseMajorVersion; } @Override public int getDatabaseMinorVersion() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return this.databaseMinorVersion; } @Override public int getJDBCMajorVersion() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getJDBCMinorVersion() throws SQLException { // logger.debug("Entered"); HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public int getSQLStateType() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public boolean locatorsUpdateCopy() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean supportsStatementPooling() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public RowIdLifetime getRowIdLifetime() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return RowIdLifetime.ROWID_VALID_OTHER; } @Override public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return getSchemas(); } @Override public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public boolean autoCommitFailureClosesAllResultSets() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public ResultSet getClientInfoProperties() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getFunctions( String catalog, String schemaPattern, String functionNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean generatedKeyAlwaysReturned() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } @Override public <T> T unwrap(Class<T> iface) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return null; } @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { HEAVYDBLOGGER.debug("Entered"); return false; } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIDriver.java
/* * Copyright 2022 HEAVY.AI, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.heavy.jdbc; import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.InputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.DriverPropertyInfo; import java.sql.SQLException; import java.util.Properties; import java.util.logging.Logger; public class HeavyAIDriver implements java.sql.Driver { static int DriverMajorVersion = -1; static int DriverMinorVersion = -1; static String DriverVersion = "UNKNOWN"; final static String VERSION_FILE = "version.properties"; final static org.slf4j.Logger logger = LoggerFactory.getLogger(HeavyAIDriver.class); public static final String OMNISCI_PREFIX = "jdbc:omnisci:"; public static final String MAPD_PREFIX = "jdbc:mapd:"; public static final String HEAVYAI_PREFIX = "jdbc:heavyai:"; static { try { DriverManager.registerDriver(new HeavyAIDriver()); } catch (SQLException e) { e.printStackTrace(); } try (InputStream input = HeavyAIDriver.class.getClassLoader().getResourceAsStream( VERSION_FILE)) { Properties prop = new Properties(); if (input == null) { logger.error("Cannot read " + VERSION_FILE + " file"); } else { prop.load(input); DriverVersion = prop.getProperty("version"); String[] version = DriverVersion.split("\\."); try { DriverMajorVersion = Integer.parseInt(version[0]); DriverMinorVersion = Integer.parseInt(version[1]); } catch (NumberFormatException ex) { logger.error("Unexpected driver version format in " + VERSION_FILE); DriverVersion = "UNKNOWN"; } } } catch (IOException e) { e.printStackTrace(); } } @Override public Connection connect(String url, Properties info) throws SQLException { // logger.debug("Entered"); if (!isValidURL(url)) { return null; } url = url.trim(); return new HeavyAIConnection(url, info); } @Override public boolean acceptsURL(String url) throws SQLException { // logger.debug("Entered"); return isValidURL(url); } /** * Validates a URL * * @param url * @return true if the URL is valid, false otherwise */ private static boolean isValidURL(String url) { return url != null && (url.toLowerCase().startsWith(OMNISCI_PREFIX) || url.toLowerCase().startsWith(MAPD_PREFIX) || url.toLowerCase().startsWith(HEAVYAI_PREFIX)); } @Override public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException { // logger.debug("Entered"); return null; } @Override public int getMajorVersion() { return DriverMajorVersion; } @Override public int getMinorVersion() { return DriverMinorVersion; } @Override public boolean jdbcCompliant() { return false; } @Override public Logger getParentLogger() { return null; } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIEscapeFunctions.java
package ai.heavy.jdbc; import java.lang.reflect.Method; import java.sql.SQLException; import java.util.List; import java.util.Locale; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; public final class HeavyAIEscapeFunctions { /** * storage for functions implementations */ private static final ConcurrentMap<String, Method> FUNCTION_MAP = createFunctionMap("sql"); private static ConcurrentMap<String, Method> createFunctionMap(String prefix) { Method[] methods = HeavyAIEscapeFunctions.class.getMethods(); ConcurrentMap<String, Method> functionMap = new ConcurrentHashMap<String, Method>(methods.length * 2); for (Method method : methods) { if (method.getName().startsWith(prefix)) { functionMap.put( method.getName().substring(prefix.length()).toLowerCase(Locale.US), method); } } return functionMap; } /** * get Method object implementing the given function * * @param functionName name of the searched function * @return a Method object or null if not found */ public static Method getFunction(String functionName) { Method method = FUNCTION_MAP.get(functionName); if (method != null) { return method; } // FIXME: this probably should not use the US locale String nameLower = functionName.toLowerCase(Locale.US); if (nameLower.equals(functionName)) { // Input name was in lower case, the function is not there return null; } method = FUNCTION_MAP.get(nameLower); if (method != null && FUNCTION_MAP.size() < 1000) { // Avoid OutOfMemoryError in case input function names are randomized // The number of methods is finite, however the number of upper-lower case // combinations is quite a few (e.g. substr, Substr, sUbstr, SUbstr, etc). FUNCTION_MAP.putIfAbsent(functionName, method); } return method; } // ** numeric functions translations ** /** * ceiling to ceil translation * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqlceiling(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "ceil(", "ceiling", parsedArgs); } /** * dayofmonth translation * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqldayofmonth(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "extract(day from ", "dayofmonth", parsedArgs); } /** * dayofweek translation adding 1 to postgresql function since we expect values from 1 * to 7 * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqldayofweek(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { if (parsedArgs.size() != 1) { throw new RuntimeException( "Syntax error function 'dayofweek' takes one and only one argument."); } appendCall(buf, "extract(dow from ", ",", ")+1", parsedArgs); } /** * dayofyear translation * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqldayofyear(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "extract(doy from ", "dayofyear", parsedArgs); } /** * hour translation * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqlhour(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "extract(hour from ", "hour", parsedArgs); } /** * minute translation * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqlminute(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "extract(minute from ", "minute", parsedArgs); } /** * month translation * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqlmonth(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "extract(month from ", "month", parsedArgs); } /** * quarter translation * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqlquarter(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "extract(quarter from ", "quarter", parsedArgs); } /** * second translation * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqlsecond(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "extract(second from ", "second", parsedArgs); } /** * week translation * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqlweek(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "extract(week from ", "week", parsedArgs); } /** * year translation * * @param buf The buffer to append into * @param parsedArgs arguments * @throws SQLException if something wrong happens */ public static void sqlyear(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "extract(year from ", "year", parsedArgs); } private static void singleArgumentFunctionCall(StringBuilder buf, String call, String functionName, List<? extends CharSequence> parsedArgs) { if (parsedArgs.size() != 1) { throw new RuntimeException( "Syntax error " + functionName + " takes one and only one argument."); } CharSequence arg0 = parsedArgs.get(0); buf.ensureCapacity(buf.length() + call.length() + arg0.length() + 1); buf.append(call).append(arg0).append(')'); } /** * Appends {@code begin arg0 separator arg1 separator end} sequence to the input {@link * StringBuilder} * @param sb destination StringBuilder * @param begin begin string * @param separator separator string * @param end end string * @param args arguments */ public static void appendCall(StringBuilder sb, String begin, String separator, String end, List<? extends CharSequence> args) { int size = begin.length(); // Typically just-in-time compiler would eliminate Iterator in case foreach is used, // however the code below uses indexed iteration to keep the conde independent from // various JIT implementations (== avoid Iterator allocations even for not-so-smart // JITs) see https://bugs.openjdk.java.net/browse/JDK-8166840 see // http://2016.jpoint.ru/talks/cheremin/ (video and slides) int numberOfArguments = args.size(); for (int i = 0; i < numberOfArguments; i++) { size += args.get(i).length(); } size += separator.length() * (numberOfArguments - 1); sb.ensureCapacity(sb.length() + size + 1); sb.append(begin); for (int i = 0; i < numberOfArguments; i++) { if (i > 0) { sb.append(separator); } sb.append(args.get(i)); } sb.append(end); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIEscapeParser.java
package ai.heavy.jdbc; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; public class HeavyAIEscapeParser { private static final char[] QUOTE_OR_ALPHABETIC_MARKER = {'\"', '0'}; // private static final char[] QUOTE_OR_ALPHABETIC_MARKER_OR_PARENTHESIS = {'\"', '0', // '('}; private static final char[] SINGLE_QUOTE = {'\''}; private enum EscapeFunctions { ESC_FUNCTION("\\s*fn\\s+([^ ]*?)\\s*\\(", "\\(\\s*(.*)\\s*\\)", null), ESC_DATE("\\s*(d)\\s+", "('.*?')", "DATE "), ESC_TIME("\\s*(t)\\s+", "('.*?')", "TIME "), ESC_TIMESTAMP("\\s*(ts)\\s+", "('.*?')", "TIMESTAMP "); EscapeFunctions(String escapePattern, String argPattern, String replacementKeyword) { this.escapePattern = Pattern.compile(escapePattern); this.argPattern = Pattern.compile(argPattern); this.replacementKeyword = replacementKeyword; } private final Pattern escapePattern; private final Pattern argPattern; private final String replacementKeyword; private String call_escape_fn(String all_arguments, Method method) { try { StringBuilder sb = new StringBuilder(); List<CharSequence> parseArgs = new ArrayList<CharSequence>(3); int bracket_cnt = 0; StringBuilder args_sb = new StringBuilder(); for (int index = 0; index < all_arguments.length(); ++index) { if (all_arguments.charAt(index) == ',' && bracket_cnt == 0) { parseArgs.add(args_sb.toString()); args_sb.delete(0, args_sb.length()); continue; } if (all_arguments.charAt(index) == '(') { bracket_cnt++; } else if (all_arguments.charAt(index) == ')') { bracket_cnt--; } args_sb.append(all_arguments.charAt(index)); } // add the last argument. parseArgs.add(args_sb.toString()); method.invoke(null, sb, parseArgs); return sb.toString(); } catch (InvocationTargetException e) { throw new RuntimeException("Invocation fn argument parse error" + e.getMessage()); } catch (IllegalAccessException ilE) { throw new RuntimeException("Access fn argument error" + ilE.getMessage()); } } private String makeMatch(String sql) { Matcher matcher = escapePattern.matcher(sql); if (matcher.find()) { if (this == EscapeFunctions.ESC_DATE || this == EscapeFunctions.ESC_TIME || this == EscapeFunctions.ESC_TIMESTAMP) { matcher = argPattern.matcher(sql); if (matcher.find()) { String new_sql = this.replacementKeyword + matcher.group(1); return new_sql; } } else if (this == EscapeFunctions.ESC_FUNCTION) { String fn_name = matcher.group(1); Method method = HeavyAIEscapeFunctions.getFunction(fn_name); matcher = argPattern.matcher(sql); if (matcher.find()) { if (method == null) { String new_sql = fn_name + '(' + matcher.group(1) + ')'; return new_sql; } else { return call_escape_fn(matcher.group(1), method); } } } } return null; } public static String simple(String arg) { return arg; } public static String function(String arg) { return arg; } } private static class Pair { public int start; public int end; public Pair(int s) { start = s; } } private static String process_sql(String sql, Pair index) { String value = sql.substring(index.start, index.end); boolean found_match = false; for (EscapeFunctions xx : EscapeFunctions.values()) { String newsql = xx.makeMatch(value); if (newsql != null) { sql = sql.substring(0, index.start) + newsql + " " + sql.substring(index.end + 1, sql.length()); int x = newsql.length(); index.end = index.start + newsql.length(); found_match = true; break; } } if (!found_match) { // it's an array. Prepend '{' here, because parser will remove the original brace. sql = sql.substring(0, index.start) + "{" + sql.substring(index.start); index.end += 1; } return sql; } public static String parse(String sql) { Parser_return pR = parse(sql, 0); if (pR.bracket_cnt != 0) { throw new RuntimeException("Invalid java escape syntax - badly matched '}'"); } return pR.sql_value; } static class Parser_return { public String sql_value; public int bracket_cnt; public int end_idx; } private static Parser_return parse(String sql, int bracket_cnt) { int index = 0; boolean in_quote = false; do { if (sql.charAt(index) == '\'') { in_quote = !in_quote; } else if (sql.charAt(index) == '{' && !in_quote) { if (index + 1 == sql.length()) { // What ever string we get should have had limit nnn // added to the end and this test is veru unlikely throw new RuntimeException("Invalid java escape syntax - badly matched '{'"); } Parser_return pR = parse(sql.substring(index + 1), ++bracket_cnt); bracket_cnt = pR.bracket_cnt; String sql_snippet = pR.sql_value; sql = sql.substring(0, index) + " " + sql_snippet; index += pR.end_idx; } else if (sql.charAt(index) == '}' && !in_quote) { Pair ptr = new Pair(0); ptr.end = index; Parser_return pR = new Parser_return(); pR.sql_value = process_sql(sql, ptr); pR.bracket_cnt = --bracket_cnt; pR.end_idx = ptr.end + 1; return pR; } index++; } while (index < sql.length()); if (in_quote) { throw new RuntimeException("Invalid java escape syntax - badly matched '''"); } Parser_return pR = new Parser_return(); pR.sql_value = sql; pR.bracket_cnt = bracket_cnt; pR.end_idx = sql.length(); return pR; } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIExceptionText.java
package ai.heavy.jdbc; public class HeavyAIExceptionText { static String getExceptionDetail(Exception ex) { if (ex.getStackTrace().length < 1) { return "Error in stack trace processing"; } StackTraceElement sE = ex.getStackTrace()[0]; return "[" + sE.getFileName() + ":" + sE.getMethodName() + ":" + sE.getLineNumber() + ":" + ex.toString() + "]"; } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIPreparedStatement.java
/* * Copyright 2022 HEAVY.AI, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.heavy.jdbc; import org.apache.thrift.TException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.InputStream; import java.io.Reader; import java.math.BigDecimal; import java.net.URL; import java.sql.Array; import java.sql.Blob; import java.sql.Clob; import java.sql.Connection; import java.sql.Date; import java.sql.NClob; import java.sql.ParameterMetaData; import java.sql.PreparedStatement; import java.sql.Ref; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.RowId; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.SQLXML; import java.sql.Time; import java.sql.Timestamp; import java.sql.Types; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import ai.heavy.thrift.server.Heavy; import ai.heavy.thrift.server.TColumnType; import ai.heavy.thrift.server.TDBException; import ai.heavy.thrift.server.TStringRow; import ai.heavy.thrift.server.TStringValue; import ai.heavy.thrift.server.TTableDetails; class HeavyAIPreparedStatement implements PreparedStatement { final static Logger HEAVYDBLOGGER = LoggerFactory.getLogger(HeavyAIPreparedStatement.class); public SQLWarning rootWarning = null; private String currentSQL; private String insertTableName; private int parmCount = 0; private String brokenSQL[]; private String parmRep[]; private boolean parmIsNull[]; private String listOfFields[]; private int repCount; private String session; private Heavy.Client client; private HeavyAIStatement stmt = null; private boolean isInsert = false; private boolean isNewBatch = true; private boolean[] parmIsString = null; private List<TStringRow> rows = null; private static final Pattern REGEX_PATTERN = Pattern.compile("(?i)\\s+INTO\\s+(\\w+)"); private static final Pattern REGEX_LOF_PATTERN = Pattern.compile( "(?i)\\s*insert\\s+into\\s+[\\w:\\.]+\\s*\\(([\\w:\\s:\\,:\\']+)\\)[\\w:\\s]+\\("); // this regex ignores all multi- and single-line comments and whitespaces at the // beginning of a query and checks if the first meaningful word is SELECT private static final Pattern REGEX_IS_SELECT_PATTERN = Pattern.compile("^(?:\\s|--.*?\\R|/\\*[\\S\\s]*?\\*/|\\s*)*\\s*select[\\S\\s]*", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE); private boolean isClosed = false; HeavyAIPreparedStatement(String sql, String session, HeavyAIConnection connection) { HEAVYDBLOGGER.debug("Entered"); currentSQL = sql; this.client = connection.client; this.session = session; this.stmt = new HeavyAIStatement(session, connection); HEAVYDBLOGGER.debug("Prepared statement is " + currentSQL); // TODO in real life this needs to check if the ? is inside quotes before we // assume it // a parameter brokenSQL = currentSQL.split("\\?", -1); parmCount = brokenSQL.length - 1; parmRep = new String[parmCount]; parmIsNull = new boolean[parmCount]; parmIsString = new boolean[parmCount]; repCount = 0; if (currentSQL.toUpperCase().contains("INSERT ")) { // remove double quotes required for queries generated with " around all names // like // kafka connect currentSQL = currentSQL.replaceAll("\"", " "); HEAVYDBLOGGER.debug("Insert Prepared statement is " + currentSQL); isInsert = true; Matcher matcher = REGEX_PATTERN.matcher(currentSQL); while (matcher.find()) { insertTableName = matcher.group(1); HEAVYDBLOGGER.debug("Table name for insert is '" + insertTableName + "'"); } } } private String getQuery() { String qsql; // put string together if required if (parmCount > 0) { if (repCount != parmCount) { throw new UnsupportedOperationException( "Incorrect number of replace parameters for prepared statement " + currentSQL + " has only " + repCount + " parameters"); } StringBuilder modQuery = new StringBuilder(currentSQL.length() * 5); for (int i = 0; i < repCount; i++) { modQuery.append(brokenSQL[i]); if (parmIsNull[i]) { modQuery.append("NULL"); } else { if (parmIsString[i]) { modQuery.append("'").append(parmRep[i]).append("'"); } else { modQuery.append(parmRep[i]); } } } modQuery.append(brokenSQL[parmCount]); qsql = modQuery.toString(); } else { qsql = currentSQL; } qsql = qsql.replace(" WHERE 1=0", " LIMIT 1 "); HEAVYDBLOGGER.debug("Query is now " + qsql); repCount = 0; // reset the parameters return qsql; } private boolean isSelect() { Matcher matcher = REGEX_IS_SELECT_PATTERN.matcher(currentSQL); return matcher.matches(); } @Override public ResultSet executeQuery() throws SQLException { if (isNewBatch) { String qsql = getQuery(); HEAVYDBLOGGER.debug("executeQuery, sql=" + qsql); return stmt.executeQuery(qsql); } throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int executeUpdate() throws SQLException { HEAVYDBLOGGER.debug("Entered"); executeQuery(); // TODO: OmniSciDB supports updates, inserts and deletes, but // there is no way to get number of affected rows at the moment return -1; } @Override public void setNull(int parameterIndex, int sqlType) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmIsNull[parameterIndex - 1] = true; repCount++; } @Override public void setBoolean(int parameterIndex, boolean x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = x ? "true" : "false"; parmIsString[parameterIndex - 1] = false; parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setByte(int parameterIndex, byte x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setShort(int parameterIndex, short x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = Short.toString(x); parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setInt(int parameterIndex, int x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = Integer.toString(x); parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setLong(int parameterIndex, long x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = Long.toString(x); parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setFloat(int parameterIndex, float x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = Float.toString(x); parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setDouble(int parameterIndex, double x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = Double.toString(x); parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = x.toString(); parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setString(int parameterIndex, String x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); // add extra ' if there are any in string x = x.replaceAll("'", "''"); parmRep[parameterIndex - 1] = x; parmIsString[parameterIndex - 1] = true; parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setBytes(int parameterIndex, byte[] x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setDate(int parameterIndex, Date x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = x.toString(); parmIsString[parameterIndex - 1] = true; parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setTime(int parameterIndex, Time x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = x.toString(); parmIsString[parameterIndex - 1] = true; parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = x.toString(); // new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(x); parmIsString[parameterIndex - 1] = true; parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void clearParameters() throws SQLException { HEAVYDBLOGGER.debug("Entered"); // TODO MAT we will actually need to do something here one day } @Override public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setObject(int parameterIndex, Object x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean execute() throws SQLException { HEAVYDBLOGGER.debug("Entered"); String tQuery = getQuery(); return stmt.execute(tQuery); } @Override public void addBatch() throws SQLException { HEAVYDBLOGGER.debug("Entered"); if (isInsert) { // take the values and use stream inserter to add them if (isNewBatch) { // check for columns names Matcher matcher = REGEX_LOF_PATTERN.matcher(currentSQL); if (matcher.find()) { listOfFields = matcher.group(1).trim().split("\\s*,+\\s*,*\\s*"); if (listOfFields.length != parmCount) { throw new SQLException("Too many or too few values"); } else if (Arrays.stream(listOfFields).distinct().toArray().length != listOfFields.length) { throw new SQLException("Duplicated column name"); } List<String> listOfColumns = new ArrayList<String>(); try { TTableDetails tableDetails = client.get_table_details(session, insertTableName); for (TColumnType column : tableDetails.row_desc) { listOfColumns.add(column.col_name.toLowerCase()); } } catch (TException ex) { throw new SQLException(ex.toString()); } for (String paramName : listOfFields) { if (listOfColumns.indexOf(paramName) == -1) { throw new SQLException( "Column " + paramName.toLowerCase() + " does not exist"); } } } else { listOfFields = new String[0]; } rows = new ArrayList(5000); isNewBatch = false; } // add data to stream TStringRow tsr = new TStringRow(); for (int i = 0; i < parmCount; i++) { // place string in rows array TStringValue tsv = new TStringValue(); if (parmIsNull[i]) { tsv.is_null = true; } else { tsv.str_val = this.parmRep[i]; tsv.is_null = false; } tsr.addToCols(tsv); } rows.add(tsr); HEAVYDBLOGGER.debug("addBatch, rows=" + rows.size()); } else { throw new UnsupportedOperationException("addBatch only supported for insert, line:" + new Throwable().getStackTrace()[0].getLineNumber()); } } @Override public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setRef(int parameterIndex, Ref x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setBlob(int parameterIndex, Blob x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setClob(int parameterIndex, Clob x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setArray(int parameterIndex, Array x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); parmRep[parameterIndex - 1] = x.toString(); parmIsNull[parameterIndex - 1] = false; repCount++; } @Override public ResultSetMetaData getMetaData() throws SQLException { HEAVYDBLOGGER.debug("Entered"); if (!isSelect()) { return null; } if (stmt.getResultSet() != null) { return stmt.getResultSet().getMetaData(); } PreparedStatement ps = null; try { ps = new HeavyAIPreparedStatement( currentSQL, session, (HeavyAIConnection) getConnection()); ps.setMaxRows(0); for (int i = 1; i <= this.parmCount; ++i) { ps.setNull(i, Types.NULL); } ResultSet rs = ps.executeQuery(); if (rs != null) { return rs.getMetaData(); } else { return null; } } finally { if (ps != null) { ps.close(); } } } @Override public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setURL(int parameterIndex, URL x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ParameterMetaData getParameterMetaData() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setRowId(int parameterIndex, RowId x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setNString(int parameterIndex, String value) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setNClob(int parameterIndex, NClob value) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setObject( int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setClob(int parameterIndex, Reader reader) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setNClob(int parameterIndex, Reader reader) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet executeQuery(String sql) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int executeUpdate(String sql) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void close() throws SQLException { HEAVYDBLOGGER.debug("close"); if (stmt != null) { // TODO MAT probably more needed here stmt.close(); stmt = null; } isClosed = true; } @Override public int getMaxFieldSize() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setMaxFieldSize(int max) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getMaxRows() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return stmt.getMaxRows(); } @Override public void setMaxRows(int max) throws SQLException { HEAVYDBLOGGER.debug("Entered"); HEAVYDBLOGGER.debug("SetMaxRows to " + max); stmt.setMaxRows(max); } @Override public void setEscapeProcessing(boolean enable) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getQueryTimeout() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return 0; } @Override public void setQueryTimeout(int seconds) throws SQLException { HEAVYDBLOGGER.debug("Entered"); SQLWarning warning = new SQLWarning( "Query timeouts are not supported. Substituting a value of zero."); if (rootWarning == null) rootWarning = warning; else rootWarning.setNextWarning(warning); } @Override public void cancel() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public SQLWarning getWarnings() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return rootWarning; } @Override public void clearWarnings() throws SQLException { HEAVYDBLOGGER.debug("Entered"); rootWarning = null; } @Override public void setCursorName(String name) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean execute(String sql) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getResultSet() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return stmt.getResultSet(); } @Override public int getUpdateCount() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return stmt.getUpdateCount(); } @Override public boolean getMoreResults() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return stmt.getMoreResults(); } @Override public void setFetchDirection(int direction) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getFetchDirection() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return ResultSet.FETCH_FORWARD; } @Override public void setFetchSize(int rows) throws SQLException { HEAVYDBLOGGER.debug("Entered"); // TODO we need to chnage the model to allow smaller select chunks at the moment // you // get everything } @Override public int getFetchSize() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getResultSetConcurrency() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getResultSetType() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void addBatch(String sql) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void clearBatch() throws SQLException { HEAVYDBLOGGER.debug("Entered"); if (rows != null) { rows.clear(); } } @Override public int[] executeBatch() throws SQLException { checkClosed(); int ret[] = null; if (rows != null) { HEAVYDBLOGGER.debug("executeBatch, rows=" + rows.size()); try { // send the batch client.load_table(session, insertTableName, rows, Arrays.asList(listOfFields)); } catch (TDBException ex) { throw new SQLException("executeBatch failed: " + ex.getError_msg()); } catch (TException ex) { throw new SQLException("executeBatch failed: " + ex.toString()); } ret = new int[rows.size()]; for (int i = 0; i < rows.size(); i++) { ret[i] = 1; } clearBatch(); } return ret; } @Override public Connection getConnection() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return stmt.getConnection(); } @Override public boolean getMoreResults(int current) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getGeneratedKeys() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int executeUpdate(String sql, String[] columnNames) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean execute(String sql, int[] columnIndexes) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean execute(String sql, String[] columnNames) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getResultSetHoldability() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isClosed() throws SQLException { HEAVYDBLOGGER.debug("Entered"); return isClosed; } @Override public void setPoolable(boolean poolable) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isPoolable() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void closeOnCompletion() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isCloseOnCompletion() throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public <T> T unwrap(Class<T> iface) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { HEAVYDBLOGGER.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } private void checkClosed() throws SQLException { if (isClosed) { throw new SQLException("PreparedStatement is closed."); } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIResultSet.java
/* * Copyright 2022 HEAVY.AI, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.heavy.jdbc; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.InputStream; import java.io.Reader; import java.math.BigDecimal; import java.net.URL; import java.sql.*; import java.util.Calendar; import java.util.HashMap; import java.util.List; import java.util.Map; import ai.heavy.thrift.server.TColumnType; import ai.heavy.thrift.server.TDatumType; import ai.heavy.thrift.server.TQueryResult; import ai.heavy.thrift.server.TRowSet; // Useful debug string // System.out.println("Entered " + " line:" + new // Throwable().getStackTrace()[0].getLineNumber() + " class:" + new // Throwable().getStackTrace()[0].getClassName() + " method:" + new // Throwable().getStackTrace()[0].getMethodName()); class HeavyAIResultSet implements java.sql.ResultSet { final static Logger logger = LoggerFactory.getLogger(HeavyAIResultSet.class); private TQueryResult sqlResult = null; private int offset = -1; private int numOfRecords = 0; private String sql; private TRowSet rowSet = null; private List<TColumnType> rowDesc; private boolean wasNull = false; private Map<String, Integer> columnMap; private int fetchSize = 0; private SQLWarning warnings = null; private boolean isClosed = false; public HeavyAIResultSet(TQueryResult tsqlResult, String sql) throws SQLException { // logger.debug("Entered "+ sql ); sqlResult = tsqlResult; offset = -1; this.sql = sql; rowSet = sqlResult.getRow_set(); rowDesc = rowSet.getRow_desc(); // in the case of a create (maybe insert) nothing is returned in these field if (rowDesc.isEmpty()) { numOfRecords = 0; return; } rowDesc.get(0).getCol_name(); columnMap = new HashMap(); int current = 1; for (final TColumnType colType : rowDesc) { columnMap.put(colType.getCol_name(), current); current++; } if (rowSet.columns.isEmpty()) { numOfRecords = 0; } else { numOfRecords = rowSet.getColumns().get(0).getNullsSize(); } logger.debug("number of records is " + numOfRecords); // logger.debug("Record is "+ sqlResult.toString()); } HeavyAIResultSet() { numOfRecords = 0; } @Override public boolean next() throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); // do real work offset++; if (offset < numOfRecords) { return true; } return false; } @Override public void close() throws SQLException { // logger.debug("Entered "+ sql ); rowDesc = null; rowSet = null; sqlResult = null; isClosed = true; } @Override public boolean wasNull() throws SQLException { // logger.debug("Entered "+ sql ); return wasNull; } @Override public String getString(int columnIndex) throws SQLException { checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return null; } else { wasNull = false; TDatumType type = sqlResult.row_set.row_desc.get(columnIndex - 1).col_type.type; if (type == TDatumType.STR && !sqlResult.row_set.row_desc.get(columnIndex - 1).col_type.is_array) { return rowSet.columns.get(columnIndex - 1).data.str_col.get(offset); } else { return getStringInternal(columnIndex); } } } private String getStringInternal(int columnIndex) throws SQLException { if (sqlResult.row_set.row_desc.get(columnIndex - 1).col_type.is_array) { return getArray(columnIndex).toString(); } TDatumType type = sqlResult.row_set.row_desc.get(columnIndex - 1).col_type.type; switch (type) { case TINYINT: case SMALLINT: case INT: return String.valueOf(getInt(columnIndex)); case BIGINT: return String.valueOf(getLong(columnIndex)); case FLOAT: return String.valueOf(getFloat(columnIndex)); case DECIMAL: return String.valueOf(getFloat(columnIndex)); case DOUBLE: return String.valueOf(getDouble(columnIndex)); case STR: return getString(columnIndex); case TIME: return getTime(columnIndex).toString(); case TIMESTAMP: return getTimestamp(columnIndex).toString(); case DATE: return getDate(columnIndex).toString(); case BOOL: return getBoolean(columnIndex) ? "1" : "0"; case POINT: case LINESTRING: case MULTILINESTRING: case POLYGON: case MULTIPOLYGON: return (String) getObject(columnIndex); default: throw new AssertionError(type.name()); } } @Override public boolean getBoolean(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return false; } else { // assume column is str already for now wasNull = false; if (rowSet.columns.get(columnIndex - 1).data.int_col.get(offset) == 0) { return false; } else { return true; } } } @Override public byte getByte(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public short getShort(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return 0; } else { // assume column is str already for now wasNull = false; Long lObj = rowSet.columns.get(columnIndex - 1).data.int_col.get(offset); return lObj.shortValue(); } } @Override public int getInt(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return 0; } else { // assume column is str already for now wasNull = false; Long lObj = rowSet.columns.get(columnIndex - 1).data.int_col.get(offset); return lObj.intValue(); } } @Override public long getLong(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return 0; } else { // assume column is str already for now wasNull = false; return rowSet.columns.get(columnIndex - 1).data.int_col.get(offset); } } @Override public float getFloat(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return 0; } else { // assume column is str already for now wasNull = false; return rowSet.columns.get(columnIndex - 1).data.real_col.get(offset).floatValue(); } } @Override public double getDouble(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return 0; } else { // assume column is str already for now wasNull = false; TDatumType type = sqlResult.row_set.row_desc.get(columnIndex - 1).col_type.type; if (type == TDatumType.DOUBLE) { return rowSet.columns.get(columnIndex - 1).data.real_col.get(offset); } else { return getDoubleInternal(columnIndex); } } } private double getDoubleInternal(int columnIndex) throws SQLException { TDatumType type = sqlResult.row_set.row_desc.get(columnIndex - 1).col_type.type; switch (type) { case TINYINT: case SMALLINT: case INT: return (double) getInt(columnIndex); case BIGINT: return (double) getLong(columnIndex); case FLOAT: return (double) getFloat(columnIndex); case DECIMAL: return (double) getFloat(columnIndex); case DOUBLE: return getDouble(columnIndex); case STR: return Double.valueOf(getString(columnIndex)); case TIME: return (double) getTime(columnIndex).getTime(); case TIMESTAMP: return (double) getTimestamp(columnIndex).getTime(); case DATE: return (double) getDate(columnIndex).getTime(); case BOOL: return (double) (getBoolean(columnIndex) ? 1 : 0); default: throw new AssertionError(type.name()); } } @Override public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return null; } else { // assume column is str already for now wasNull = false; return BigDecimal.valueOf( rowSet.columns.get(columnIndex - 1).data.real_col.get(offset)); } } @Override public byte[] getBytes(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Date getDate(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); return getDate(columnIndex, null); } @Override public Time getTime(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); return getTime(columnIndex, null); } @Override public Timestamp getTimestamp(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); return getTimestamp(columnIndex, null); } private Timestamp extract_complex_time(long val, int precision) { long scale = (long) Math.pow(10, precision); double nano_part = Math.abs(val) % scale; if (val < 0) nano_part = -nano_part; nano_part = (int) ((nano_part + scale) % scale) * (long) Math.pow(10, 9 - precision); long micro_sec_value = (long) (val / scale); // Round value micro_sec_value = micro_sec_value - ((micro_sec_value < 0 && nano_part > 0) ? 1 : 0); Timestamp tm = new Timestamp( micro_sec_value * 1000); // convert to milli seconds and make a time tm.setNanos((int) (nano_part)); return tm; } private Timestamp adjust_precision(long val, int precision) { switch (precision) { case 0: return new Timestamp(val * 1000); case 3: return new Timestamp(val); case 6: case 9: return extract_complex_time(val, precision); default: throw new RuntimeException("Invalid precision [" + Integer.toString(precision) + "] returned. Valid values 0,3,6,9"); } } @Override public InputStream getAsciiStream(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public InputStream getUnicodeStream(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public InputStream getBinaryStream(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public String getString(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getString(findColumnByName(columnLabel)); } @Override public boolean getBoolean(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getBoolean(findColumnByName(columnLabel)); } @Override public byte getByte(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public short getShort(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getShort(findColumnByName(columnLabel)); } @Override public int getInt(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getInt(findColumnByName(columnLabel)); } @Override public long getLong(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getLong(findColumnByName(columnLabel)); } @Override public float getFloat(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getFloat(findColumnByName(columnLabel)); } @Override public double getDouble(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getDouble(findColumnByName(columnLabel)); } @Override public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException { // logger.debug("Entered "+ sql ); return getBigDecimal(findColumnByName(columnLabel)); } @Override public byte[] getBytes(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Date getDate(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getDate(columnLabel, null); } @Override public Time getTime(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getTime(columnLabel, null); } @Override public Timestamp getTimestamp(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getTimestamp(columnLabel, null); } @Override public InputStream getAsciiStream(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public InputStream getUnicodeStream(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public InputStream getBinaryStream(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public SQLWarning getWarnings() throws SQLException { // logger.debug("Entered "+ sql ); return warnings; } @Override public void clearWarnings() throws SQLException { // logger.debug("Entered "+ sql ); warnings = null; } @Override public String getCursorName() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSetMetaData getMetaData() throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); return new HeavyAIResultSetMetaData(sqlResult, sql); } @Override public Object getObject(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return null; } else { wasNull = false; if (rowDesc.get(columnIndex - 1).col_type.is_array) { return getArray(columnIndex); } switch (rowDesc.get(columnIndex - 1).col_type.type) { case TINYINT: case SMALLINT: case INT: case BIGINT: case BOOL: case TIME: case TIMESTAMP: case DATE: return this.rowSet.columns.get(columnIndex - 1).data.int_col.get(offset); case FLOAT: case DECIMAL: case DOUBLE: return this.rowSet.columns.get(columnIndex - 1).data.real_col.get(offset); case STR: case POINT: case LINESTRING: case MULTILINESTRING: case POLYGON: case MULTIPOLYGON: return this.rowSet.columns.get(columnIndex - 1).data.str_col.get(offset); default: throw new AssertionError(rowDesc.get(columnIndex - 1).col_type.type.name()); } } } @Override public Object getObject(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getObject(columnMap.get(columnLabel)); } @Override public int findColumn(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Reader getCharacterStream(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Reader getCharacterStream(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public BigDecimal getBigDecimal(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return null; } else { // assume column is str already for now wasNull = false; return BigDecimal.valueOf( rowSet.columns.get(columnIndex - 1).data.real_col.get(offset)); } } @Override public BigDecimal getBigDecimal(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getBigDecimal(columnMap.get(columnLabel)); } @Override public boolean isBeforeFirst() throws SQLException { // logger.debug("Entered "+ sql ); return offset == -1; } @Override public boolean isAfterLast() throws SQLException { // logger.debug("Entered "+ sql ); return offset == numOfRecords; } @Override public boolean isFirst() throws SQLException { // logger.debug("Entered "+ sql ); return offset == 0; } @Override public boolean isLast() throws SQLException { // logger.debug("Entered "+ sql ); return offset == numOfRecords - 1; } @Override public void beforeFirst() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void afterLast() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean first() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean last() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getRow() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean absolute(int row) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean relative(int rows) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean previous() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setFetchDirection(int direction) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getFetchDirection() throws SQLException { // logger.debug("Entered "+ sql ); return FETCH_FORWARD; } @Override public void setFetchSize(int rows) throws SQLException { // logger.debug("Entered "+ sql ); fetchSize = rows; } @Override public int getFetchSize() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getType() throws SQLException { // logger.debug("Entered "+ sql ); return TYPE_FORWARD_ONLY; } @Override public int getConcurrency() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean rowUpdated() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean rowInserted() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean rowDeleted() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNull(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBoolean(int columnIndex, boolean x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateByte(int columnIndex, byte x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateShort(int columnIndex, short x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateInt(int columnIndex, int x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateLong(int columnIndex, long x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateFloat(int columnIndex, float x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateDouble(int columnIndex, double x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateString(int columnIndex, String x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBytes(int columnIndex, byte[] x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateDate(int columnIndex, Date x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateTime(int columnIndex, Time x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateObject(int columnIndex, Object x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNull(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBoolean(String columnLabel, boolean x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateByte(String columnLabel, byte x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateShort(String columnLabel, short x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateInt(String columnLabel, int x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateLong(String columnLabel, long x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateFloat(String columnLabel, float x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateDouble(String columnLabel, double x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateString(String columnLabel, String x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBytes(String columnLabel, byte[] x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateDate(String columnLabel, Date x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateTime(String columnLabel, Time x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateObject(String columnLabel, Object x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void insertRow() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateRow() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void deleteRow() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void refreshRow() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void cancelRowUpdates() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void moveToInsertRow() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void moveToCurrentRow() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Statement getStatement() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Ref getRef(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Blob getBlob(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Clob getClob(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Array getArray(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return null; } else { wasNull = false; if (!rowDesc.get(columnIndex - 1).col_type.is_array) { throw new SQLException( "Column " + rowDesc.get(columnIndex - 1).col_name + " is not an array"); } Object[] elements; int size = rowSet.columns.get(columnIndex - 1).data.arr_col.get(offset).nulls.size(); switch (rowDesc.get(columnIndex - 1).col_type.type) { case TINYINT: elements = new Byte[size]; for (int i = 0; i < size; ++i) { elements[i] = rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.int_col.get(i) .byteValue(); } break; case SMALLINT: elements = new Short[size]; for (int i = 0; i < size; ++i) { elements[i] = rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.int_col.get(i) .shortValue(); } break; case INT: elements = new Integer[size]; for (int i = 0; i < size; ++i) { elements[i] = rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.int_col.get(i) .intValue(); } break; case BIGINT: elements = new Long[size]; for (int i = 0; i < size; ++i) { elements[i] = rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.int_col.get(i); } break; case BOOL: elements = new Boolean[size]; for (int i = 0; i < size; ++i) { elements[i] = rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.int_col.get(i) == 0; } break; case TIME: elements = new Time[size]; for (int i = 0; i < size; ++i) { elements[i] = new Time(rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.int_col.get(i) * 1000); } break; case TIMESTAMP: elements = new Timestamp[size]; for (int i = 0; i < size; ++i) { elements[i] = adjust_precision(rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.int_col.get(i), rowSet.row_desc.get(columnIndex - 1).col_type.getPrecision()); } break; case DATE: elements = new Date[size]; for (int i = 0; i < size; ++i) { elements[i] = new Date(rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.int_col.get(i) * 1000); } break; case FLOAT: elements = new Float[size]; for (int i = 0; i < size; ++i) { elements[i] = rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.real_col.get(i) .floatValue(); } break; case DECIMAL: elements = new BigDecimal[size]; for (int i = 0; i < size; ++i) { elements[i] = BigDecimal.valueOf(rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.real_col.get(i)); } break; case DOUBLE: elements = new Double[size]; for (int i = 0; i < size; ++i) { elements[i] = rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.real_col.get(i); } break; case STR: case POINT: case LINESTRING: case MULTILINESTRING: case POLYGON: case MULTIPOLYGON: elements = new String[size]; for (int i = 0; i < size; ++i) { elements[i] = rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .data.str_col.get(i); } break; default: throw new AssertionError(rowDesc.get(columnIndex - 1).col_type.type.name()); } for (int i = 0; i < size; ++i) { if (this.rowSet.columns.get(columnIndex - 1) .data.arr_col.get(offset) .nulls.get(i)) { elements[i] = null; } } return new HeavyAIArray(rowDesc.get(columnIndex - 1).col_type.type, elements); } } @Override public Object getObject(String columnLabel, Map<String, Class<?>> map) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Ref getRef(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Blob getBlob(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Clob getClob(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Array getArray(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); return getArray(findColumnByName(columnLabel)); } // this method is used to add a TZ from Calendar; is TimeZone in the calendar // isn't // specified it uses the local TZ private long getOffsetFromTZ(long actualmillis, Calendar cal, int precision) { long offset; if (cal.getTimeZone() != null) { offset = cal.getTimeZone().getOffset(actualmillis); } else { offset = Calendar.getInstance().getTimeZone().getOffset(actualmillis); } switch (precision) { case 0: return offset / 1000; case 3: return offset; case 6: return offset * 1000; case 9: return offset * 1000000; default: throw new RuntimeException("Invalid precision [" + Integer.toString(precision) + "] returned. Valid values 0,3,6,9"); } } @Override public Date getDate(int columnIndex, Calendar cal) throws SQLException { checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return null; } else { // assume column is str already for now wasNull = false; long val = rowSet.columns.get(columnIndex - 1).data.int_col.get(offset); if (cal != null) { val += getOffsetFromTZ(val, cal, 0); } Date d = new Date(val * 1000); return d; } } @Override public Date getDate(String columnLabel, Calendar cal) throws SQLException { return getDate(findColumnByName(columnLabel), cal); } @Override public Time getTime(int columnIndex, Calendar cal) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return null; } else { // assume column is str already for now wasNull = false; long val = rowSet.columns.get(columnIndex - 1).data.int_col.get(offset); if (cal != null) { val += getOffsetFromTZ(val, cal, 0); } return new Time(val * 1000); } } @Override public Time getTime(String columnLabel, Calendar cal) throws SQLException { // logger.debug("Entered "+ sql ); return getTime(findColumnByName(columnLabel), cal); } @Override public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { // logger.debug("Entered "+ sql ); checkClosed(); if (rowSet.columns.get(columnIndex - 1).nulls.get(offset)) { wasNull = true; return null; } else { // assume column is str already for now wasNull = false; long val = rowSet.columns.get(columnIndex - 1).data.int_col.get(offset); int precision = rowSet.row_desc.get(columnIndex - 1).col_type.getPrecision(); if (cal != null) { val += getOffsetFromTZ(val, cal, precision); } return adjust_precision(val, precision); } } @Override public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException { // logger.debug("Entered "+ sql ); return getTimestamp(findColumnByName(columnLabel), cal); } @Override public URL getURL(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public URL getURL(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateRef(int columnIndex, Ref x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateRef(String columnLabel, Ref x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBlob(int columnIndex, Blob x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBlob(String columnLabel, Blob x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateClob(int columnIndex, Clob x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateClob(String columnLabel, Clob x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateArray(int columnIndex, Array x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateArray(String columnLabel, Array x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public RowId getRowId(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public RowId getRowId(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateRowId(int columnIndex, RowId x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateRowId(String columnLabel, RowId x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getHoldability() throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isClosed() throws SQLException { // logger.debug("Entered "+ sql ); return isClosed; } @Override public void updateNString(int columnIndex, String nString) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNString(String columnLabel, String nString) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNClob(int columnIndex, NClob nClob) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNClob(String columnLabel, NClob nClob) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public NClob getNClob(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public NClob getNClob(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public SQLXML getSQLXML(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public SQLXML getSQLXML(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public String getNString(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public String getNString(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Reader getNCharacterStream(int columnIndex) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Reader getNCharacterStream(String columnLabel) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateCharacterStream(int columnIndex, Reader x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateClob(int columnIndex, Reader reader) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateClob(String columnLabel, Reader reader) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNClob(int columnIndex, Reader reader) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void updateNClob(String columnLabel, Reader reader) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public <T> T getObject(int columnIndex, Class<T> type) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public <T> T getObject(String columnLabel, Class<T> type) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public <T> T unwrap(Class<T> iface) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } private Integer findColumnByName(String name) throws SQLException { Integer colNum = columnMap.get(name); if (colNum == null) { throw new SQLException("Could not find the column " + name); } return colNum; } private void checkClosed() throws SQLException { if (isClosed) { throw new SQLException("ResultSet is closed."); } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIResultSetMetaData.java
/* * Copyright 2022 HEAVY.AI, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.heavy.jdbc; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.sql.DatabaseMetaData; import java.sql.ResultSetMetaData; import java.sql.SQLException; import ai.heavy.thrift.server.TDatumType; import ai.heavy.thrift.server.TQueryResult; class HeavyAIResultSetMetaData implements ResultSetMetaData { final static Logger logger = LoggerFactory.getLogger(HeavyAIResultSetMetaData.class); final TQueryResult sqlResult; final String sql; public HeavyAIResultSetMetaData(TQueryResult sqlResult, String sql) { this.sqlResult = sqlResult; this.sql = sql; } @Override public int getColumnCount() throws SQLException { // logger.debug("Entered "+ sql ); return sqlResult.row_set.row_desc.size(); } @Override public boolean isAutoIncrement(int column) throws SQLException { // logger.debug("Entered "+ sql ); // logger.debug("returning false"); return false; } @Override public boolean isCaseSensitive(int column) throws SQLException { // logger.debug("Entered "+ sql ); return true; } @Override public boolean isSearchable(int column) throws SQLException { // logger.debug("Entered "+ sql ); return false; } @Override public boolean isCurrency(int column) throws SQLException { // logger.debug("Entered "+ sql ); return false; } @Override public int isNullable(int column) throws SQLException { // logger.debug("Entered "+ sql ); return sqlResult.row_set.row_desc.get(column - 1).col_type.nullable ? DatabaseMetaData.columnNullable : DatabaseMetaData.columnNoNulls; } @Override public boolean isSigned(int column) throws SQLException { // logger.debug("Entered "+ sql ); return true; } @Override public int getColumnDisplaySize(int column) throws SQLException { // logger.debug("Entered "+ sql ); return 100; } @Override public String getColumnLabel(int column) throws SQLException { // logger.debug("Entered "+ sql ); // logger.debug("ColumnLabel is "+ sqlResult.row_set.row_desc.get(column // -1).col_name); return sqlResult.row_set.row_desc.get(column - 1).col_name; } @Override public String getColumnName(int column) throws SQLException { // logger.debug("Entered "+ sql ); return sqlResult.row_set.row_desc.get(column - 1).getCol_name(); } @Override public String getSchemaName(int column) throws SQLException { // logger.debug("Entered "+ sql ); return null; } @Override public int getPrecision(int column) throws SQLException { // logger.debug("Entered "+ sql ); return sqlResult.row_set.row_desc.get(column - 1).col_type.precision; } @Override public int getScale(int column) throws SQLException { // logger.debug("Entered "+ sql ); return sqlResult.row_set.row_desc.get(column - 1).col_type.scale; } @Override public String getTableName(int column) throws SQLException { // logger.debug("Entered "+ sql ); return "tableName??"; } @Override public String getCatalogName(int column) throws SQLException { // logger.debug("Entered "+ sql ); return null; } @Override public int getColumnType(int column) throws SQLException { // logger.debug("Entered "+ sql ); TDatumType type = sqlResult.row_set.row_desc.get(column - 1).col_type.type; return HeavyAIType.toJava(type); } @Override public String getColumnTypeName(int column) throws SQLException { // logger.debug("Entered "+ sql ); return sqlResult.row_set.row_desc.get(column - 1).col_type.type.name(); } @Override public boolean isReadOnly(int column) throws SQLException { // logger.debug("Entered "+ sql ); return true; } @Override public boolean isWritable(int column) throws SQLException { // logger.debug("Entered "+ sql ); return false; } @Override public boolean isDefinitelyWritable(int column) throws SQLException { // logger.debug("Entered "+ sql ); return false; } @Override public String getColumnClassName(int column) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public <T> T unwrap(Class<T> iface) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { // logger.debug("Entered "+ sql ); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIStatement.java
/* * Copyright 2022 HEAVY.AI, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.heavy.jdbc; import org.apache.thrift.TException; import org.slf4j.LoggerFactory; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.SQLWarning; import java.util.regex.Matcher; import java.util.regex.Pattern; import ai.heavy.thrift.server.Heavy; import ai.heavy.thrift.server.TDBException; import ai.heavy.thrift.server.TQueryResult; public class HeavyAIStatement implements java.sql.Statement { final static org.slf4j.Logger logger = LoggerFactory.getLogger(HeavyAIStatement.class); public SQLWarning rootWarning = null; private String session; private Heavy.Client client; private HeavyAIConnection connection; private ResultSet currentRS = null; private TQueryResult sqlResult = null; private int maxRows; // add limit to unlimited queries private boolean escapeProcessing = false; private boolean isClosed = false; HeavyAIStatement(String tsession, HeavyAIConnection tconnection) { session = tsession; connection = tconnection; client = connection.client; maxRows = Integer.parseInt(connection.cP.getProperty(Options.max_rows)); } static Pattern top_pattern = Pattern.compile("select top\\s+([0-9]+)\\s+", Pattern.CASE_INSENSITIVE); @Override public ResultSet executeQuery(String sql) throws SQLException { // logger.debug("Entered"); checkClosed(); // @TODO: we can and probably should use "first_n" parameter of the // sql_execute() // endpoint to force the limit on the query, instead of rewriting it here. if (maxRows >= 0) { // add limit to sql call if it doesn't already have one and is a select String[] tokens = sql.toLowerCase().split(" ", 3); if (tokens[0].equals("select")) { if (sql.toLowerCase().contains("limit")) { // do nothing - } else { // Some applications add TOP <number> to limit the // select statement rather than limit. Remove TOP and keep // the number it used as the limit. Matcher matcher = top_pattern.matcher(sql); // Take "select TOP nnnn <rest ot sql>" and translate to select <reset of sql: // limit nnnn if (matcher.find()) { maxRows = Integer.parseInt(matcher.group(1)); sql = top_pattern.matcher(sql).replaceAll("select "); } sql = sql + " LIMIT " + maxRows; logger.debug("Added LIMIT of " + maxRows); } } } logger.debug("Before HeavyAIEscapeParser [" + sql + "]"); // The order of these to SQL re-writes is important. // EscapeParse needs to come first. String afterEscapeParseSQL = HeavyAIEscapeParser.parse(sql); String afterSimpleParse = simplisticDateTransform(afterEscapeParseSQL); logger.debug("After HeavyAIEscapeParser [" + afterSimpleParse + "]"); try { sqlResult = client.sql_execute(session, afterSimpleParse + ";", true, null, -1, -1); } catch (TDBException ex) { throw new SQLException( "Query failed : " + HeavyAIExceptionText.getExceptionDetail(ex)); } catch (TException ex) { throw new SQLException( "Query failed : " + HeavyAIExceptionText.getExceptionDetail(ex)); } currentRS = new HeavyAIResultSet(sqlResult, sql); return currentRS; } @Override public void cancel() throws SQLException { // logger.debug("Entered"); checkClosed(); HeavyAIConnection alternate_connection = null; try { alternate_connection = connection.getAlternateConnection(); // Note alternate_connection shares a session with original connection alternate_connection.client.interrupt(session, session); } catch (TDBException ttE) { throw new SQLException("Thrift transport connection failed - " + HeavyAIExceptionText.getExceptionDetail(ttE), ttE); } catch (TException tE) { throw new SQLException( "Thrift failed - " + HeavyAIExceptionText.getExceptionDetail(tE), tE); } finally { // Note closeConnection only closes the underlying thrft connection // not the logical db session connection alternate_connection.closeConnection(); } } @Override public int executeUpdate(String sql) throws SQLException { // logger.debug("Entered"); checkClosed(); try { // remove " characters if it is a CREATE statement if (sql.trim().substring(0, 6).compareToIgnoreCase("CREATE") == 0) { sql = sql.replace('"', ' '); } sqlResult = client.sql_execute(session, sql + ";", true, null, -1, -1); } catch (TDBException ex) { throw new SQLException("Query failed : sql was '" + sql + "' " + HeavyAIExceptionText.getExceptionDetail(ex), ex); } catch (TException ex) { throw new SQLException( "Query failed : " + HeavyAIExceptionText.getExceptionDetail(ex), ex); } // TODO: OmniSciDB supports updates, inserts and deletes, but // there is no way to get number of affected rows at the moment return -1; } @Override public void close() throws SQLException { // logger.debug("Entered"); if (currentRS != null) { currentRS.close(); } isClosed = true; } @Override public int getMaxFieldSize() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void setMaxFieldSize(int max) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getMaxRows() throws SQLException { // logger.debug("Entered"); return maxRows; } @Override public void setMaxRows(int max) throws SQLException { // logger.debug("Entered"); maxRows = max; } @Override public void setEscapeProcessing(boolean enable) throws SQLException { // logger.debug("Entered"); escapeProcessing = enable; } @Override public int getQueryTimeout() throws SQLException { // logger.debug("Entered"); return 0; } // used by benchmarking to get internal execution times public int getQueryInternalExecuteTime() throws SQLException { // logger.debug("Entered"); return (int) sqlResult.execution_time_ms; } @Override public void setQueryTimeout(int seconds) throws SQLException { // logger.debug("Entered"); SQLWarning warning = new SQLWarning( "Query timeouts are not supported. Substituting a value of zero."); if (rootWarning == null) { rootWarning = warning; } else { rootWarning.setNextWarning(warning); } } @Override public SQLWarning getWarnings() throws SQLException { // logger.debug("Entered"); return (rootWarning); } @Override public void clearWarnings() throws SQLException { // logger.debug("Entered"); rootWarning = null; } @Override public void setCursorName(String name) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean execute(String sql) throws SQLException { // logger.debug("Entered"); ResultSet rs = executeQuery(sql); if (rs != null) { return true; } else { return false; } } @Override public ResultSet getResultSet() throws SQLException { // logger.debug("Entered"); checkClosed(); return currentRS; } @Override public int getUpdateCount() throws SQLException { // logger.debug("Entered"); checkClosed(); // TODO: OmniSciDB supports updates, inserts and deletes, but // there is no way to get number of affected rows at the moment return -1; } @Override public boolean getMoreResults() throws SQLException { // logger.debug("Entered"); checkClosed(); // TODO MAT this needs to be fixed for complex queries return false; } @Override public void setFetchDirection(int direction) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getFetchDirection() throws SQLException { // logger.debug("Entered"); return ResultSet.FETCH_FORWARD; } @Override public void setFetchSize(int rows) throws SQLException { // logger.debug("Entered"); SQLWarning warning = new SQLWarning( "Query FetchSize are not supported. Substituting a value of zero."); if (rootWarning == null) { rootWarning = warning; } else { rootWarning.setNextWarning(warning); } } @Override public int getFetchSize() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getResultSetConcurrency() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getResultSetType() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void addBatch(String sql) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void clearBatch() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int[] executeBatch() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public Connection getConnection() throws SQLException { // logger.debug("Entered"); return connection; } @Override public boolean getMoreResults(int current) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public ResultSet getGeneratedKeys() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int executeUpdate(String sql, String[] columnNames) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean execute(String sql, int[] columnIndexes) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean execute(String sql, String[] columnNames) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public int getResultSetHoldability() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isClosed() throws SQLException { // logger.debug("Entered"); return isClosed; } @Override public void setPoolable(boolean poolable) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isPoolable() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public void closeOnCompletion() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isCloseOnCompletion() throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public <T> T unwrap(Class<T> iface) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { // logger.debug("Entered"); throw new UnsupportedOperationException("Not supported yet," + " line:" + new Throwable().getStackTrace()[0].getLineNumber() + " class:" + new Throwable().getStackTrace()[0].getClassName() + " method:" + new Throwable().getStackTrace()[0].getMethodName()); } private static final Pattern QUARTER = Pattern.compile( "\\sQUARTER\\(([^\\{]*?)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE); private static final Pattern DAYOFYEAR = Pattern.compile( "\\sDAYOFYEAR\\(([^\\{]*?)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE); private static final Pattern DAYOFWEEK = Pattern.compile( "\\sDAYOFWEEK\\(([^\\{]*?)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE); private static final Pattern WEEK = Pattern.compile( "\\sWEEK\\(([^\\{]*?)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE); /* * CURRENTDATE should match CURRENT_DATE * and CURRENT_DATE() where the two strings are 'joined' to either white space, * punctuation or some kind of brackets. if they are joined to * any alpha numeric For example 'CURRENT_TIME)' is okay while a string * like CURRENT_DATE_NOW isn't * * Note we've include the non standard version with parenthesis to align with * third * party software. * * Breaking down the components of the pattern * (?<![\\w.]) The pattern can not be preceded by any word character or a '.' * (?:\\(\\))? pattern can end in zero or one '()' - note non capture group * (?![\\w.]) the pattern can not be followed by a word character or a '.' * Note - word characters include '_' */ ; private static final Pattern CURRENTDATE = Pattern.compile("(?<![\\w.])CURRENT_DATE(?:\\(\\))?(?![\\w.])", Pattern.DOTALL | Pattern.CASE_INSENSITIVE); public static String simplisticDateTransform(String sql) { // need to iterate as each reduction of string opens up a anew match String start; do { // Example transform - select quarter(val) from table; // will become select extract(quarter from val) from table; // will also replace all CURRENT_TIME and CURRENT_DATE with a call to now(). start = sql; sql = QUARTER.matcher(sql).replaceAll(" EXTRACT(QUARTER FROM $1"); } while (!sql.equals(start)); do { start = sql; sql = DAYOFYEAR.matcher(sql).replaceAll(" EXTRACT(DOY FROM $1"); } while (!sql.equals(start)); do { start = sql; sql = DAYOFWEEK.matcher(sql).replaceAll(" EXTRACT(ISODOW FROM $1"); } while (!sql.equals(start)); do { start = sql; sql = WEEK.matcher(sql).replaceAll(" EXTRACT(WEEK FROM $1"); } while (!sql.equals(start)); do { start = sql; sql = CURRENTDATE.matcher(sql).replaceAll(" cast(now() as date) "); } while (!sql.equals(start)); return sql; } private void checkClosed() throws SQLException { if (isClosed) { throw new SQLException("Statement is closed."); } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/jdbc/HeavyAIType.java
/* * Copyright 2022 HEAVY.AI, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.heavy.jdbc; import java.sql.DatabaseMetaData; import ai.heavy.thrift.server.TDatumType; class HeavyAIType { protected String typeName; // String => Type name protected int dataType; // int => SQL data type from java.sql.Types protected int precision; // int => maximum precision protected String literalPrefix; // String => prefix used to quote a literal (may be null) protected String literalSuffix; // String => suffix used to quote a literal (may be null) protected String createParams; // String => parameters used in creating the type (may be null) protected short nullable; // short => can you use NULL for this type. // typeNoNulls - does not allow NULL values // typeNullable - allows NULL values // typeNullableUnknown - nullability unknown protected boolean caseSensitive; // boolean=> is it case sensitive. protected short searchable; // short => can you use "WHERE" based on this type: // typePredNone - No support // typePredChar - Only supported with WHERE .. LIKE // typePredBasic - Supported except for WHERE .. LIKE // typeSearchable - Supported for all WHERE .. protected boolean unsignedAttribute; // boolean => is it unsigned. protected boolean fixedPrecScale; // boolean => can it be a money value. protected boolean autoIncrement; // boolean => can it be used for an auto-increment value. protected String localTypeName; // String => localized version of type name (may be null) protected short minimumScale; // short => minimum scale supported protected short maximumScale; // short => maximum scale supported protected int SqlDataType; // int => unused protected int SqlDatetimeSub; // int => unused protected int numPrecRadix; // int => usually 2 or 10 void HeavyAIType(String tn, int dt) { typeName = tn; dataType = dt; precision = 10; literalPrefix = null; literalSuffix = null; createParams = null; nullable = DatabaseMetaData.typeNullable; caseSensitive = true; searchable = DatabaseMetaData.typeSearchable; unsignedAttribute = false; fixedPrecScale = false; autoIncrement = false; localTypeName = tn; minimumScale = 1; maximumScale = 20; SqlDataType = 0; SqlDatetimeSub = 0; numPrecRadix = 10; } static int toJava(TDatumType type) { switch (type) { case TINYINT: return java.sql.Types.TINYINT; case SMALLINT: return java.sql.Types.SMALLINT; case INT: return java.sql.Types.INTEGER; case BIGINT: return java.sql.Types.BIGINT; case FLOAT: return java.sql.Types.FLOAT; case DECIMAL: return java.sql.Types.DECIMAL; case DOUBLE: return java.sql.Types.DOUBLE; case STR: return java.sql.Types.VARCHAR; case TIME: return java.sql.Types.TIME; case TIMESTAMP: return java.sql.Types.TIMESTAMP; case DATE: return java.sql.Types.DATE; case BOOL: return java.sql.Types.BOOLEAN; case POINT: case POLYGON: case MULTIPOLYGON: case LINESTRING: case MULTILINESTRING: return java.sql.Types.OTHER; default: throw new AssertionError(type.name()); } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/CalciteServer.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class CalciteServer { public interface Iface { public void ping() throws org.apache.thrift.TException; public void shutdown() throws org.apache.thrift.TException; public TPlanResult process(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.lang.String sql_text, TQueryParsingOption query_parsing_option, TOptimizationOption optimization_option, java.util.List<TRestriction> restrictions) throws InvalidParseRequest, org.apache.thrift.TException; public java.lang.String getExtensionFunctionWhitelist() throws org.apache.thrift.TException; public java.lang.String getUserDefinedFunctionWhitelist() throws org.apache.thrift.TException; public java.lang.String getRuntimeExtensionFunctionWhitelist() throws org.apache.thrift.TException; public void setRuntimeExtensionFunctions(java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, boolean isruntime) throws org.apache.thrift.TException; public void updateMetadata(java.lang.String catalog, java.lang.String table) throws org.apache.thrift.TException; public java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> getCompletionHints(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.util.List<java.lang.String> visible_tables, java.lang.String sql, int cursor) throws org.apache.thrift.TException; } public interface AsyncIface { public void ping(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void shutdown(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void process(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.lang.String sql_text, TQueryParsingOption query_parsing_option, TOptimizationOption optimization_option, java.util.List<TRestriction> restrictions, org.apache.thrift.async.AsyncMethodCallback<TPlanResult> resultHandler) throws org.apache.thrift.TException; public void getExtensionFunctionWhitelist(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException; public void getUserDefinedFunctionWhitelist(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException; public void getRuntimeExtensionFunctionWhitelist(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException; public void setRuntimeExtensionFunctions(java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, boolean isruntime, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void updateMetadata(java.lang.String catalog, java.lang.String table, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void getCompletionHints(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.util.List<java.lang.String> visible_tables, java.lang.String sql, int cursor, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public void ping() throws org.apache.thrift.TException { send_ping(); recv_ping(); } public void send_ping() throws org.apache.thrift.TException { ping_args args = new ping_args(); sendBase("ping", args); } public void recv_ping() throws org.apache.thrift.TException { ping_result result = new ping_result(); receiveBase(result, "ping"); return; } public void shutdown() throws org.apache.thrift.TException { send_shutdown(); recv_shutdown(); } public void send_shutdown() throws org.apache.thrift.TException { shutdown_args args = new shutdown_args(); sendBase("shutdown", args); } public void recv_shutdown() throws org.apache.thrift.TException { shutdown_result result = new shutdown_result(); receiveBase(result, "shutdown"); return; } public TPlanResult process(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.lang.String sql_text, TQueryParsingOption query_parsing_option, TOptimizationOption optimization_option, java.util.List<TRestriction> restrictions) throws InvalidParseRequest, org.apache.thrift.TException { send_process(user, passwd, catalog, sql_text, query_parsing_option, optimization_option, restrictions); return recv_process(); } public void send_process(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.lang.String sql_text, TQueryParsingOption query_parsing_option, TOptimizationOption optimization_option, java.util.List<TRestriction> restrictions) throws org.apache.thrift.TException { process_args args = new process_args(); args.setUser(user); args.setPasswd(passwd); args.setCatalog(catalog); args.setSql_text(sql_text); args.setQuery_parsing_option(query_parsing_option); args.setOptimization_option(optimization_option); args.setRestrictions(restrictions); sendBase("process", args); } public TPlanResult recv_process() throws InvalidParseRequest, org.apache.thrift.TException { process_result result = new process_result(); receiveBase(result, "process"); if (result.isSetSuccess()) { return result.success; } if (result.parseErr != null) { throw result.parseErr; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "process failed: unknown result"); } public java.lang.String getExtensionFunctionWhitelist() throws org.apache.thrift.TException { send_getExtensionFunctionWhitelist(); return recv_getExtensionFunctionWhitelist(); } public void send_getExtensionFunctionWhitelist() throws org.apache.thrift.TException { getExtensionFunctionWhitelist_args args = new getExtensionFunctionWhitelist_args(); sendBase("getExtensionFunctionWhitelist", args); } public java.lang.String recv_getExtensionFunctionWhitelist() throws org.apache.thrift.TException { getExtensionFunctionWhitelist_result result = new getExtensionFunctionWhitelist_result(); receiveBase(result, "getExtensionFunctionWhitelist"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getExtensionFunctionWhitelist failed: unknown result"); } public java.lang.String getUserDefinedFunctionWhitelist() throws org.apache.thrift.TException { send_getUserDefinedFunctionWhitelist(); return recv_getUserDefinedFunctionWhitelist(); } public void send_getUserDefinedFunctionWhitelist() throws org.apache.thrift.TException { getUserDefinedFunctionWhitelist_args args = new getUserDefinedFunctionWhitelist_args(); sendBase("getUserDefinedFunctionWhitelist", args); } public java.lang.String recv_getUserDefinedFunctionWhitelist() throws org.apache.thrift.TException { getUserDefinedFunctionWhitelist_result result = new getUserDefinedFunctionWhitelist_result(); receiveBase(result, "getUserDefinedFunctionWhitelist"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserDefinedFunctionWhitelist failed: unknown result"); } public java.lang.String getRuntimeExtensionFunctionWhitelist() throws org.apache.thrift.TException { send_getRuntimeExtensionFunctionWhitelist(); return recv_getRuntimeExtensionFunctionWhitelist(); } public void send_getRuntimeExtensionFunctionWhitelist() throws org.apache.thrift.TException { getRuntimeExtensionFunctionWhitelist_args args = new getRuntimeExtensionFunctionWhitelist_args(); sendBase("getRuntimeExtensionFunctionWhitelist", args); } public java.lang.String recv_getRuntimeExtensionFunctionWhitelist() throws org.apache.thrift.TException { getRuntimeExtensionFunctionWhitelist_result result = new getRuntimeExtensionFunctionWhitelist_result(); receiveBase(result, "getRuntimeExtensionFunctionWhitelist"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRuntimeExtensionFunctionWhitelist failed: unknown result"); } public void setRuntimeExtensionFunctions(java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, boolean isruntime) throws org.apache.thrift.TException { send_setRuntimeExtensionFunctions(udfs, udtfs, isruntime); recv_setRuntimeExtensionFunctions(); } public void send_setRuntimeExtensionFunctions(java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, boolean isruntime) throws org.apache.thrift.TException { setRuntimeExtensionFunctions_args args = new setRuntimeExtensionFunctions_args(); args.setUdfs(udfs); args.setUdtfs(udtfs); args.setIsruntime(isruntime); sendBase("setRuntimeExtensionFunctions", args); } public void recv_setRuntimeExtensionFunctions() throws org.apache.thrift.TException { setRuntimeExtensionFunctions_result result = new setRuntimeExtensionFunctions_result(); receiveBase(result, "setRuntimeExtensionFunctions"); return; } public void updateMetadata(java.lang.String catalog, java.lang.String table) throws org.apache.thrift.TException { send_updateMetadata(catalog, table); recv_updateMetadata(); } public void send_updateMetadata(java.lang.String catalog, java.lang.String table) throws org.apache.thrift.TException { updateMetadata_args args = new updateMetadata_args(); args.setCatalog(catalog); args.setTable(table); sendBase("updateMetadata", args); } public void recv_updateMetadata() throws org.apache.thrift.TException { updateMetadata_result result = new updateMetadata_result(); receiveBase(result, "updateMetadata"); return; } public java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> getCompletionHints(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.util.List<java.lang.String> visible_tables, java.lang.String sql, int cursor) throws org.apache.thrift.TException { send_getCompletionHints(user, passwd, catalog, visible_tables, sql, cursor); return recv_getCompletionHints(); } public void send_getCompletionHints(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.util.List<java.lang.String> visible_tables, java.lang.String sql, int cursor) throws org.apache.thrift.TException { getCompletionHints_args args = new getCompletionHints_args(); args.setUser(user); args.setPasswd(passwd); args.setCatalog(catalog); args.setVisible_tables(visible_tables); args.setSql(sql); args.setCursor(cursor); sendBase("getCompletionHints", args); } public java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> recv_getCompletionHints() throws org.apache.thrift.TException { getCompletionHints_result result = new getCompletionHints_result(); receiveBase(result, "getCompletionHints"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCompletionHints failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void ping(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); ping_call method_call = new ping_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { public ping_call(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ping", org.apache.thrift.protocol.TMessageType.CALL, 0)); ping_args args = new ping_args(); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void shutdown(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); shutdown_call method_call = new shutdown_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class shutdown_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { public shutdown_call(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shutdown", org.apache.thrift.protocol.TMessageType.CALL, 0)); shutdown_args args = new shutdown_args(); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void process(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.lang.String sql_text, TQueryParsingOption query_parsing_option, TOptimizationOption optimization_option, java.util.List<TRestriction> restrictions, org.apache.thrift.async.AsyncMethodCallback<TPlanResult> resultHandler) throws org.apache.thrift.TException { checkReady(); process_call method_call = new process_call(user, passwd, catalog, sql_text, query_parsing_option, optimization_option, restrictions, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class process_call extends org.apache.thrift.async.TAsyncMethodCall<TPlanResult> { private java.lang.String user; private java.lang.String passwd; private java.lang.String catalog; private java.lang.String sql_text; private TQueryParsingOption query_parsing_option; private TOptimizationOption optimization_option; private java.util.List<TRestriction> restrictions; public process_call(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.lang.String sql_text, TQueryParsingOption query_parsing_option, TOptimizationOption optimization_option, java.util.List<TRestriction> restrictions, org.apache.thrift.async.AsyncMethodCallback<TPlanResult> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.user = user; this.passwd = passwd; this.catalog = catalog; this.sql_text = sql_text; this.query_parsing_option = query_parsing_option; this.optimization_option = optimization_option; this.restrictions = restrictions; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("process", org.apache.thrift.protocol.TMessageType.CALL, 0)); process_args args = new process_args(); args.setUser(user); args.setPasswd(passwd); args.setCatalog(catalog); args.setSql_text(sql_text); args.setQuery_parsing_option(query_parsing_option); args.setOptimization_option(optimization_option); args.setRestrictions(restrictions); args.write(prot); prot.writeMessageEnd(); } public TPlanResult getResult() throws InvalidParseRequest, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_process(); } } public void getExtensionFunctionWhitelist(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { checkReady(); getExtensionFunctionWhitelist_call method_call = new getExtensionFunctionWhitelist_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getExtensionFunctionWhitelist_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> { public getExtensionFunctionWhitelist_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getExtensionFunctionWhitelist", org.apache.thrift.protocol.TMessageType.CALL, 0)); getExtensionFunctionWhitelist_args args = new getExtensionFunctionWhitelist_args(); args.write(prot); prot.writeMessageEnd(); } public java.lang.String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getExtensionFunctionWhitelist(); } } public void getUserDefinedFunctionWhitelist(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { checkReady(); getUserDefinedFunctionWhitelist_call method_call = new getUserDefinedFunctionWhitelist_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUserDefinedFunctionWhitelist_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> { public getUserDefinedFunctionWhitelist_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserDefinedFunctionWhitelist", org.apache.thrift.protocol.TMessageType.CALL, 0)); getUserDefinedFunctionWhitelist_args args = new getUserDefinedFunctionWhitelist_args(); args.write(prot); prot.writeMessageEnd(); } public java.lang.String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getUserDefinedFunctionWhitelist(); } } public void getRuntimeExtensionFunctionWhitelist(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { checkReady(); getRuntimeExtensionFunctionWhitelist_call method_call = new getRuntimeExtensionFunctionWhitelist_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getRuntimeExtensionFunctionWhitelist_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> { public getRuntimeExtensionFunctionWhitelist_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRuntimeExtensionFunctionWhitelist", org.apache.thrift.protocol.TMessageType.CALL, 0)); getRuntimeExtensionFunctionWhitelist_args args = new getRuntimeExtensionFunctionWhitelist_args(); args.write(prot); prot.writeMessageEnd(); } public java.lang.String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getRuntimeExtensionFunctionWhitelist(); } } public void setRuntimeExtensionFunctions(java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, boolean isruntime, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); setRuntimeExtensionFunctions_call method_call = new setRuntimeExtensionFunctions_call(udfs, udtfs, isruntime, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setRuntimeExtensionFunctions_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs; private java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs; private boolean isruntime; public setRuntimeExtensionFunctions_call(java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, boolean isruntime, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.udfs = udfs; this.udtfs = udtfs; this.isruntime = isruntime; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setRuntimeExtensionFunctions", org.apache.thrift.protocol.TMessageType.CALL, 0)); setRuntimeExtensionFunctions_args args = new setRuntimeExtensionFunctions_args(); args.setUdfs(udfs); args.setUdtfs(udtfs); args.setIsruntime(isruntime); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void updateMetadata(java.lang.String catalog, java.lang.String table, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); updateMetadata_call method_call = new updateMetadata_call(catalog, table, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateMetadata_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String catalog; private java.lang.String table; public updateMetadata_call(java.lang.String catalog, java.lang.String table, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.catalog = catalog; this.table = table; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateMetadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); updateMetadata_args args = new updateMetadata_args(); args.setCatalog(catalog); args.setTable(table); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void getCompletionHints(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.util.List<java.lang.String> visible_tables, java.lang.String sql, int cursor, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> resultHandler) throws org.apache.thrift.TException { checkReady(); getCompletionHints_call method_call = new getCompletionHints_call(user, passwd, catalog, visible_tables, sql, cursor, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getCompletionHints_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> { private java.lang.String user; private java.lang.String passwd; private java.lang.String catalog; private java.util.List<java.lang.String> visible_tables; private java.lang.String sql; private int cursor; public getCompletionHints_call(java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.util.List<java.lang.String> visible_tables, java.lang.String sql, int cursor, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.user = user; this.passwd = passwd; this.catalog = catalog; this.visible_tables = visible_tables; this.sql = sql; this.cursor = cursor; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCompletionHints", org.apache.thrift.protocol.TMessageType.CALL, 0)); getCompletionHints_args args = new getCompletionHints_args(); args.setUser(user); args.setPasswd(passwd); args.setCatalog(catalog); args.setVisible_tables(visible_tables); args.setSql(sql); args.setCursor(cursor); args.write(prot); prot.writeMessageEnd(); } public java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getCompletionHints(); } } } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); } protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { processMap.put("ping", new ping()); processMap.put("shutdown", new shutdown()); processMap.put("process", new process()); processMap.put("getExtensionFunctionWhitelist", new getExtensionFunctionWhitelist()); processMap.put("getUserDefinedFunctionWhitelist", new getUserDefinedFunctionWhitelist()); processMap.put("getRuntimeExtensionFunctionWhitelist", new getRuntimeExtensionFunctionWhitelist()); processMap.put("setRuntimeExtensionFunctions", new setRuntimeExtensionFunctions()); processMap.put("updateMetadata", new updateMetadata()); processMap.put("getCompletionHints", new getCompletionHints()); return processMap; } public static class ping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, ping_args> { public ping() { super("ping"); } public ping_args getEmptyArgsInstance() { return new ping_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException { ping_result result = new ping_result(); iface.ping(); return result; } } public static class shutdown<I extends Iface> extends org.apache.thrift.ProcessFunction<I, shutdown_args> { public shutdown() { super("shutdown"); } public shutdown_args getEmptyArgsInstance() { return new shutdown_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public shutdown_result getResult(I iface, shutdown_args args) throws org.apache.thrift.TException { shutdown_result result = new shutdown_result(); iface.shutdown(); return result; } } public static class process<I extends Iface> extends org.apache.thrift.ProcessFunction<I, process_args> { public process() { super("process"); } public process_args getEmptyArgsInstance() { return new process_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public process_result getResult(I iface, process_args args) throws org.apache.thrift.TException { process_result result = new process_result(); try { result.success = iface.process(args.user, args.passwd, args.catalog, args.sql_text, args.query_parsing_option, args.optimization_option, args.restrictions); } catch (InvalidParseRequest parseErr) { result.parseErr = parseErr; } return result; } } public static class getExtensionFunctionWhitelist<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getExtensionFunctionWhitelist_args> { public getExtensionFunctionWhitelist() { super("getExtensionFunctionWhitelist"); } public getExtensionFunctionWhitelist_args getEmptyArgsInstance() { return new getExtensionFunctionWhitelist_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public getExtensionFunctionWhitelist_result getResult(I iface, getExtensionFunctionWhitelist_args args) throws org.apache.thrift.TException { getExtensionFunctionWhitelist_result result = new getExtensionFunctionWhitelist_result(); result.success = iface.getExtensionFunctionWhitelist(); return result; } } public static class getUserDefinedFunctionWhitelist<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserDefinedFunctionWhitelist_args> { public getUserDefinedFunctionWhitelist() { super("getUserDefinedFunctionWhitelist"); } public getUserDefinedFunctionWhitelist_args getEmptyArgsInstance() { return new getUserDefinedFunctionWhitelist_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public getUserDefinedFunctionWhitelist_result getResult(I iface, getUserDefinedFunctionWhitelist_args args) throws org.apache.thrift.TException { getUserDefinedFunctionWhitelist_result result = new getUserDefinedFunctionWhitelist_result(); result.success = iface.getUserDefinedFunctionWhitelist(); return result; } } public static class getRuntimeExtensionFunctionWhitelist<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRuntimeExtensionFunctionWhitelist_args> { public getRuntimeExtensionFunctionWhitelist() { super("getRuntimeExtensionFunctionWhitelist"); } public getRuntimeExtensionFunctionWhitelist_args getEmptyArgsInstance() { return new getRuntimeExtensionFunctionWhitelist_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public getRuntimeExtensionFunctionWhitelist_result getResult(I iface, getRuntimeExtensionFunctionWhitelist_args args) throws org.apache.thrift.TException { getRuntimeExtensionFunctionWhitelist_result result = new getRuntimeExtensionFunctionWhitelist_result(); result.success = iface.getRuntimeExtensionFunctionWhitelist(); return result; } } public static class setRuntimeExtensionFunctions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setRuntimeExtensionFunctions_args> { public setRuntimeExtensionFunctions() { super("setRuntimeExtensionFunctions"); } public setRuntimeExtensionFunctions_args getEmptyArgsInstance() { return new setRuntimeExtensionFunctions_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public setRuntimeExtensionFunctions_result getResult(I iface, setRuntimeExtensionFunctions_args args) throws org.apache.thrift.TException { setRuntimeExtensionFunctions_result result = new setRuntimeExtensionFunctions_result(); iface.setRuntimeExtensionFunctions(args.udfs, args.udtfs, args.isruntime); return result; } } public static class updateMetadata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateMetadata_args> { public updateMetadata() { super("updateMetadata"); } public updateMetadata_args getEmptyArgsInstance() { return new updateMetadata_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public updateMetadata_result getResult(I iface, updateMetadata_args args) throws org.apache.thrift.TException { updateMetadata_result result = new updateMetadata_result(); iface.updateMetadata(args.catalog, args.table); return result; } } public static class getCompletionHints<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCompletionHints_args> { public getCompletionHints() { super("getCompletionHints"); } public getCompletionHints_args getEmptyArgsInstance() { return new getCompletionHints_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public getCompletionHints_result getResult(I iface, getCompletionHints_args args) throws org.apache.thrift.TException { getCompletionHints_result result = new getCompletionHints_result(); result.success = iface.getCompletionHints(args.user, args.passwd, args.catalog, args.visible_tables, args.sql, args.cursor); return result; } } } public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); } protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { processMap.put("ping", new ping()); processMap.put("shutdown", new shutdown()); processMap.put("process", new process()); processMap.put("getExtensionFunctionWhitelist", new getExtensionFunctionWhitelist()); processMap.put("getUserDefinedFunctionWhitelist", new getUserDefinedFunctionWhitelist()); processMap.put("getRuntimeExtensionFunctionWhitelist", new getRuntimeExtensionFunctionWhitelist()); processMap.put("setRuntimeExtensionFunctions", new setRuntimeExtensionFunctions()); processMap.put("updateMetadata", new updateMetadata()); processMap.put("getCompletionHints", new getCompletionHints()); return processMap; } public static class ping<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, ping_args, Void> { public ping() { super("ping"); } public ping_args getEmptyArgsInstance() { return new ping_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { ping_result result = new ping_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; ping_result result = new ping_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, ping_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.ping(resultHandler); } } public static class shutdown<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, shutdown_args, Void> { public shutdown() { super("shutdown"); } public shutdown_args getEmptyArgsInstance() { return new shutdown_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { shutdown_result result = new shutdown_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; shutdown_result result = new shutdown_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, shutdown_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.shutdown(resultHandler); } } public static class process<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, process_args, TPlanResult> { public process() { super("process"); } public process_args getEmptyArgsInstance() { return new process_args(); } public org.apache.thrift.async.AsyncMethodCallback<TPlanResult> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TPlanResult>() { public void onComplete(TPlanResult o) { process_result result = new process_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; process_result result = new process_result(); if (e instanceof InvalidParseRequest) { result.parseErr = (InvalidParseRequest) e; result.setParseErrIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, process_args args, org.apache.thrift.async.AsyncMethodCallback<TPlanResult> resultHandler) throws org.apache.thrift.TException { iface.process(args.user, args.passwd, args.catalog, args.sql_text, args.query_parsing_option, args.optimization_option, args.restrictions,resultHandler); } } public static class getExtensionFunctionWhitelist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExtensionFunctionWhitelist_args, java.lang.String> { public getExtensionFunctionWhitelist() { super("getExtensionFunctionWhitelist"); } public getExtensionFunctionWhitelist_args getEmptyArgsInstance() { return new getExtensionFunctionWhitelist_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { public void onComplete(java.lang.String o) { getExtensionFunctionWhitelist_result result = new getExtensionFunctionWhitelist_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getExtensionFunctionWhitelist_result result = new getExtensionFunctionWhitelist_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, getExtensionFunctionWhitelist_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { iface.getExtensionFunctionWhitelist(resultHandler); } } public static class getUserDefinedFunctionWhitelist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserDefinedFunctionWhitelist_args, java.lang.String> { public getUserDefinedFunctionWhitelist() { super("getUserDefinedFunctionWhitelist"); } public getUserDefinedFunctionWhitelist_args getEmptyArgsInstance() { return new getUserDefinedFunctionWhitelist_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { public void onComplete(java.lang.String o) { getUserDefinedFunctionWhitelist_result result = new getUserDefinedFunctionWhitelist_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getUserDefinedFunctionWhitelist_result result = new getUserDefinedFunctionWhitelist_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, getUserDefinedFunctionWhitelist_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { iface.getUserDefinedFunctionWhitelist(resultHandler); } } public static class getRuntimeExtensionFunctionWhitelist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getRuntimeExtensionFunctionWhitelist_args, java.lang.String> { public getRuntimeExtensionFunctionWhitelist() { super("getRuntimeExtensionFunctionWhitelist"); } public getRuntimeExtensionFunctionWhitelist_args getEmptyArgsInstance() { return new getRuntimeExtensionFunctionWhitelist_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { public void onComplete(java.lang.String o) { getRuntimeExtensionFunctionWhitelist_result result = new getRuntimeExtensionFunctionWhitelist_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getRuntimeExtensionFunctionWhitelist_result result = new getRuntimeExtensionFunctionWhitelist_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, getRuntimeExtensionFunctionWhitelist_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { iface.getRuntimeExtensionFunctionWhitelist(resultHandler); } } public static class setRuntimeExtensionFunctions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setRuntimeExtensionFunctions_args, Void> { public setRuntimeExtensionFunctions() { super("setRuntimeExtensionFunctions"); } public setRuntimeExtensionFunctions_args getEmptyArgsInstance() { return new setRuntimeExtensionFunctions_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { setRuntimeExtensionFunctions_result result = new setRuntimeExtensionFunctions_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; setRuntimeExtensionFunctions_result result = new setRuntimeExtensionFunctions_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, setRuntimeExtensionFunctions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.setRuntimeExtensionFunctions(args.udfs, args.udtfs, args.isruntime,resultHandler); } } public static class updateMetadata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateMetadata_args, Void> { public updateMetadata() { super("updateMetadata"); } public updateMetadata_args getEmptyArgsInstance() { return new updateMetadata_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { updateMetadata_result result = new updateMetadata_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; updateMetadata_result result = new updateMetadata_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, updateMetadata_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.updateMetadata(args.catalog, args.table,resultHandler); } } public static class getCompletionHints<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCompletionHints_args, java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> { public getCompletionHints() { super("getCompletionHints"); } public getCompletionHints_args getEmptyArgsInstance() { return new getCompletionHints_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>>() { public void onComplete(java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> o) { getCompletionHints_result result = new getCompletionHints_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getCompletionHints_result result = new getCompletionHints_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, getCompletionHints_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> resultHandler) throws org.apache.thrift.TException { iface.getCompletionHints(args.user, args.passwd, args.catalog, args.visible_tables, args.sql, args.cursor,resultHandler); } } } public static class ping_args implements org.apache.thrift.TBase<ping_args, ping_args._Fields>, java.io.Serializable, Cloneable, Comparable<ping_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ping_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ping_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_args.class, metaDataMap); } public ping_args() { } /** * Performs a deep copy on <i>other</i>. */ public ping_args(ping_args other) { } public ping_args deepCopy() { return new ping_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof ping_args) return this.equals((ping_args)that); return false; } public boolean equals(ping_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(ping_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("ping_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class ping_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ping_argsStandardScheme getScheme() { return new ping_argsStandardScheme(); } } private static class ping_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ping_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, ping_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class ping_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ping_argsTupleScheme getScheme() { return new ping_argsTupleScheme(); } } private static class ping_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ping_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class ping_result implements org.apache.thrift.TBase<ping_result, ping_result._Fields>, java.io.Serializable, Cloneable, Comparable<ping_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_result"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ping_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ping_resultTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap); } public ping_result() { } /** * Performs a deep copy on <i>other</i>. */ public ping_result(ping_result other) { } public ping_result deepCopy() { return new ping_result(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof ping_result) return this.equals((ping_result)that); return false; } public boolean equals(ping_result that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(ping_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("ping_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class ping_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ping_resultStandardScheme getScheme() { return new ping_resultStandardScheme(); } } private static class ping_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<ping_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class ping_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ping_resultTupleScheme getScheme() { return new ping_resultTupleScheme(); } } private static class ping_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<ping_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class shutdown_args implements org.apache.thrift.TBase<shutdown_args, shutdown_args._Fields>, java.io.Serializable, Cloneable, Comparable<shutdown_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("shutdown_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new shutdown_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new shutdown_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(shutdown_args.class, metaDataMap); } public shutdown_args() { } /** * Performs a deep copy on <i>other</i>. */ public shutdown_args(shutdown_args other) { } public shutdown_args deepCopy() { return new shutdown_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof shutdown_args) return this.equals((shutdown_args)that); return false; } public boolean equals(shutdown_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(shutdown_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("shutdown_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class shutdown_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public shutdown_argsStandardScheme getScheme() { return new shutdown_argsStandardScheme(); } } private static class shutdown_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<shutdown_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, shutdown_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, shutdown_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class shutdown_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public shutdown_argsTupleScheme getScheme() { return new shutdown_argsTupleScheme(); } } private static class shutdown_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<shutdown_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, shutdown_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, shutdown_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class shutdown_result implements org.apache.thrift.TBase<shutdown_result, shutdown_result._Fields>, java.io.Serializable, Cloneable, Comparable<shutdown_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("shutdown_result"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new shutdown_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new shutdown_resultTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(shutdown_result.class, metaDataMap); } public shutdown_result() { } /** * Performs a deep copy on <i>other</i>. */ public shutdown_result(shutdown_result other) { } public shutdown_result deepCopy() { return new shutdown_result(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof shutdown_result) return this.equals((shutdown_result)that); return false; } public boolean equals(shutdown_result that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(shutdown_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("shutdown_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class shutdown_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public shutdown_resultStandardScheme getScheme() { return new shutdown_resultStandardScheme(); } } private static class shutdown_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<shutdown_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, shutdown_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, shutdown_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class shutdown_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public shutdown_resultTupleScheme getScheme() { return new shutdown_resultTupleScheme(); } } private static class shutdown_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<shutdown_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, shutdown_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, shutdown_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class process_args implements org.apache.thrift.TBase<process_args, process_args._Fields>, java.io.Serializable, Cloneable, Comparable<process_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("process_args"); private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PASSWD_FIELD_DESC = new org.apache.thrift.protocol.TField("passwd", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField CATALOG_FIELD_DESC = new org.apache.thrift.protocol.TField("catalog", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField SQL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("sql_text", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField QUERY_PARSING_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("query_parsing_option", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField OPTIMIZATION_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("optimization_option", org.apache.thrift.protocol.TType.STRUCT, (short)6); private static final org.apache.thrift.protocol.TField RESTRICTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("restrictions", org.apache.thrift.protocol.TType.LIST, (short)7); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new process_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new process_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String user; // required public @org.apache.thrift.annotation.Nullable java.lang.String passwd; // required public @org.apache.thrift.annotation.Nullable java.lang.String catalog; // required public @org.apache.thrift.annotation.Nullable java.lang.String sql_text; // required public @org.apache.thrift.annotation.Nullable TQueryParsingOption query_parsing_option; // required public @org.apache.thrift.annotation.Nullable TOptimizationOption optimization_option; // required public @org.apache.thrift.annotation.Nullable java.util.List<TRestriction> restrictions; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER((short)1, "user"), PASSWD((short)2, "passwd"), CATALOG((short)3, "catalog"), SQL_TEXT((short)4, "sql_text"), QUERY_PARSING_OPTION((short)5, "query_parsing_option"), OPTIMIZATION_OPTION((short)6, "optimization_option"), RESTRICTIONS((short)7, "restrictions"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER return USER; case 2: // PASSWD return PASSWD; case 3: // CATALOG return CATALOG; case 4: // SQL_TEXT return SQL_TEXT; case 5: // QUERY_PARSING_OPTION return QUERY_PARSING_OPTION; case 6: // OPTIMIZATION_OPTION return OPTIMIZATION_OPTION; case 7: // RESTRICTIONS return RESTRICTIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PASSWD, new org.apache.thrift.meta_data.FieldMetaData("passwd", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CATALOG, new org.apache.thrift.meta_data.FieldMetaData("catalog", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.SQL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("sql_text", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.QUERY_PARSING_OPTION, new org.apache.thrift.meta_data.FieldMetaData("query_parsing_option", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TQueryParsingOption.class))); tmpMap.put(_Fields.OPTIMIZATION_OPTION, new org.apache.thrift.meta_data.FieldMetaData("optimization_option", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOptimizationOption.class))); tmpMap.put(_Fields.RESTRICTIONS, new org.apache.thrift.meta_data.FieldMetaData("restrictions", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRestriction.class)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(process_args.class, metaDataMap); } public process_args() { } public process_args( java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.lang.String sql_text, TQueryParsingOption query_parsing_option, TOptimizationOption optimization_option, java.util.List<TRestriction> restrictions) { this(); this.user = user; this.passwd = passwd; this.catalog = catalog; this.sql_text = sql_text; this.query_parsing_option = query_parsing_option; this.optimization_option = optimization_option; this.restrictions = restrictions; } /** * Performs a deep copy on <i>other</i>. */ public process_args(process_args other) { if (other.isSetUser()) { this.user = other.user; } if (other.isSetPasswd()) { this.passwd = other.passwd; } if (other.isSetCatalog()) { this.catalog = other.catalog; } if (other.isSetSql_text()) { this.sql_text = other.sql_text; } if (other.isSetQuery_parsing_option()) { this.query_parsing_option = new TQueryParsingOption(other.query_parsing_option); } if (other.isSetOptimization_option()) { this.optimization_option = new TOptimizationOption(other.optimization_option); } if (other.isSetRestrictions()) { java.util.List<TRestriction> __this__restrictions = new java.util.ArrayList<TRestriction>(other.restrictions.size()); for (TRestriction other_element : other.restrictions) { __this__restrictions.add(new TRestriction(other_element)); } this.restrictions = __this__restrictions; } } public process_args deepCopy() { return new process_args(this); } @Override public void clear() { this.user = null; this.passwd = null; this.catalog = null; this.sql_text = null; this.query_parsing_option = null; this.optimization_option = null; this.restrictions = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUser() { return this.user; } public process_args setUser(@org.apache.thrift.annotation.Nullable java.lang.String user) { this.user = user; return this; } public void unsetUser() { this.user = null; } /** Returns true if field user is set (has been assigned a value) and false otherwise */ public boolean isSetUser() { return this.user != null; } public void setUserIsSet(boolean value) { if (!value) { this.user = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getPasswd() { return this.passwd; } public process_args setPasswd(@org.apache.thrift.annotation.Nullable java.lang.String passwd) { this.passwd = passwd; return this; } public void unsetPasswd() { this.passwd = null; } /** Returns true if field passwd is set (has been assigned a value) and false otherwise */ public boolean isSetPasswd() { return this.passwd != null; } public void setPasswdIsSet(boolean value) { if (!value) { this.passwd = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getCatalog() { return this.catalog; } public process_args setCatalog(@org.apache.thrift.annotation.Nullable java.lang.String catalog) { this.catalog = catalog; return this; } public void unsetCatalog() { this.catalog = null; } /** Returns true if field catalog is set (has been assigned a value) and false otherwise */ public boolean isSetCatalog() { return this.catalog != null; } public void setCatalogIsSet(boolean value) { if (!value) { this.catalog = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getSql_text() { return this.sql_text; } public process_args setSql_text(@org.apache.thrift.annotation.Nullable java.lang.String sql_text) { this.sql_text = sql_text; return this; } public void unsetSql_text() { this.sql_text = null; } /** Returns true if field sql_text is set (has been assigned a value) and false otherwise */ public boolean isSetSql_text() { return this.sql_text != null; } public void setSql_textIsSet(boolean value) { if (!value) { this.sql_text = null; } } @org.apache.thrift.annotation.Nullable public TQueryParsingOption getQuery_parsing_option() { return this.query_parsing_option; } public process_args setQuery_parsing_option(@org.apache.thrift.annotation.Nullable TQueryParsingOption query_parsing_option) { this.query_parsing_option = query_parsing_option; return this; } public void unsetQuery_parsing_option() { this.query_parsing_option = null; } /** Returns true if field query_parsing_option is set (has been assigned a value) and false otherwise */ public boolean isSetQuery_parsing_option() { return this.query_parsing_option != null; } public void setQuery_parsing_optionIsSet(boolean value) { if (!value) { this.query_parsing_option = null; } } @org.apache.thrift.annotation.Nullable public TOptimizationOption getOptimization_option() { return this.optimization_option; } public process_args setOptimization_option(@org.apache.thrift.annotation.Nullable TOptimizationOption optimization_option) { this.optimization_option = optimization_option; return this; } public void unsetOptimization_option() { this.optimization_option = null; } /** Returns true if field optimization_option is set (has been assigned a value) and false otherwise */ public boolean isSetOptimization_option() { return this.optimization_option != null; } public void setOptimization_optionIsSet(boolean value) { if (!value) { this.optimization_option = null; } } public int getRestrictionsSize() { return (this.restrictions == null) ? 0 : this.restrictions.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TRestriction> getRestrictionsIterator() { return (this.restrictions == null) ? null : this.restrictions.iterator(); } public void addToRestrictions(TRestriction elem) { if (this.restrictions == null) { this.restrictions = new java.util.ArrayList<TRestriction>(); } this.restrictions.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TRestriction> getRestrictions() { return this.restrictions; } public process_args setRestrictions(@org.apache.thrift.annotation.Nullable java.util.List<TRestriction> restrictions) { this.restrictions = restrictions; return this; } public void unsetRestrictions() { this.restrictions = null; } /** Returns true if field restrictions is set (has been assigned a value) and false otherwise */ public boolean isSetRestrictions() { return this.restrictions != null; } public void setRestrictionsIsSet(boolean value) { if (!value) { this.restrictions = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER: if (value == null) { unsetUser(); } else { setUser((java.lang.String)value); } break; case PASSWD: if (value == null) { unsetPasswd(); } else { setPasswd((java.lang.String)value); } break; case CATALOG: if (value == null) { unsetCatalog(); } else { setCatalog((java.lang.String)value); } break; case SQL_TEXT: if (value == null) { unsetSql_text(); } else { setSql_text((java.lang.String)value); } break; case QUERY_PARSING_OPTION: if (value == null) { unsetQuery_parsing_option(); } else { setQuery_parsing_option((TQueryParsingOption)value); } break; case OPTIMIZATION_OPTION: if (value == null) { unsetOptimization_option(); } else { setOptimization_option((TOptimizationOption)value); } break; case RESTRICTIONS: if (value == null) { unsetRestrictions(); } else { setRestrictions((java.util.List<TRestriction>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER: return getUser(); case PASSWD: return getPasswd(); case CATALOG: return getCatalog(); case SQL_TEXT: return getSql_text(); case QUERY_PARSING_OPTION: return getQuery_parsing_option(); case OPTIMIZATION_OPTION: return getOptimization_option(); case RESTRICTIONS: return getRestrictions(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER: return isSetUser(); case PASSWD: return isSetPasswd(); case CATALOG: return isSetCatalog(); case SQL_TEXT: return isSetSql_text(); case QUERY_PARSING_OPTION: return isSetQuery_parsing_option(); case OPTIMIZATION_OPTION: return isSetOptimization_option(); case RESTRICTIONS: return isSetRestrictions(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof process_args) return this.equals((process_args)that); return false; } public boolean equals(process_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_user = true && this.isSetUser(); boolean that_present_user = true && that.isSetUser(); if (this_present_user || that_present_user) { if (!(this_present_user && that_present_user)) return false; if (!this.user.equals(that.user)) return false; } boolean this_present_passwd = true && this.isSetPasswd(); boolean that_present_passwd = true && that.isSetPasswd(); if (this_present_passwd || that_present_passwd) { if (!(this_present_passwd && that_present_passwd)) return false; if (!this.passwd.equals(that.passwd)) return false; } boolean this_present_catalog = true && this.isSetCatalog(); boolean that_present_catalog = true && that.isSetCatalog(); if (this_present_catalog || that_present_catalog) { if (!(this_present_catalog && that_present_catalog)) return false; if (!this.catalog.equals(that.catalog)) return false; } boolean this_present_sql_text = true && this.isSetSql_text(); boolean that_present_sql_text = true && that.isSetSql_text(); if (this_present_sql_text || that_present_sql_text) { if (!(this_present_sql_text && that_present_sql_text)) return false; if (!this.sql_text.equals(that.sql_text)) return false; } boolean this_present_query_parsing_option = true && this.isSetQuery_parsing_option(); boolean that_present_query_parsing_option = true && that.isSetQuery_parsing_option(); if (this_present_query_parsing_option || that_present_query_parsing_option) { if (!(this_present_query_parsing_option && that_present_query_parsing_option)) return false; if (!this.query_parsing_option.equals(that.query_parsing_option)) return false; } boolean this_present_optimization_option = true && this.isSetOptimization_option(); boolean that_present_optimization_option = true && that.isSetOptimization_option(); if (this_present_optimization_option || that_present_optimization_option) { if (!(this_present_optimization_option && that_present_optimization_option)) return false; if (!this.optimization_option.equals(that.optimization_option)) return false; } boolean this_present_restrictions = true && this.isSetRestrictions(); boolean that_present_restrictions = true && that.isSetRestrictions(); if (this_present_restrictions || that_present_restrictions) { if (!(this_present_restrictions && that_present_restrictions)) return false; if (!this.restrictions.equals(that.restrictions)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287); if (isSetUser()) hashCode = hashCode * 8191 + user.hashCode(); hashCode = hashCode * 8191 + ((isSetPasswd()) ? 131071 : 524287); if (isSetPasswd()) hashCode = hashCode * 8191 + passwd.hashCode(); hashCode = hashCode * 8191 + ((isSetCatalog()) ? 131071 : 524287); if (isSetCatalog()) hashCode = hashCode * 8191 + catalog.hashCode(); hashCode = hashCode * 8191 + ((isSetSql_text()) ? 131071 : 524287); if (isSetSql_text()) hashCode = hashCode * 8191 + sql_text.hashCode(); hashCode = hashCode * 8191 + ((isSetQuery_parsing_option()) ? 131071 : 524287); if (isSetQuery_parsing_option()) hashCode = hashCode * 8191 + query_parsing_option.hashCode(); hashCode = hashCode * 8191 + ((isSetOptimization_option()) ? 131071 : 524287); if (isSetOptimization_option()) hashCode = hashCode * 8191 + optimization_option.hashCode(); hashCode = hashCode * 8191 + ((isSetRestrictions()) ? 131071 : 524287); if (isSetRestrictions()) hashCode = hashCode * 8191 + restrictions.hashCode(); return hashCode; } @Override public int compareTo(process_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUser(), other.isSetUser()); if (lastComparison != 0) { return lastComparison; } if (isSetUser()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPasswd(), other.isSetPasswd()); if (lastComparison != 0) { return lastComparison; } if (isSetPasswd()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwd, other.passwd); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCatalog(), other.isSetCatalog()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalog()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalog, other.catalog); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSql_text(), other.isSetSql_text()); if (lastComparison != 0) { return lastComparison; } if (isSetSql_text()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sql_text, other.sql_text); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetQuery_parsing_option(), other.isSetQuery_parsing_option()); if (lastComparison != 0) { return lastComparison; } if (isSetQuery_parsing_option()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query_parsing_option, other.query_parsing_option); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOptimization_option(), other.isSetOptimization_option()); if (lastComparison != 0) { return lastComparison; } if (isSetOptimization_option()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.optimization_option, other.optimization_option); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRestrictions(), other.isSetRestrictions()); if (lastComparison != 0) { return lastComparison; } if (isSetRestrictions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.restrictions, other.restrictions); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("process_args("); boolean first = true; sb.append("user:"); if (this.user == null) { sb.append("null"); } else { sb.append(this.user); } first = false; if (!first) sb.append(", "); sb.append("passwd:"); if (this.passwd == null) { sb.append("null"); } else { sb.append(this.passwd); } first = false; if (!first) sb.append(", "); sb.append("catalog:"); if (this.catalog == null) { sb.append("null"); } else { sb.append(this.catalog); } first = false; if (!first) sb.append(", "); sb.append("sql_text:"); if (this.sql_text == null) { sb.append("null"); } else { sb.append(this.sql_text); } first = false; if (!first) sb.append(", "); sb.append("query_parsing_option:"); if (this.query_parsing_option == null) { sb.append("null"); } else { sb.append(this.query_parsing_option); } first = false; if (!first) sb.append(", "); sb.append("optimization_option:"); if (this.optimization_option == null) { sb.append("null"); } else { sb.append(this.optimization_option); } first = false; if (!first) sb.append(", "); sb.append("restrictions:"); if (this.restrictions == null) { sb.append("null"); } else { sb.append(this.restrictions); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (query_parsing_option != null) { query_parsing_option.validate(); } if (optimization_option != null) { optimization_option.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class process_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public process_argsStandardScheme getScheme() { return new process_argsStandardScheme(); } } private static class process_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<process_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, process_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.user = iprot.readString(); struct.setUserIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PASSWD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.passwd = iprot.readString(); struct.setPasswdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // CATALOG if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.catalog = iprot.readString(); struct.setCatalogIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // SQL_TEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.sql_text = iprot.readString(); struct.setSql_textIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // QUERY_PARSING_OPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.query_parsing_option = new TQueryParsingOption(); struct.query_parsing_option.read(iprot); struct.setQuery_parsing_optionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // OPTIMIZATION_OPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.optimization_option = new TOptimizationOption(); struct.optimization_option.read(iprot); struct.setOptimization_optionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // RESTRICTIONS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list80 = iprot.readListBegin(); struct.restrictions = new java.util.ArrayList<TRestriction>(_list80.size); @org.apache.thrift.annotation.Nullable TRestriction _elem81; for (int _i82 = 0; _i82 < _list80.size; ++_i82) { _elem81 = new TRestriction(); _elem81.read(iprot); struct.restrictions.add(_elem81); } iprot.readListEnd(); } struct.setRestrictionsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, process_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.user != null) { oprot.writeFieldBegin(USER_FIELD_DESC); oprot.writeString(struct.user); oprot.writeFieldEnd(); } if (struct.passwd != null) { oprot.writeFieldBegin(PASSWD_FIELD_DESC); oprot.writeString(struct.passwd); oprot.writeFieldEnd(); } if (struct.catalog != null) { oprot.writeFieldBegin(CATALOG_FIELD_DESC); oprot.writeString(struct.catalog); oprot.writeFieldEnd(); } if (struct.sql_text != null) { oprot.writeFieldBegin(SQL_TEXT_FIELD_DESC); oprot.writeString(struct.sql_text); oprot.writeFieldEnd(); } if (struct.query_parsing_option != null) { oprot.writeFieldBegin(QUERY_PARSING_OPTION_FIELD_DESC); struct.query_parsing_option.write(oprot); oprot.writeFieldEnd(); } if (struct.optimization_option != null) { oprot.writeFieldBegin(OPTIMIZATION_OPTION_FIELD_DESC); struct.optimization_option.write(oprot); oprot.writeFieldEnd(); } if (struct.restrictions != null) { oprot.writeFieldBegin(RESTRICTIONS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.restrictions.size())); for (TRestriction _iter83 : struct.restrictions) { _iter83.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class process_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public process_argsTupleScheme getScheme() { return new process_argsTupleScheme(); } } private static class process_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<process_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, process_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUser()) { optionals.set(0); } if (struct.isSetPasswd()) { optionals.set(1); } if (struct.isSetCatalog()) { optionals.set(2); } if (struct.isSetSql_text()) { optionals.set(3); } if (struct.isSetQuery_parsing_option()) { optionals.set(4); } if (struct.isSetOptimization_option()) { optionals.set(5); } if (struct.isSetRestrictions()) { optionals.set(6); } oprot.writeBitSet(optionals, 7); if (struct.isSetUser()) { oprot.writeString(struct.user); } if (struct.isSetPasswd()) { oprot.writeString(struct.passwd); } if (struct.isSetCatalog()) { oprot.writeString(struct.catalog); } if (struct.isSetSql_text()) { oprot.writeString(struct.sql_text); } if (struct.isSetQuery_parsing_option()) { struct.query_parsing_option.write(oprot); } if (struct.isSetOptimization_option()) { struct.optimization_option.write(oprot); } if (struct.isSetRestrictions()) { { oprot.writeI32(struct.restrictions.size()); for (TRestriction _iter84 : struct.restrictions) { _iter84.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, process_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.user = iprot.readString(); struct.setUserIsSet(true); } if (incoming.get(1)) { struct.passwd = iprot.readString(); struct.setPasswdIsSet(true); } if (incoming.get(2)) { struct.catalog = iprot.readString(); struct.setCatalogIsSet(true); } if (incoming.get(3)) { struct.sql_text = iprot.readString(); struct.setSql_textIsSet(true); } if (incoming.get(4)) { struct.query_parsing_option = new TQueryParsingOption(); struct.query_parsing_option.read(iprot); struct.setQuery_parsing_optionIsSet(true); } if (incoming.get(5)) { struct.optimization_option = new TOptimizationOption(); struct.optimization_option.read(iprot); struct.setOptimization_optionIsSet(true); } if (incoming.get(6)) { { org.apache.thrift.protocol.TList _list85 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.restrictions = new java.util.ArrayList<TRestriction>(_list85.size); @org.apache.thrift.annotation.Nullable TRestriction _elem86; for (int _i87 = 0; _i87 < _list85.size; ++_i87) { _elem86 = new TRestriction(); _elem86.read(iprot); struct.restrictions.add(_elem86); } } struct.setRestrictionsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class process_result implements org.apache.thrift.TBase<process_result, process_result._Fields>, java.io.Serializable, Cloneable, Comparable<process_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("process_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField PARSE_ERR_FIELD_DESC = new org.apache.thrift.protocol.TField("parseErr", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new process_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new process_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TPlanResult success; // required public @org.apache.thrift.annotation.Nullable InvalidParseRequest parseErr; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), PARSE_ERR((short)1, "parseErr"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // PARSE_ERR return PARSE_ERR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPlanResult.class))); tmpMap.put(_Fields.PARSE_ERR, new org.apache.thrift.meta_data.FieldMetaData("parseErr", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidParseRequest.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(process_result.class, metaDataMap); } public process_result() { } public process_result( TPlanResult success, InvalidParseRequest parseErr) { this(); this.success = success; this.parseErr = parseErr; } /** * Performs a deep copy on <i>other</i>. */ public process_result(process_result other) { if (other.isSetSuccess()) { this.success = new TPlanResult(other.success); } if (other.isSetParseErr()) { this.parseErr = new InvalidParseRequest(other.parseErr); } } public process_result deepCopy() { return new process_result(this); } @Override public void clear() { this.success = null; this.parseErr = null; } @org.apache.thrift.annotation.Nullable public TPlanResult getSuccess() { return this.success; } public process_result setSuccess(@org.apache.thrift.annotation.Nullable TPlanResult success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public InvalidParseRequest getParseErr() { return this.parseErr; } public process_result setParseErr(@org.apache.thrift.annotation.Nullable InvalidParseRequest parseErr) { this.parseErr = parseErr; return this; } public void unsetParseErr() { this.parseErr = null; } /** Returns true if field parseErr is set (has been assigned a value) and false otherwise */ public boolean isSetParseErr() { return this.parseErr != null; } public void setParseErrIsSet(boolean value) { if (!value) { this.parseErr = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TPlanResult)value); } break; case PARSE_ERR: if (value == null) { unsetParseErr(); } else { setParseErr((InvalidParseRequest)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case PARSE_ERR: return getParseErr(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case PARSE_ERR: return isSetParseErr(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof process_result) return this.equals((process_result)that); return false; } public boolean equals(process_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_parseErr = true && this.isSetParseErr(); boolean that_present_parseErr = true && that.isSetParseErr(); if (this_present_parseErr || that_present_parseErr) { if (!(this_present_parseErr && that_present_parseErr)) return false; if (!this.parseErr.equals(that.parseErr)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetParseErr()) ? 131071 : 524287); if (isSetParseErr()) hashCode = hashCode * 8191 + parseErr.hashCode(); return hashCode; } @Override public int compareTo(process_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetParseErr(), other.isSetParseErr()); if (lastComparison != 0) { return lastComparison; } if (isSetParseErr()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parseErr, other.parseErr); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("process_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("parseErr:"); if (this.parseErr == null) { sb.append("null"); } else { sb.append(this.parseErr); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class process_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public process_resultStandardScheme getScheme() { return new process_resultStandardScheme(); } } private static class process_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<process_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, process_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TPlanResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // PARSE_ERR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.parseErr = new InvalidParseRequest(); struct.parseErr.read(iprot); struct.setParseErrIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, process_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.parseErr != null) { oprot.writeFieldBegin(PARSE_ERR_FIELD_DESC); struct.parseErr.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class process_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public process_resultTupleScheme getScheme() { return new process_resultTupleScheme(); } } private static class process_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<process_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, process_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetParseErr()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetParseErr()) { struct.parseErr.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, process_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TPlanResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.parseErr = new InvalidParseRequest(); struct.parseErr.read(iprot); struct.setParseErrIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class getExtensionFunctionWhitelist_args implements org.apache.thrift.TBase<getExtensionFunctionWhitelist_args, getExtensionFunctionWhitelist_args._Fields>, java.io.Serializable, Cloneable, Comparable<getExtensionFunctionWhitelist_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getExtensionFunctionWhitelist_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getExtensionFunctionWhitelist_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getExtensionFunctionWhitelist_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getExtensionFunctionWhitelist_args.class, metaDataMap); } public getExtensionFunctionWhitelist_args() { } /** * Performs a deep copy on <i>other</i>. */ public getExtensionFunctionWhitelist_args(getExtensionFunctionWhitelist_args other) { } public getExtensionFunctionWhitelist_args deepCopy() { return new getExtensionFunctionWhitelist_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getExtensionFunctionWhitelist_args) return this.equals((getExtensionFunctionWhitelist_args)that); return false; } public boolean equals(getExtensionFunctionWhitelist_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(getExtensionFunctionWhitelist_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getExtensionFunctionWhitelist_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getExtensionFunctionWhitelist_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getExtensionFunctionWhitelist_argsStandardScheme getScheme() { return new getExtensionFunctionWhitelist_argsStandardScheme(); } } private static class getExtensionFunctionWhitelist_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getExtensionFunctionWhitelist_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getExtensionFunctionWhitelist_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getExtensionFunctionWhitelist_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getExtensionFunctionWhitelist_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getExtensionFunctionWhitelist_argsTupleScheme getScheme() { return new getExtensionFunctionWhitelist_argsTupleScheme(); } } private static class getExtensionFunctionWhitelist_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getExtensionFunctionWhitelist_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getExtensionFunctionWhitelist_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getExtensionFunctionWhitelist_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class getExtensionFunctionWhitelist_result implements org.apache.thrift.TBase<getExtensionFunctionWhitelist_result, getExtensionFunctionWhitelist_result._Fields>, java.io.Serializable, Cloneable, Comparable<getExtensionFunctionWhitelist_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getExtensionFunctionWhitelist_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getExtensionFunctionWhitelist_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getExtensionFunctionWhitelist_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getExtensionFunctionWhitelist_result.class, metaDataMap); } public getExtensionFunctionWhitelist_result() { } public getExtensionFunctionWhitelist_result( java.lang.String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public getExtensionFunctionWhitelist_result(getExtensionFunctionWhitelist_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public getExtensionFunctionWhitelist_result deepCopy() { return new getExtensionFunctionWhitelist_result(this); } @Override public void clear() { this.success = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public getExtensionFunctionWhitelist_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getExtensionFunctionWhitelist_result) return this.equals((getExtensionFunctionWhitelist_result)that); return false; } public boolean equals(getExtensionFunctionWhitelist_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getExtensionFunctionWhitelist_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getExtensionFunctionWhitelist_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getExtensionFunctionWhitelist_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getExtensionFunctionWhitelist_resultStandardScheme getScheme() { return new getExtensionFunctionWhitelist_resultStandardScheme(); } } private static class getExtensionFunctionWhitelist_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getExtensionFunctionWhitelist_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getExtensionFunctionWhitelist_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getExtensionFunctionWhitelist_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getExtensionFunctionWhitelist_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getExtensionFunctionWhitelist_resultTupleScheme getScheme() { return new getExtensionFunctionWhitelist_resultTupleScheme(); } } private static class getExtensionFunctionWhitelist_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getExtensionFunctionWhitelist_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getExtensionFunctionWhitelist_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getExtensionFunctionWhitelist_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class getUserDefinedFunctionWhitelist_args implements org.apache.thrift.TBase<getUserDefinedFunctionWhitelist_args, getUserDefinedFunctionWhitelist_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserDefinedFunctionWhitelist_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserDefinedFunctionWhitelist_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserDefinedFunctionWhitelist_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserDefinedFunctionWhitelist_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserDefinedFunctionWhitelist_args.class, metaDataMap); } public getUserDefinedFunctionWhitelist_args() { } /** * Performs a deep copy on <i>other</i>. */ public getUserDefinedFunctionWhitelist_args(getUserDefinedFunctionWhitelist_args other) { } public getUserDefinedFunctionWhitelist_args deepCopy() { return new getUserDefinedFunctionWhitelist_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getUserDefinedFunctionWhitelist_args) return this.equals((getUserDefinedFunctionWhitelist_args)that); return false; } public boolean equals(getUserDefinedFunctionWhitelist_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(getUserDefinedFunctionWhitelist_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserDefinedFunctionWhitelist_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getUserDefinedFunctionWhitelist_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getUserDefinedFunctionWhitelist_argsStandardScheme getScheme() { return new getUserDefinedFunctionWhitelist_argsStandardScheme(); } } private static class getUserDefinedFunctionWhitelist_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUserDefinedFunctionWhitelist_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getUserDefinedFunctionWhitelist_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getUserDefinedFunctionWhitelist_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserDefinedFunctionWhitelist_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getUserDefinedFunctionWhitelist_argsTupleScheme getScheme() { return new getUserDefinedFunctionWhitelist_argsTupleScheme(); } } private static class getUserDefinedFunctionWhitelist_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUserDefinedFunctionWhitelist_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserDefinedFunctionWhitelist_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserDefinedFunctionWhitelist_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class getUserDefinedFunctionWhitelist_result implements org.apache.thrift.TBase<getUserDefinedFunctionWhitelist_result, getUserDefinedFunctionWhitelist_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserDefinedFunctionWhitelist_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserDefinedFunctionWhitelist_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserDefinedFunctionWhitelist_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserDefinedFunctionWhitelist_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserDefinedFunctionWhitelist_result.class, metaDataMap); } public getUserDefinedFunctionWhitelist_result() { } public getUserDefinedFunctionWhitelist_result( java.lang.String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public getUserDefinedFunctionWhitelist_result(getUserDefinedFunctionWhitelist_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public getUserDefinedFunctionWhitelist_result deepCopy() { return new getUserDefinedFunctionWhitelist_result(this); } @Override public void clear() { this.success = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public getUserDefinedFunctionWhitelist_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getUserDefinedFunctionWhitelist_result) return this.equals((getUserDefinedFunctionWhitelist_result)that); return false; } public boolean equals(getUserDefinedFunctionWhitelist_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getUserDefinedFunctionWhitelist_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserDefinedFunctionWhitelist_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getUserDefinedFunctionWhitelist_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getUserDefinedFunctionWhitelist_resultStandardScheme getScheme() { return new getUserDefinedFunctionWhitelist_resultStandardScheme(); } } private static class getUserDefinedFunctionWhitelist_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUserDefinedFunctionWhitelist_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getUserDefinedFunctionWhitelist_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getUserDefinedFunctionWhitelist_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserDefinedFunctionWhitelist_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getUserDefinedFunctionWhitelist_resultTupleScheme getScheme() { return new getUserDefinedFunctionWhitelist_resultTupleScheme(); } } private static class getUserDefinedFunctionWhitelist_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUserDefinedFunctionWhitelist_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserDefinedFunctionWhitelist_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserDefinedFunctionWhitelist_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class getRuntimeExtensionFunctionWhitelist_args implements org.apache.thrift.TBase<getRuntimeExtensionFunctionWhitelist_args, getRuntimeExtensionFunctionWhitelist_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRuntimeExtensionFunctionWhitelist_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRuntimeExtensionFunctionWhitelist_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getRuntimeExtensionFunctionWhitelist_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getRuntimeExtensionFunctionWhitelist_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRuntimeExtensionFunctionWhitelist_args.class, metaDataMap); } public getRuntimeExtensionFunctionWhitelist_args() { } /** * Performs a deep copy on <i>other</i>. */ public getRuntimeExtensionFunctionWhitelist_args(getRuntimeExtensionFunctionWhitelist_args other) { } public getRuntimeExtensionFunctionWhitelist_args deepCopy() { return new getRuntimeExtensionFunctionWhitelist_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getRuntimeExtensionFunctionWhitelist_args) return this.equals((getRuntimeExtensionFunctionWhitelist_args)that); return false; } public boolean equals(getRuntimeExtensionFunctionWhitelist_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(getRuntimeExtensionFunctionWhitelist_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getRuntimeExtensionFunctionWhitelist_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getRuntimeExtensionFunctionWhitelist_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getRuntimeExtensionFunctionWhitelist_argsStandardScheme getScheme() { return new getRuntimeExtensionFunctionWhitelist_argsStandardScheme(); } } private static class getRuntimeExtensionFunctionWhitelist_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getRuntimeExtensionFunctionWhitelist_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getRuntimeExtensionFunctionWhitelist_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getRuntimeExtensionFunctionWhitelist_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getRuntimeExtensionFunctionWhitelist_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getRuntimeExtensionFunctionWhitelist_argsTupleScheme getScheme() { return new getRuntimeExtensionFunctionWhitelist_argsTupleScheme(); } } private static class getRuntimeExtensionFunctionWhitelist_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getRuntimeExtensionFunctionWhitelist_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getRuntimeExtensionFunctionWhitelist_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getRuntimeExtensionFunctionWhitelist_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class getRuntimeExtensionFunctionWhitelist_result implements org.apache.thrift.TBase<getRuntimeExtensionFunctionWhitelist_result, getRuntimeExtensionFunctionWhitelist_result._Fields>, java.io.Serializable, Cloneable, Comparable<getRuntimeExtensionFunctionWhitelist_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRuntimeExtensionFunctionWhitelist_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getRuntimeExtensionFunctionWhitelist_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getRuntimeExtensionFunctionWhitelist_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRuntimeExtensionFunctionWhitelist_result.class, metaDataMap); } public getRuntimeExtensionFunctionWhitelist_result() { } public getRuntimeExtensionFunctionWhitelist_result( java.lang.String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public getRuntimeExtensionFunctionWhitelist_result(getRuntimeExtensionFunctionWhitelist_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public getRuntimeExtensionFunctionWhitelist_result deepCopy() { return new getRuntimeExtensionFunctionWhitelist_result(this); } @Override public void clear() { this.success = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public getRuntimeExtensionFunctionWhitelist_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getRuntimeExtensionFunctionWhitelist_result) return this.equals((getRuntimeExtensionFunctionWhitelist_result)that); return false; } public boolean equals(getRuntimeExtensionFunctionWhitelist_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getRuntimeExtensionFunctionWhitelist_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getRuntimeExtensionFunctionWhitelist_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getRuntimeExtensionFunctionWhitelist_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getRuntimeExtensionFunctionWhitelist_resultStandardScheme getScheme() { return new getRuntimeExtensionFunctionWhitelist_resultStandardScheme(); } } private static class getRuntimeExtensionFunctionWhitelist_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getRuntimeExtensionFunctionWhitelist_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getRuntimeExtensionFunctionWhitelist_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getRuntimeExtensionFunctionWhitelist_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getRuntimeExtensionFunctionWhitelist_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getRuntimeExtensionFunctionWhitelist_resultTupleScheme getScheme() { return new getRuntimeExtensionFunctionWhitelist_resultTupleScheme(); } } private static class getRuntimeExtensionFunctionWhitelist_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getRuntimeExtensionFunctionWhitelist_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getRuntimeExtensionFunctionWhitelist_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getRuntimeExtensionFunctionWhitelist_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class setRuntimeExtensionFunctions_args implements org.apache.thrift.TBase<setRuntimeExtensionFunctions_args, setRuntimeExtensionFunctions_args._Fields>, java.io.Serializable, Cloneable, Comparable<setRuntimeExtensionFunctions_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setRuntimeExtensionFunctions_args"); private static final org.apache.thrift.protocol.TField UDFS_FIELD_DESC = new org.apache.thrift.protocol.TField("udfs", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField UDTFS_FIELD_DESC = new org.apache.thrift.protocol.TField("udtfs", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField ISRUNTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("isruntime", org.apache.thrift.protocol.TType.BOOL, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setRuntimeExtensionFunctions_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setRuntimeExtensionFunctions_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs; // required public @org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs; // required public boolean isruntime; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { UDFS((short)1, "udfs"), UDTFS((short)2, "udtfs"), ISRUNTIME((short)3, "isruntime"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // UDFS return UDFS; case 2: // UDTFS return UDTFS; case 3: // ISRUNTIME return ISRUNTIME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __ISRUNTIME_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.UDFS, new org.apache.thrift.meta_data.FieldMetaData("udfs", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ai.heavy.thrift.calciteserver.TUserDefinedFunction.class)))); tmpMap.put(_Fields.UDTFS, new org.apache.thrift.meta_data.FieldMetaData("udtfs", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ai.heavy.thrift.calciteserver.TUserDefinedTableFunction.class)))); tmpMap.put(_Fields.ISRUNTIME, new org.apache.thrift.meta_data.FieldMetaData("isruntime", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setRuntimeExtensionFunctions_args.class, metaDataMap); } public setRuntimeExtensionFunctions_args() { } public setRuntimeExtensionFunctions_args( java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, boolean isruntime) { this(); this.udfs = udfs; this.udtfs = udtfs; this.isruntime = isruntime; setIsruntimeIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public setRuntimeExtensionFunctions_args(setRuntimeExtensionFunctions_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetUdfs()) { java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> __this__udfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(other.udfs.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedFunction other_element : other.udfs) { __this__udfs.add(new ai.heavy.thrift.calciteserver.TUserDefinedFunction(other_element)); } this.udfs = __this__udfs; } if (other.isSetUdtfs()) { java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> __this__udtfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(other.udtfs.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedTableFunction other_element : other.udtfs) { __this__udtfs.add(new ai.heavy.thrift.calciteserver.TUserDefinedTableFunction(other_element)); } this.udtfs = __this__udtfs; } this.isruntime = other.isruntime; } public setRuntimeExtensionFunctions_args deepCopy() { return new setRuntimeExtensionFunctions_args(this); } @Override public void clear() { this.udfs = null; this.udtfs = null; setIsruntimeIsSet(false); this.isruntime = false; } public int getUdfsSize() { return (this.udfs == null) ? 0 : this.udfs.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<ai.heavy.thrift.calciteserver.TUserDefinedFunction> getUdfsIterator() { return (this.udfs == null) ? null : this.udfs.iterator(); } public void addToUdfs(ai.heavy.thrift.calciteserver.TUserDefinedFunction elem) { if (this.udfs == null) { this.udfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(); } this.udfs.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> getUdfs() { return this.udfs; } public setRuntimeExtensionFunctions_args setUdfs(@org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs) { this.udfs = udfs; return this; } public void unsetUdfs() { this.udfs = null; } /** Returns true if field udfs is set (has been assigned a value) and false otherwise */ public boolean isSetUdfs() { return this.udfs != null; } public void setUdfsIsSet(boolean value) { if (!value) { this.udfs = null; } } public int getUdtfsSize() { return (this.udtfs == null) ? 0 : this.udtfs.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> getUdtfsIterator() { return (this.udtfs == null) ? null : this.udtfs.iterator(); } public void addToUdtfs(ai.heavy.thrift.calciteserver.TUserDefinedTableFunction elem) { if (this.udtfs == null) { this.udtfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(); } this.udtfs.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> getUdtfs() { return this.udtfs; } public setRuntimeExtensionFunctions_args setUdtfs(@org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs) { this.udtfs = udtfs; return this; } public void unsetUdtfs() { this.udtfs = null; } /** Returns true if field udtfs is set (has been assigned a value) and false otherwise */ public boolean isSetUdtfs() { return this.udtfs != null; } public void setUdtfsIsSet(boolean value) { if (!value) { this.udtfs = null; } } public boolean isIsruntime() { return this.isruntime; } public setRuntimeExtensionFunctions_args setIsruntime(boolean isruntime) { this.isruntime = isruntime; setIsruntimeIsSet(true); return this; } public void unsetIsruntime() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISRUNTIME_ISSET_ID); } /** Returns true if field isruntime is set (has been assigned a value) and false otherwise */ public boolean isSetIsruntime() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISRUNTIME_ISSET_ID); } public void setIsruntimeIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISRUNTIME_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case UDFS: if (value == null) { unsetUdfs(); } else { setUdfs((java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>)value); } break; case UDTFS: if (value == null) { unsetUdtfs(); } else { setUdtfs((java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>)value); } break; case ISRUNTIME: if (value == null) { unsetIsruntime(); } else { setIsruntime((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case UDFS: return getUdfs(); case UDTFS: return getUdtfs(); case ISRUNTIME: return isIsruntime(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case UDFS: return isSetUdfs(); case UDTFS: return isSetUdtfs(); case ISRUNTIME: return isSetIsruntime(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setRuntimeExtensionFunctions_args) return this.equals((setRuntimeExtensionFunctions_args)that); return false; } public boolean equals(setRuntimeExtensionFunctions_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_udfs = true && this.isSetUdfs(); boolean that_present_udfs = true && that.isSetUdfs(); if (this_present_udfs || that_present_udfs) { if (!(this_present_udfs && that_present_udfs)) return false; if (!this.udfs.equals(that.udfs)) return false; } boolean this_present_udtfs = true && this.isSetUdtfs(); boolean that_present_udtfs = true && that.isSetUdtfs(); if (this_present_udtfs || that_present_udtfs) { if (!(this_present_udtfs && that_present_udtfs)) return false; if (!this.udtfs.equals(that.udtfs)) return false; } boolean this_present_isruntime = true; boolean that_present_isruntime = true; if (this_present_isruntime || that_present_isruntime) { if (!(this_present_isruntime && that_present_isruntime)) return false; if (this.isruntime != that.isruntime) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUdfs()) ? 131071 : 524287); if (isSetUdfs()) hashCode = hashCode * 8191 + udfs.hashCode(); hashCode = hashCode * 8191 + ((isSetUdtfs()) ? 131071 : 524287); if (isSetUdtfs()) hashCode = hashCode * 8191 + udtfs.hashCode(); hashCode = hashCode * 8191 + ((isruntime) ? 131071 : 524287); return hashCode; } @Override public int compareTo(setRuntimeExtensionFunctions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUdfs(), other.isSetUdfs()); if (lastComparison != 0) { return lastComparison; } if (isSetUdfs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.udfs, other.udfs); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetUdtfs(), other.isSetUdtfs()); if (lastComparison != 0) { return lastComparison; } if (isSetUdtfs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.udtfs, other.udtfs); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetIsruntime(), other.isSetIsruntime()); if (lastComparison != 0) { return lastComparison; } if (isSetIsruntime()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isruntime, other.isruntime); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setRuntimeExtensionFunctions_args("); boolean first = true; sb.append("udfs:"); if (this.udfs == null) { sb.append("null"); } else { sb.append(this.udfs); } first = false; if (!first) sb.append(", "); sb.append("udtfs:"); if (this.udtfs == null) { sb.append("null"); } else { sb.append(this.udtfs); } first = false; if (!first) sb.append(", "); sb.append("isruntime:"); sb.append(this.isruntime); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setRuntimeExtensionFunctions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public setRuntimeExtensionFunctions_argsStandardScheme getScheme() { return new setRuntimeExtensionFunctions_argsStandardScheme(); } } private static class setRuntimeExtensionFunctions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setRuntimeExtensionFunctions_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, setRuntimeExtensionFunctions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // UDFS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list88 = iprot.readListBegin(); struct.udfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(_list88.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedFunction _elem89; for (int _i90 = 0; _i90 < _list88.size; ++_i90) { _elem89 = new ai.heavy.thrift.calciteserver.TUserDefinedFunction(); _elem89.read(iprot); struct.udfs.add(_elem89); } iprot.readListEnd(); } struct.setUdfsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // UDTFS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list91 = iprot.readListBegin(); struct.udtfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(_list91.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _elem92; for (int _i93 = 0; _i93 < _list91.size; ++_i93) { _elem92 = new ai.heavy.thrift.calciteserver.TUserDefinedTableFunction(); _elem92.read(iprot); struct.udtfs.add(_elem92); } iprot.readListEnd(); } struct.setUdtfsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ISRUNTIME if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isruntime = iprot.readBool(); struct.setIsruntimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, setRuntimeExtensionFunctions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.udfs != null) { oprot.writeFieldBegin(UDFS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.udfs.size())); for (ai.heavy.thrift.calciteserver.TUserDefinedFunction _iter94 : struct.udfs) { _iter94.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.udtfs != null) { oprot.writeFieldBegin(UDTFS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.udtfs.size())); for (ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _iter95 : struct.udtfs) { _iter95.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(ISRUNTIME_FIELD_DESC); oprot.writeBool(struct.isruntime); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setRuntimeExtensionFunctions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public setRuntimeExtensionFunctions_argsTupleScheme getScheme() { return new setRuntimeExtensionFunctions_argsTupleScheme(); } } private static class setRuntimeExtensionFunctions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setRuntimeExtensionFunctions_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setRuntimeExtensionFunctions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUdfs()) { optionals.set(0); } if (struct.isSetUdtfs()) { optionals.set(1); } if (struct.isSetIsruntime()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUdfs()) { { oprot.writeI32(struct.udfs.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedFunction _iter96 : struct.udfs) { _iter96.write(oprot); } } } if (struct.isSetUdtfs()) { { oprot.writeI32(struct.udtfs.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _iter97 : struct.udtfs) { _iter97.write(oprot); } } } if (struct.isSetIsruntime()) { oprot.writeBool(struct.isruntime); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setRuntimeExtensionFunctions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list98 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.udfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(_list98.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedFunction _elem99; for (int _i100 = 0; _i100 < _list98.size; ++_i100) { _elem99 = new ai.heavy.thrift.calciteserver.TUserDefinedFunction(); _elem99.read(iprot); struct.udfs.add(_elem99); } } struct.setUdfsIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.udtfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(_list101.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _elem102; for (int _i103 = 0; _i103 < _list101.size; ++_i103) { _elem102 = new ai.heavy.thrift.calciteserver.TUserDefinedTableFunction(); _elem102.read(iprot); struct.udtfs.add(_elem102); } } struct.setUdtfsIsSet(true); } if (incoming.get(2)) { struct.isruntime = iprot.readBool(); struct.setIsruntimeIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class setRuntimeExtensionFunctions_result implements org.apache.thrift.TBase<setRuntimeExtensionFunctions_result, setRuntimeExtensionFunctions_result._Fields>, java.io.Serializable, Cloneable, Comparable<setRuntimeExtensionFunctions_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setRuntimeExtensionFunctions_result"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setRuntimeExtensionFunctions_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setRuntimeExtensionFunctions_resultTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setRuntimeExtensionFunctions_result.class, metaDataMap); } public setRuntimeExtensionFunctions_result() { } /** * Performs a deep copy on <i>other</i>. */ public setRuntimeExtensionFunctions_result(setRuntimeExtensionFunctions_result other) { } public setRuntimeExtensionFunctions_result deepCopy() { return new setRuntimeExtensionFunctions_result(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setRuntimeExtensionFunctions_result) return this.equals((setRuntimeExtensionFunctions_result)that); return false; } public boolean equals(setRuntimeExtensionFunctions_result that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(setRuntimeExtensionFunctions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setRuntimeExtensionFunctions_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setRuntimeExtensionFunctions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public setRuntimeExtensionFunctions_resultStandardScheme getScheme() { return new setRuntimeExtensionFunctions_resultStandardScheme(); } } private static class setRuntimeExtensionFunctions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setRuntimeExtensionFunctions_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, setRuntimeExtensionFunctions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, setRuntimeExtensionFunctions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setRuntimeExtensionFunctions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public setRuntimeExtensionFunctions_resultTupleScheme getScheme() { return new setRuntimeExtensionFunctions_resultTupleScheme(); } } private static class setRuntimeExtensionFunctions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setRuntimeExtensionFunctions_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setRuntimeExtensionFunctions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setRuntimeExtensionFunctions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class updateMetadata_args implements org.apache.thrift.TBase<updateMetadata_args, updateMetadata_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMetadata_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateMetadata_args"); private static final org.apache.thrift.protocol.TField CATALOG_FIELD_DESC = new org.apache.thrift.protocol.TField("catalog", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateMetadata_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateMetadata_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String catalog; // required public @org.apache.thrift.annotation.Nullable java.lang.String table; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { CATALOG((short)1, "catalog"), TABLE((short)2, "table"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // CATALOG return CATALOG; case 2: // TABLE return TABLE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.CATALOG, new org.apache.thrift.meta_data.FieldMetaData("catalog", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateMetadata_args.class, metaDataMap); } public updateMetadata_args() { } public updateMetadata_args( java.lang.String catalog, java.lang.String table) { this(); this.catalog = catalog; this.table = table; } /** * Performs a deep copy on <i>other</i>. */ public updateMetadata_args(updateMetadata_args other) { if (other.isSetCatalog()) { this.catalog = other.catalog; } if (other.isSetTable()) { this.table = other.table; } } public updateMetadata_args deepCopy() { return new updateMetadata_args(this); } @Override public void clear() { this.catalog = null; this.table = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getCatalog() { return this.catalog; } public updateMetadata_args setCatalog(@org.apache.thrift.annotation.Nullable java.lang.String catalog) { this.catalog = catalog; return this; } public void unsetCatalog() { this.catalog = null; } /** Returns true if field catalog is set (has been assigned a value) and false otherwise */ public boolean isSetCatalog() { return this.catalog != null; } public void setCatalogIsSet(boolean value) { if (!value) { this.catalog = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable() { return this.table; } public updateMetadata_args setTable(@org.apache.thrift.annotation.Nullable java.lang.String table) { this.table = table; return this; } public void unsetTable() { this.table = null; } /** Returns true if field table is set (has been assigned a value) and false otherwise */ public boolean isSetTable() { return this.table != null; } public void setTableIsSet(boolean value) { if (!value) { this.table = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case CATALOG: if (value == null) { unsetCatalog(); } else { setCatalog((java.lang.String)value); } break; case TABLE: if (value == null) { unsetTable(); } else { setTable((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case CATALOG: return getCatalog(); case TABLE: return getTable(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case CATALOG: return isSetCatalog(); case TABLE: return isSetTable(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateMetadata_args) return this.equals((updateMetadata_args)that); return false; } public boolean equals(updateMetadata_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_catalog = true && this.isSetCatalog(); boolean that_present_catalog = true && that.isSetCatalog(); if (this_present_catalog || that_present_catalog) { if (!(this_present_catalog && that_present_catalog)) return false; if (!this.catalog.equals(that.catalog)) return false; } boolean this_present_table = true && this.isSetTable(); boolean that_present_table = true && that.isSetTable(); if (this_present_table || that_present_table) { if (!(this_present_table && that_present_table)) return false; if (!this.table.equals(that.table)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetCatalog()) ? 131071 : 524287); if (isSetCatalog()) hashCode = hashCode * 8191 + catalog.hashCode(); hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287); if (isSetTable()) hashCode = hashCode * 8191 + table.hashCode(); return hashCode; } @Override public int compareTo(updateMetadata_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetCatalog(), other.isSetCatalog()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalog()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalog, other.catalog); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable(), other.isSetTable()); if (lastComparison != 0) { return lastComparison; } if (isSetTable()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("updateMetadata_args("); boolean first = true; sb.append("catalog:"); if (this.catalog == null) { sb.append("null"); } else { sb.append(this.catalog); } first = false; if (!first) sb.append(", "); sb.append("table:"); if (this.table == null) { sb.append("null"); } else { sb.append(this.table); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class updateMetadata_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public updateMetadata_argsStandardScheme getScheme() { return new updateMetadata_argsStandardScheme(); } } private static class updateMetadata_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateMetadata_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, updateMetadata_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // CATALOG if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.catalog = iprot.readString(); struct.setCatalogIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table = iprot.readString(); struct.setTableIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, updateMetadata_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.catalog != null) { oprot.writeFieldBegin(CATALOG_FIELD_DESC); oprot.writeString(struct.catalog); oprot.writeFieldEnd(); } if (struct.table != null) { oprot.writeFieldBegin(TABLE_FIELD_DESC); oprot.writeString(struct.table); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateMetadata_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public updateMetadata_argsTupleScheme getScheme() { return new updateMetadata_argsTupleScheme(); } } private static class updateMetadata_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateMetadata_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateMetadata_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetCatalog()) { optionals.set(0); } if (struct.isSetTable()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetCatalog()) { oprot.writeString(struct.catalog); } if (struct.isSetTable()) { oprot.writeString(struct.table); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateMetadata_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.catalog = iprot.readString(); struct.setCatalogIsSet(true); } if (incoming.get(1)) { struct.table = iprot.readString(); struct.setTableIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class updateMetadata_result implements org.apache.thrift.TBase<updateMetadata_result, updateMetadata_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMetadata_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateMetadata_result"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateMetadata_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateMetadata_resultTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateMetadata_result.class, metaDataMap); } public updateMetadata_result() { } /** * Performs a deep copy on <i>other</i>. */ public updateMetadata_result(updateMetadata_result other) { } public updateMetadata_result deepCopy() { return new updateMetadata_result(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateMetadata_result) return this.equals((updateMetadata_result)that); return false; } public boolean equals(updateMetadata_result that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(updateMetadata_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("updateMetadata_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class updateMetadata_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public updateMetadata_resultStandardScheme getScheme() { return new updateMetadata_resultStandardScheme(); } } private static class updateMetadata_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateMetadata_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, updateMetadata_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, updateMetadata_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateMetadata_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public updateMetadata_resultTupleScheme getScheme() { return new updateMetadata_resultTupleScheme(); } } private static class updateMetadata_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateMetadata_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateMetadata_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateMetadata_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class getCompletionHints_args implements org.apache.thrift.TBase<getCompletionHints_args, getCompletionHints_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCompletionHints_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCompletionHints_args"); private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PASSWD_FIELD_DESC = new org.apache.thrift.protocol.TField("passwd", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField CATALOG_FIELD_DESC = new org.apache.thrift.protocol.TField("catalog", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField VISIBLE_TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("visible_tables", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.protocol.TField SQL_FIELD_DESC = new org.apache.thrift.protocol.TField("sql", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.protocol.TField CURSOR_FIELD_DESC = new org.apache.thrift.protocol.TField("cursor", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getCompletionHints_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getCompletionHints_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String user; // required public @org.apache.thrift.annotation.Nullable java.lang.String passwd; // required public @org.apache.thrift.annotation.Nullable java.lang.String catalog; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> visible_tables; // required public @org.apache.thrift.annotation.Nullable java.lang.String sql; // required public int cursor; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER((short)1, "user"), PASSWD((short)2, "passwd"), CATALOG((short)3, "catalog"), VISIBLE_TABLES((short)4, "visible_tables"), SQL((short)5, "sql"), CURSOR((short)6, "cursor"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER return USER; case 2: // PASSWD return PASSWD; case 3: // CATALOG return CATALOG; case 4: // VISIBLE_TABLES return VISIBLE_TABLES; case 5: // SQL return SQL; case 6: // CURSOR return CURSOR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __CURSOR_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PASSWD, new org.apache.thrift.meta_data.FieldMetaData("passwd", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CATALOG, new org.apache.thrift.meta_data.FieldMetaData("catalog", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VISIBLE_TABLES, new org.apache.thrift.meta_data.FieldMetaData("visible_tables", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.SQL, new org.apache.thrift.meta_data.FieldMetaData("sql", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CURSOR, new org.apache.thrift.meta_data.FieldMetaData("cursor", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCompletionHints_args.class, metaDataMap); } public getCompletionHints_args() { } public getCompletionHints_args( java.lang.String user, java.lang.String passwd, java.lang.String catalog, java.util.List<java.lang.String> visible_tables, java.lang.String sql, int cursor) { this(); this.user = user; this.passwd = passwd; this.catalog = catalog; this.visible_tables = visible_tables; this.sql = sql; this.cursor = cursor; setCursorIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public getCompletionHints_args(getCompletionHints_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetUser()) { this.user = other.user; } if (other.isSetPasswd()) { this.passwd = other.passwd; } if (other.isSetCatalog()) { this.catalog = other.catalog; } if (other.isSetVisible_tables()) { java.util.List<java.lang.String> __this__visible_tables = new java.util.ArrayList<java.lang.String>(other.visible_tables); this.visible_tables = __this__visible_tables; } if (other.isSetSql()) { this.sql = other.sql; } this.cursor = other.cursor; } public getCompletionHints_args deepCopy() { return new getCompletionHints_args(this); } @Override public void clear() { this.user = null; this.passwd = null; this.catalog = null; this.visible_tables = null; this.sql = null; setCursorIsSet(false); this.cursor = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getUser() { return this.user; } public getCompletionHints_args setUser(@org.apache.thrift.annotation.Nullable java.lang.String user) { this.user = user; return this; } public void unsetUser() { this.user = null; } /** Returns true if field user is set (has been assigned a value) and false otherwise */ public boolean isSetUser() { return this.user != null; } public void setUserIsSet(boolean value) { if (!value) { this.user = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getPasswd() { return this.passwd; } public getCompletionHints_args setPasswd(@org.apache.thrift.annotation.Nullable java.lang.String passwd) { this.passwd = passwd; return this; } public void unsetPasswd() { this.passwd = null; } /** Returns true if field passwd is set (has been assigned a value) and false otherwise */ public boolean isSetPasswd() { return this.passwd != null; } public void setPasswdIsSet(boolean value) { if (!value) { this.passwd = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getCatalog() { return this.catalog; } public getCompletionHints_args setCatalog(@org.apache.thrift.annotation.Nullable java.lang.String catalog) { this.catalog = catalog; return this; } public void unsetCatalog() { this.catalog = null; } /** Returns true if field catalog is set (has been assigned a value) and false otherwise */ public boolean isSetCatalog() { return this.catalog != null; } public void setCatalogIsSet(boolean value) { if (!value) { this.catalog = null; } } public int getVisible_tablesSize() { return (this.visible_tables == null) ? 0 : this.visible_tables.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getVisible_tablesIterator() { return (this.visible_tables == null) ? null : this.visible_tables.iterator(); } public void addToVisible_tables(java.lang.String elem) { if (this.visible_tables == null) { this.visible_tables = new java.util.ArrayList<java.lang.String>(); } this.visible_tables.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getVisible_tables() { return this.visible_tables; } public getCompletionHints_args setVisible_tables(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> visible_tables) { this.visible_tables = visible_tables; return this; } public void unsetVisible_tables() { this.visible_tables = null; } /** Returns true if field visible_tables is set (has been assigned a value) and false otherwise */ public boolean isSetVisible_tables() { return this.visible_tables != null; } public void setVisible_tablesIsSet(boolean value) { if (!value) { this.visible_tables = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getSql() { return this.sql; } public getCompletionHints_args setSql(@org.apache.thrift.annotation.Nullable java.lang.String sql) { this.sql = sql; return this; } public void unsetSql() { this.sql = null; } /** Returns true if field sql is set (has been assigned a value) and false otherwise */ public boolean isSetSql() { return this.sql != null; } public void setSqlIsSet(boolean value) { if (!value) { this.sql = null; } } public int getCursor() { return this.cursor; } public getCompletionHints_args setCursor(int cursor) { this.cursor = cursor; setCursorIsSet(true); return this; } public void unsetCursor() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CURSOR_ISSET_ID); } /** Returns true if field cursor is set (has been assigned a value) and false otherwise */ public boolean isSetCursor() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CURSOR_ISSET_ID); } public void setCursorIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CURSOR_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER: if (value == null) { unsetUser(); } else { setUser((java.lang.String)value); } break; case PASSWD: if (value == null) { unsetPasswd(); } else { setPasswd((java.lang.String)value); } break; case CATALOG: if (value == null) { unsetCatalog(); } else { setCatalog((java.lang.String)value); } break; case VISIBLE_TABLES: if (value == null) { unsetVisible_tables(); } else { setVisible_tables((java.util.List<java.lang.String>)value); } break; case SQL: if (value == null) { unsetSql(); } else { setSql((java.lang.String)value); } break; case CURSOR: if (value == null) { unsetCursor(); } else { setCursor((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER: return getUser(); case PASSWD: return getPasswd(); case CATALOG: return getCatalog(); case VISIBLE_TABLES: return getVisible_tables(); case SQL: return getSql(); case CURSOR: return getCursor(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER: return isSetUser(); case PASSWD: return isSetPasswd(); case CATALOG: return isSetCatalog(); case VISIBLE_TABLES: return isSetVisible_tables(); case SQL: return isSetSql(); case CURSOR: return isSetCursor(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getCompletionHints_args) return this.equals((getCompletionHints_args)that); return false; } public boolean equals(getCompletionHints_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_user = true && this.isSetUser(); boolean that_present_user = true && that.isSetUser(); if (this_present_user || that_present_user) { if (!(this_present_user && that_present_user)) return false; if (!this.user.equals(that.user)) return false; } boolean this_present_passwd = true && this.isSetPasswd(); boolean that_present_passwd = true && that.isSetPasswd(); if (this_present_passwd || that_present_passwd) { if (!(this_present_passwd && that_present_passwd)) return false; if (!this.passwd.equals(that.passwd)) return false; } boolean this_present_catalog = true && this.isSetCatalog(); boolean that_present_catalog = true && that.isSetCatalog(); if (this_present_catalog || that_present_catalog) { if (!(this_present_catalog && that_present_catalog)) return false; if (!this.catalog.equals(that.catalog)) return false; } boolean this_present_visible_tables = true && this.isSetVisible_tables(); boolean that_present_visible_tables = true && that.isSetVisible_tables(); if (this_present_visible_tables || that_present_visible_tables) { if (!(this_present_visible_tables && that_present_visible_tables)) return false; if (!this.visible_tables.equals(that.visible_tables)) return false; } boolean this_present_sql = true && this.isSetSql(); boolean that_present_sql = true && that.isSetSql(); if (this_present_sql || that_present_sql) { if (!(this_present_sql && that_present_sql)) return false; if (!this.sql.equals(that.sql)) return false; } boolean this_present_cursor = true; boolean that_present_cursor = true; if (this_present_cursor || that_present_cursor) { if (!(this_present_cursor && that_present_cursor)) return false; if (this.cursor != that.cursor) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287); if (isSetUser()) hashCode = hashCode * 8191 + user.hashCode(); hashCode = hashCode * 8191 + ((isSetPasswd()) ? 131071 : 524287); if (isSetPasswd()) hashCode = hashCode * 8191 + passwd.hashCode(); hashCode = hashCode * 8191 + ((isSetCatalog()) ? 131071 : 524287); if (isSetCatalog()) hashCode = hashCode * 8191 + catalog.hashCode(); hashCode = hashCode * 8191 + ((isSetVisible_tables()) ? 131071 : 524287); if (isSetVisible_tables()) hashCode = hashCode * 8191 + visible_tables.hashCode(); hashCode = hashCode * 8191 + ((isSetSql()) ? 131071 : 524287); if (isSetSql()) hashCode = hashCode * 8191 + sql.hashCode(); hashCode = hashCode * 8191 + cursor; return hashCode; } @Override public int compareTo(getCompletionHints_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUser(), other.isSetUser()); if (lastComparison != 0) { return lastComparison; } if (isSetUser()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPasswd(), other.isSetPasswd()); if (lastComparison != 0) { return lastComparison; } if (isSetPasswd()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwd, other.passwd); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCatalog(), other.isSetCatalog()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalog()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalog, other.catalog); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetVisible_tables(), other.isSetVisible_tables()); if (lastComparison != 0) { return lastComparison; } if (isSetVisible_tables()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.visible_tables, other.visible_tables); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSql(), other.isSetSql()); if (lastComparison != 0) { return lastComparison; } if (isSetSql()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sql, other.sql); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCursor(), other.isSetCursor()); if (lastComparison != 0) { return lastComparison; } if (isSetCursor()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cursor, other.cursor); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getCompletionHints_args("); boolean first = true; sb.append("user:"); if (this.user == null) { sb.append("null"); } else { sb.append(this.user); } first = false; if (!first) sb.append(", "); sb.append("passwd:"); if (this.passwd == null) { sb.append("null"); } else { sb.append(this.passwd); } first = false; if (!first) sb.append(", "); sb.append("catalog:"); if (this.catalog == null) { sb.append("null"); } else { sb.append(this.catalog); } first = false; if (!first) sb.append(", "); sb.append("visible_tables:"); if (this.visible_tables == null) { sb.append("null"); } else { sb.append(this.visible_tables); } first = false; if (!first) sb.append(", "); sb.append("sql:"); if (this.sql == null) { sb.append("null"); } else { sb.append(this.sql); } first = false; if (!first) sb.append(", "); sb.append("cursor:"); sb.append(this.cursor); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getCompletionHints_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getCompletionHints_argsStandardScheme getScheme() { return new getCompletionHints_argsStandardScheme(); } } private static class getCompletionHints_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getCompletionHints_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getCompletionHints_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.user = iprot.readString(); struct.setUserIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PASSWD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.passwd = iprot.readString(); struct.setPasswdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // CATALOG if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.catalog = iprot.readString(); struct.setCatalogIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // VISIBLE_TABLES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list104 = iprot.readListBegin(); struct.visible_tables = new java.util.ArrayList<java.lang.String>(_list104.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem105; for (int _i106 = 0; _i106 < _list104.size; ++_i106) { _elem105 = iprot.readString(); struct.visible_tables.add(_elem105); } iprot.readListEnd(); } struct.setVisible_tablesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // SQL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.sql = iprot.readString(); struct.setSqlIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // CURSOR if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.cursor = iprot.readI32(); struct.setCursorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getCompletionHints_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.user != null) { oprot.writeFieldBegin(USER_FIELD_DESC); oprot.writeString(struct.user); oprot.writeFieldEnd(); } if (struct.passwd != null) { oprot.writeFieldBegin(PASSWD_FIELD_DESC); oprot.writeString(struct.passwd); oprot.writeFieldEnd(); } if (struct.catalog != null) { oprot.writeFieldBegin(CATALOG_FIELD_DESC); oprot.writeString(struct.catalog); oprot.writeFieldEnd(); } if (struct.visible_tables != null) { oprot.writeFieldBegin(VISIBLE_TABLES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.visible_tables.size())); for (java.lang.String _iter107 : struct.visible_tables) { oprot.writeString(_iter107); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.sql != null) { oprot.writeFieldBegin(SQL_FIELD_DESC); oprot.writeString(struct.sql); oprot.writeFieldEnd(); } oprot.writeFieldBegin(CURSOR_FIELD_DESC); oprot.writeI32(struct.cursor); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getCompletionHints_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getCompletionHints_argsTupleScheme getScheme() { return new getCompletionHints_argsTupleScheme(); } } private static class getCompletionHints_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getCompletionHints_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getCompletionHints_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUser()) { optionals.set(0); } if (struct.isSetPasswd()) { optionals.set(1); } if (struct.isSetCatalog()) { optionals.set(2); } if (struct.isSetVisible_tables()) { optionals.set(3); } if (struct.isSetSql()) { optionals.set(4); } if (struct.isSetCursor()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetUser()) { oprot.writeString(struct.user); } if (struct.isSetPasswd()) { oprot.writeString(struct.passwd); } if (struct.isSetCatalog()) { oprot.writeString(struct.catalog); } if (struct.isSetVisible_tables()) { { oprot.writeI32(struct.visible_tables.size()); for (java.lang.String _iter108 : struct.visible_tables) { oprot.writeString(_iter108); } } } if (struct.isSetSql()) { oprot.writeString(struct.sql); } if (struct.isSetCursor()) { oprot.writeI32(struct.cursor); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getCompletionHints_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.user = iprot.readString(); struct.setUserIsSet(true); } if (incoming.get(1)) { struct.passwd = iprot.readString(); struct.setPasswdIsSet(true); } if (incoming.get(2)) { struct.catalog = iprot.readString(); struct.setCatalogIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list109 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.visible_tables = new java.util.ArrayList<java.lang.String>(_list109.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem110; for (int _i111 = 0; _i111 < _list109.size; ++_i111) { _elem110 = iprot.readString(); struct.visible_tables.add(_elem110); } } struct.setVisible_tablesIsSet(true); } if (incoming.get(4)) { struct.sql = iprot.readString(); struct.setSqlIsSet(true); } if (incoming.get(5)) { struct.cursor = iprot.readI32(); struct.setCursorIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class getCompletionHints_result implements org.apache.thrift.TBase<getCompletionHints_result, getCompletionHints_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCompletionHints_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCompletionHints_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getCompletionHints_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getCompletionHints_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ai.heavy.thrift.calciteserver.TCompletionHint.class)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCompletionHints_result.class, metaDataMap); } public getCompletionHints_result() { } public getCompletionHints_result( java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public getCompletionHints_result(getCompletionHints_result other) { if (other.isSetSuccess()) { java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> __this__success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TCompletionHint>(other.success.size()); for (ai.heavy.thrift.calciteserver.TCompletionHint other_element : other.success) { __this__success.add(new ai.heavy.thrift.calciteserver.TCompletionHint(other_element)); } this.success = __this__success; } } public getCompletionHints_result deepCopy() { return new getCompletionHints_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<ai.heavy.thrift.calciteserver.TCompletionHint> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(ai.heavy.thrift.calciteserver.TCompletionHint elem) { if (this.success == null) { this.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TCompletionHint>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> getSuccess() { return this.success; } public getCompletionHints_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getCompletionHints_result) return this.equals((getCompletionHints_result)that); return false; } public boolean equals(getCompletionHints_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getCompletionHints_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getCompletionHints_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getCompletionHints_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getCompletionHints_resultStandardScheme getScheme() { return new getCompletionHints_resultStandardScheme(); } } private static class getCompletionHints_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getCompletionHints_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getCompletionHints_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list112 = iprot.readListBegin(); struct.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TCompletionHint>(_list112.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TCompletionHint _elem113; for (int _i114 = 0; _i114 < _list112.size; ++_i114) { _elem113 = new ai.heavy.thrift.calciteserver.TCompletionHint(); _elem113.read(iprot); struct.success.add(_elem113); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getCompletionHints_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (ai.heavy.thrift.calciteserver.TCompletionHint _iter115 : struct.success) { _iter115.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getCompletionHints_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public getCompletionHints_resultTupleScheme getScheme() { return new getCompletionHints_resultTupleScheme(); } } private static class getCompletionHints_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getCompletionHints_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getCompletionHints_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (ai.heavy.thrift.calciteserver.TCompletionHint _iter116 : struct.success) { _iter116.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getCompletionHints_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list117 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TCompletionHint>(_list117.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TCompletionHint _elem118; for (int _i119 = 0; _i119 < _list117.size; ++_i119) { _elem118 = new ai.heavy.thrift.calciteserver.TCompletionHint(); _elem118.read(iprot); struct.success.add(_elem118); } } struct.setSuccessIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/InvalidParseRequest.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class InvalidParseRequest extends org.apache.thrift.TException implements org.apache.thrift.TBase<InvalidParseRequest, InvalidParseRequest._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidParseRequest> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidParseRequest"); private static final org.apache.thrift.protocol.TField WHAT_UP_FIELD_DESC = new org.apache.thrift.protocol.TField("whatUp", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField WHY_UP_FIELD_DESC = new org.apache.thrift.protocol.TField("whyUp", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new InvalidParseRequestStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new InvalidParseRequestTupleSchemeFactory(); public int whatUp; // required public @org.apache.thrift.annotation.Nullable java.lang.String whyUp; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { WHAT_UP((short)1, "whatUp"), WHY_UP((short)2, "whyUp"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // WHAT_UP return WHAT_UP; case 2: // WHY_UP return WHY_UP; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __WHATUP_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.WHAT_UP, new org.apache.thrift.meta_data.FieldMetaData("whatUp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.WHY_UP, new org.apache.thrift.meta_data.FieldMetaData("whyUp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidParseRequest.class, metaDataMap); } public InvalidParseRequest() { } public InvalidParseRequest( int whatUp, java.lang.String whyUp) { this(); this.whatUp = whatUp; setWhatUpIsSet(true); this.whyUp = whyUp; } /** * Performs a deep copy on <i>other</i>. */ public InvalidParseRequest(InvalidParseRequest other) { __isset_bitfield = other.__isset_bitfield; this.whatUp = other.whatUp; if (other.isSetWhyUp()) { this.whyUp = other.whyUp; } } public InvalidParseRequest deepCopy() { return new InvalidParseRequest(this); } @Override public void clear() { setWhatUpIsSet(false); this.whatUp = 0; this.whyUp = null; } public int getWhatUp() { return this.whatUp; } public InvalidParseRequest setWhatUp(int whatUp) { this.whatUp = whatUp; setWhatUpIsSet(true); return this; } public void unsetWhatUp() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WHATUP_ISSET_ID); } /** Returns true if field whatUp is set (has been assigned a value) and false otherwise */ public boolean isSetWhatUp() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WHATUP_ISSET_ID); } public void setWhatUpIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WHATUP_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getWhyUp() { return this.whyUp; } public InvalidParseRequest setWhyUp(@org.apache.thrift.annotation.Nullable java.lang.String whyUp) { this.whyUp = whyUp; return this; } public void unsetWhyUp() { this.whyUp = null; } /** Returns true if field whyUp is set (has been assigned a value) and false otherwise */ public boolean isSetWhyUp() { return this.whyUp != null; } public void setWhyUpIsSet(boolean value) { if (!value) { this.whyUp = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case WHAT_UP: if (value == null) { unsetWhatUp(); } else { setWhatUp((java.lang.Integer)value); } break; case WHY_UP: if (value == null) { unsetWhyUp(); } else { setWhyUp((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case WHAT_UP: return getWhatUp(); case WHY_UP: return getWhyUp(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case WHAT_UP: return isSetWhatUp(); case WHY_UP: return isSetWhyUp(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof InvalidParseRequest) return this.equals((InvalidParseRequest)that); return false; } public boolean equals(InvalidParseRequest that) { if (that == null) return false; if (this == that) return true; boolean this_present_whatUp = true; boolean that_present_whatUp = true; if (this_present_whatUp || that_present_whatUp) { if (!(this_present_whatUp && that_present_whatUp)) return false; if (this.whatUp != that.whatUp) return false; } boolean this_present_whyUp = true && this.isSetWhyUp(); boolean that_present_whyUp = true && that.isSetWhyUp(); if (this_present_whyUp || that_present_whyUp) { if (!(this_present_whyUp && that_present_whyUp)) return false; if (!this.whyUp.equals(that.whyUp)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + whatUp; hashCode = hashCode * 8191 + ((isSetWhyUp()) ? 131071 : 524287); if (isSetWhyUp()) hashCode = hashCode * 8191 + whyUp.hashCode(); return hashCode; } @Override public int compareTo(InvalidParseRequest other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetWhatUp(), other.isSetWhatUp()); if (lastComparison != 0) { return lastComparison; } if (isSetWhatUp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.whatUp, other.whatUp); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetWhyUp(), other.isSetWhyUp()); if (lastComparison != 0) { return lastComparison; } if (isSetWhyUp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.whyUp, other.whyUp); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("InvalidParseRequest("); boolean first = true; sb.append("whatUp:"); sb.append(this.whatUp); first = false; if (!first) sb.append(", "); sb.append("whyUp:"); if (this.whyUp == null) { sb.append("null"); } else { sb.append(this.whyUp); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class InvalidParseRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public InvalidParseRequestStandardScheme getScheme() { return new InvalidParseRequestStandardScheme(); } } private static class InvalidParseRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<InvalidParseRequest> { public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidParseRequest struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // WHAT_UP if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.whatUp = iprot.readI32(); struct.setWhatUpIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // WHY_UP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.whyUp = iprot.readString(); struct.setWhyUpIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidParseRequest struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(WHAT_UP_FIELD_DESC); oprot.writeI32(struct.whatUp); oprot.writeFieldEnd(); if (struct.whyUp != null) { oprot.writeFieldBegin(WHY_UP_FIELD_DESC); oprot.writeString(struct.whyUp); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class InvalidParseRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public InvalidParseRequestTupleScheme getScheme() { return new InvalidParseRequestTupleScheme(); } } private static class InvalidParseRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<InvalidParseRequest> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, InvalidParseRequest struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetWhatUp()) { optionals.set(0); } if (struct.isSetWhyUp()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetWhatUp()) { oprot.writeI32(struct.whatUp); } if (struct.isSetWhyUp()) { oprot.writeString(struct.whyUp); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, InvalidParseRequest struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.whatUp = iprot.readI32(); struct.setWhatUpIsSet(true); } if (incoming.get(1)) { struct.whyUp = iprot.readString(); struct.setWhyUpIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TAccessedQueryObjects.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TAccessedQueryObjects implements org.apache.thrift.TBase<TAccessedQueryObjects, TAccessedQueryObjects._Fields>, java.io.Serializable, Cloneable, Comparable<TAccessedQueryObjects> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAccessedQueryObjects"); private static final org.apache.thrift.protocol.TField TABLES_SELECTED_FROM_FIELD_DESC = new org.apache.thrift.protocol.TField("tables_selected_from", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField TABLES_INSERTED_INTO_FIELD_DESC = new org.apache.thrift.protocol.TField("tables_inserted_into", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField TABLES_UPDATED_IN_FIELD_DESC = new org.apache.thrift.protocol.TField("tables_updated_in", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField TABLES_DELETED_FROM_FIELD_DESC = new org.apache.thrift.protocol.TField("tables_deleted_from", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TAccessedQueryObjectsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TAccessedQueryObjectsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.String>> tables_selected_from; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.String>> tables_inserted_into; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.String>> tables_updated_in; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.String>> tables_deleted_from; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TABLES_SELECTED_FROM((short)1, "tables_selected_from"), TABLES_INSERTED_INTO((short)2, "tables_inserted_into"), TABLES_UPDATED_IN((short)3, "tables_updated_in"), TABLES_DELETED_FROM((short)4, "tables_deleted_from"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TABLES_SELECTED_FROM return TABLES_SELECTED_FROM; case 2: // TABLES_INSERTED_INTO return TABLES_INSERTED_INTO; case 3: // TABLES_UPDATED_IN return TABLES_UPDATED_IN; case 4: // TABLES_DELETED_FROM return TABLES_DELETED_FROM; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TABLES_SELECTED_FROM, new org.apache.thrift.meta_data.FieldMetaData("tables_selected_from", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); tmpMap.put(_Fields.TABLES_INSERTED_INTO, new org.apache.thrift.meta_data.FieldMetaData("tables_inserted_into", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); tmpMap.put(_Fields.TABLES_UPDATED_IN, new org.apache.thrift.meta_data.FieldMetaData("tables_updated_in", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); tmpMap.put(_Fields.TABLES_DELETED_FROM, new org.apache.thrift.meta_data.FieldMetaData("tables_deleted_from", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAccessedQueryObjects.class, metaDataMap); } public TAccessedQueryObjects() { } public TAccessedQueryObjects( java.util.List<java.util.List<java.lang.String>> tables_selected_from, java.util.List<java.util.List<java.lang.String>> tables_inserted_into, java.util.List<java.util.List<java.lang.String>> tables_updated_in, java.util.List<java.util.List<java.lang.String>> tables_deleted_from) { this(); this.tables_selected_from = tables_selected_from; this.tables_inserted_into = tables_inserted_into; this.tables_updated_in = tables_updated_in; this.tables_deleted_from = tables_deleted_from; } /** * Performs a deep copy on <i>other</i>. */ public TAccessedQueryObjects(TAccessedQueryObjects other) { if (other.isSetTables_selected_from()) { java.util.List<java.util.List<java.lang.String>> __this__tables_selected_from = new java.util.ArrayList<java.util.List<java.lang.String>>(other.tables_selected_from.size()); for (java.util.List<java.lang.String> other_element : other.tables_selected_from) { java.util.List<java.lang.String> __this__tables_selected_from_copy = new java.util.ArrayList<java.lang.String>(other_element); __this__tables_selected_from.add(__this__tables_selected_from_copy); } this.tables_selected_from = __this__tables_selected_from; } if (other.isSetTables_inserted_into()) { java.util.List<java.util.List<java.lang.String>> __this__tables_inserted_into = new java.util.ArrayList<java.util.List<java.lang.String>>(other.tables_inserted_into.size()); for (java.util.List<java.lang.String> other_element : other.tables_inserted_into) { java.util.List<java.lang.String> __this__tables_inserted_into_copy = new java.util.ArrayList<java.lang.String>(other_element); __this__tables_inserted_into.add(__this__tables_inserted_into_copy); } this.tables_inserted_into = __this__tables_inserted_into; } if (other.isSetTables_updated_in()) { java.util.List<java.util.List<java.lang.String>> __this__tables_updated_in = new java.util.ArrayList<java.util.List<java.lang.String>>(other.tables_updated_in.size()); for (java.util.List<java.lang.String> other_element : other.tables_updated_in) { java.util.List<java.lang.String> __this__tables_updated_in_copy = new java.util.ArrayList<java.lang.String>(other_element); __this__tables_updated_in.add(__this__tables_updated_in_copy); } this.tables_updated_in = __this__tables_updated_in; } if (other.isSetTables_deleted_from()) { java.util.List<java.util.List<java.lang.String>> __this__tables_deleted_from = new java.util.ArrayList<java.util.List<java.lang.String>>(other.tables_deleted_from.size()); for (java.util.List<java.lang.String> other_element : other.tables_deleted_from) { java.util.List<java.lang.String> __this__tables_deleted_from_copy = new java.util.ArrayList<java.lang.String>(other_element); __this__tables_deleted_from.add(__this__tables_deleted_from_copy); } this.tables_deleted_from = __this__tables_deleted_from; } } public TAccessedQueryObjects deepCopy() { return new TAccessedQueryObjects(this); } @Override public void clear() { this.tables_selected_from = null; this.tables_inserted_into = null; this.tables_updated_in = null; this.tables_deleted_from = null; } public int getTables_selected_fromSize() { return (this.tables_selected_from == null) ? 0 : this.tables_selected_from.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.util.List<java.lang.String>> getTables_selected_fromIterator() { return (this.tables_selected_from == null) ? null : this.tables_selected_from.iterator(); } public void addToTables_selected_from(java.util.List<java.lang.String> elem) { if (this.tables_selected_from == null) { this.tables_selected_from = new java.util.ArrayList<java.util.List<java.lang.String>>(); } this.tables_selected_from.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.util.List<java.lang.String>> getTables_selected_from() { return this.tables_selected_from; } public TAccessedQueryObjects setTables_selected_from(@org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.String>> tables_selected_from) { this.tables_selected_from = tables_selected_from; return this; } public void unsetTables_selected_from() { this.tables_selected_from = null; } /** Returns true if field tables_selected_from is set (has been assigned a value) and false otherwise */ public boolean isSetTables_selected_from() { return this.tables_selected_from != null; } public void setTables_selected_fromIsSet(boolean value) { if (!value) { this.tables_selected_from = null; } } public int getTables_inserted_intoSize() { return (this.tables_inserted_into == null) ? 0 : this.tables_inserted_into.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.util.List<java.lang.String>> getTables_inserted_intoIterator() { return (this.tables_inserted_into == null) ? null : this.tables_inserted_into.iterator(); } public void addToTables_inserted_into(java.util.List<java.lang.String> elem) { if (this.tables_inserted_into == null) { this.tables_inserted_into = new java.util.ArrayList<java.util.List<java.lang.String>>(); } this.tables_inserted_into.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.util.List<java.lang.String>> getTables_inserted_into() { return this.tables_inserted_into; } public TAccessedQueryObjects setTables_inserted_into(@org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.String>> tables_inserted_into) { this.tables_inserted_into = tables_inserted_into; return this; } public void unsetTables_inserted_into() { this.tables_inserted_into = null; } /** Returns true if field tables_inserted_into is set (has been assigned a value) and false otherwise */ public boolean isSetTables_inserted_into() { return this.tables_inserted_into != null; } public void setTables_inserted_intoIsSet(boolean value) { if (!value) { this.tables_inserted_into = null; } } public int getTables_updated_inSize() { return (this.tables_updated_in == null) ? 0 : this.tables_updated_in.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.util.List<java.lang.String>> getTables_updated_inIterator() { return (this.tables_updated_in == null) ? null : this.tables_updated_in.iterator(); } public void addToTables_updated_in(java.util.List<java.lang.String> elem) { if (this.tables_updated_in == null) { this.tables_updated_in = new java.util.ArrayList<java.util.List<java.lang.String>>(); } this.tables_updated_in.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.util.List<java.lang.String>> getTables_updated_in() { return this.tables_updated_in; } public TAccessedQueryObjects setTables_updated_in(@org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.String>> tables_updated_in) { this.tables_updated_in = tables_updated_in; return this; } public void unsetTables_updated_in() { this.tables_updated_in = null; } /** Returns true if field tables_updated_in is set (has been assigned a value) and false otherwise */ public boolean isSetTables_updated_in() { return this.tables_updated_in != null; } public void setTables_updated_inIsSet(boolean value) { if (!value) { this.tables_updated_in = null; } } public int getTables_deleted_fromSize() { return (this.tables_deleted_from == null) ? 0 : this.tables_deleted_from.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.util.List<java.lang.String>> getTables_deleted_fromIterator() { return (this.tables_deleted_from == null) ? null : this.tables_deleted_from.iterator(); } public void addToTables_deleted_from(java.util.List<java.lang.String> elem) { if (this.tables_deleted_from == null) { this.tables_deleted_from = new java.util.ArrayList<java.util.List<java.lang.String>>(); } this.tables_deleted_from.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.util.List<java.lang.String>> getTables_deleted_from() { return this.tables_deleted_from; } public TAccessedQueryObjects setTables_deleted_from(@org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.String>> tables_deleted_from) { this.tables_deleted_from = tables_deleted_from; return this; } public void unsetTables_deleted_from() { this.tables_deleted_from = null; } /** Returns true if field tables_deleted_from is set (has been assigned a value) and false otherwise */ public boolean isSetTables_deleted_from() { return this.tables_deleted_from != null; } public void setTables_deleted_fromIsSet(boolean value) { if (!value) { this.tables_deleted_from = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TABLES_SELECTED_FROM: if (value == null) { unsetTables_selected_from(); } else { setTables_selected_from((java.util.List<java.util.List<java.lang.String>>)value); } break; case TABLES_INSERTED_INTO: if (value == null) { unsetTables_inserted_into(); } else { setTables_inserted_into((java.util.List<java.util.List<java.lang.String>>)value); } break; case TABLES_UPDATED_IN: if (value == null) { unsetTables_updated_in(); } else { setTables_updated_in((java.util.List<java.util.List<java.lang.String>>)value); } break; case TABLES_DELETED_FROM: if (value == null) { unsetTables_deleted_from(); } else { setTables_deleted_from((java.util.List<java.util.List<java.lang.String>>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TABLES_SELECTED_FROM: return getTables_selected_from(); case TABLES_INSERTED_INTO: return getTables_inserted_into(); case TABLES_UPDATED_IN: return getTables_updated_in(); case TABLES_DELETED_FROM: return getTables_deleted_from(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case TABLES_SELECTED_FROM: return isSetTables_selected_from(); case TABLES_INSERTED_INTO: return isSetTables_inserted_into(); case TABLES_UPDATED_IN: return isSetTables_updated_in(); case TABLES_DELETED_FROM: return isSetTables_deleted_from(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TAccessedQueryObjects) return this.equals((TAccessedQueryObjects)that); return false; } public boolean equals(TAccessedQueryObjects that) { if (that == null) return false; if (this == that) return true; boolean this_present_tables_selected_from = true && this.isSetTables_selected_from(); boolean that_present_tables_selected_from = true && that.isSetTables_selected_from(); if (this_present_tables_selected_from || that_present_tables_selected_from) { if (!(this_present_tables_selected_from && that_present_tables_selected_from)) return false; if (!this.tables_selected_from.equals(that.tables_selected_from)) return false; } boolean this_present_tables_inserted_into = true && this.isSetTables_inserted_into(); boolean that_present_tables_inserted_into = true && that.isSetTables_inserted_into(); if (this_present_tables_inserted_into || that_present_tables_inserted_into) { if (!(this_present_tables_inserted_into && that_present_tables_inserted_into)) return false; if (!this.tables_inserted_into.equals(that.tables_inserted_into)) return false; } boolean this_present_tables_updated_in = true && this.isSetTables_updated_in(); boolean that_present_tables_updated_in = true && that.isSetTables_updated_in(); if (this_present_tables_updated_in || that_present_tables_updated_in) { if (!(this_present_tables_updated_in && that_present_tables_updated_in)) return false; if (!this.tables_updated_in.equals(that.tables_updated_in)) return false; } boolean this_present_tables_deleted_from = true && this.isSetTables_deleted_from(); boolean that_present_tables_deleted_from = true && that.isSetTables_deleted_from(); if (this_present_tables_deleted_from || that_present_tables_deleted_from) { if (!(this_present_tables_deleted_from && that_present_tables_deleted_from)) return false; if (!this.tables_deleted_from.equals(that.tables_deleted_from)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetTables_selected_from()) ? 131071 : 524287); if (isSetTables_selected_from()) hashCode = hashCode * 8191 + tables_selected_from.hashCode(); hashCode = hashCode * 8191 + ((isSetTables_inserted_into()) ? 131071 : 524287); if (isSetTables_inserted_into()) hashCode = hashCode * 8191 + tables_inserted_into.hashCode(); hashCode = hashCode * 8191 + ((isSetTables_updated_in()) ? 131071 : 524287); if (isSetTables_updated_in()) hashCode = hashCode * 8191 + tables_updated_in.hashCode(); hashCode = hashCode * 8191 + ((isSetTables_deleted_from()) ? 131071 : 524287); if (isSetTables_deleted_from()) hashCode = hashCode * 8191 + tables_deleted_from.hashCode(); return hashCode; } @Override public int compareTo(TAccessedQueryObjects other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetTables_selected_from(), other.isSetTables_selected_from()); if (lastComparison != 0) { return lastComparison; } if (isSetTables_selected_from()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tables_selected_from, other.tables_selected_from); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTables_inserted_into(), other.isSetTables_inserted_into()); if (lastComparison != 0) { return lastComparison; } if (isSetTables_inserted_into()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tables_inserted_into, other.tables_inserted_into); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTables_updated_in(), other.isSetTables_updated_in()); if (lastComparison != 0) { return lastComparison; } if (isSetTables_updated_in()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tables_updated_in, other.tables_updated_in); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTables_deleted_from(), other.isSetTables_deleted_from()); if (lastComparison != 0) { return lastComparison; } if (isSetTables_deleted_from()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tables_deleted_from, other.tables_deleted_from); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TAccessedQueryObjects("); boolean first = true; sb.append("tables_selected_from:"); if (this.tables_selected_from == null) { sb.append("null"); } else { sb.append(this.tables_selected_from); } first = false; if (!first) sb.append(", "); sb.append("tables_inserted_into:"); if (this.tables_inserted_into == null) { sb.append("null"); } else { sb.append(this.tables_inserted_into); } first = false; if (!first) sb.append(", "); sb.append("tables_updated_in:"); if (this.tables_updated_in == null) { sb.append("null"); } else { sb.append(this.tables_updated_in); } first = false; if (!first) sb.append(", "); sb.append("tables_deleted_from:"); if (this.tables_deleted_from == null) { sb.append("null"); } else { sb.append(this.tables_deleted_from); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TAccessedQueryObjectsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TAccessedQueryObjectsStandardScheme getScheme() { return new TAccessedQueryObjectsStandardScheme(); } } private static class TAccessedQueryObjectsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TAccessedQueryObjects> { public void read(org.apache.thrift.protocol.TProtocol iprot, TAccessedQueryObjects struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TABLES_SELECTED_FROM if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.tables_selected_from = new java.util.ArrayList<java.util.List<java.lang.String>>(_list0.size); @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _elem1; for (int _i2 = 0; _i2 < _list0.size; ++_i2) { { org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); _elem1 = new java.util.ArrayList<java.lang.String>(_list3.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem4; for (int _i5 = 0; _i5 < _list3.size; ++_i5) { _elem4 = iprot.readString(); _elem1.add(_elem4); } iprot.readListEnd(); } struct.tables_selected_from.add(_elem1); } iprot.readListEnd(); } struct.setTables_selected_fromIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLES_INSERTED_INTO if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list6 = iprot.readListBegin(); struct.tables_inserted_into = new java.util.ArrayList<java.util.List<java.lang.String>>(_list6.size); @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _elem7; for (int _i8 = 0; _i8 < _list6.size; ++_i8) { { org.apache.thrift.protocol.TList _list9 = iprot.readListBegin(); _elem7 = new java.util.ArrayList<java.lang.String>(_list9.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem10; for (int _i11 = 0; _i11 < _list9.size; ++_i11) { _elem10 = iprot.readString(); _elem7.add(_elem10); } iprot.readListEnd(); } struct.tables_inserted_into.add(_elem7); } iprot.readListEnd(); } struct.setTables_inserted_intoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TABLES_UPDATED_IN if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list12 = iprot.readListBegin(); struct.tables_updated_in = new java.util.ArrayList<java.util.List<java.lang.String>>(_list12.size); @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _elem13; for (int _i14 = 0; _i14 < _list12.size; ++_i14) { { org.apache.thrift.protocol.TList _list15 = iprot.readListBegin(); _elem13 = new java.util.ArrayList<java.lang.String>(_list15.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem16; for (int _i17 = 0; _i17 < _list15.size; ++_i17) { _elem16 = iprot.readString(); _elem13.add(_elem16); } iprot.readListEnd(); } struct.tables_updated_in.add(_elem13); } iprot.readListEnd(); } struct.setTables_updated_inIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // TABLES_DELETED_FROM if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list18 = iprot.readListBegin(); struct.tables_deleted_from = new java.util.ArrayList<java.util.List<java.lang.String>>(_list18.size); @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _elem19; for (int _i20 = 0; _i20 < _list18.size; ++_i20) { { org.apache.thrift.protocol.TList _list21 = iprot.readListBegin(); _elem19 = new java.util.ArrayList<java.lang.String>(_list21.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem22; for (int _i23 = 0; _i23 < _list21.size; ++_i23) { _elem22 = iprot.readString(); _elem19.add(_elem22); } iprot.readListEnd(); } struct.tables_deleted_from.add(_elem19); } iprot.readListEnd(); } struct.setTables_deleted_fromIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TAccessedQueryObjects struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.tables_selected_from != null) { oprot.writeFieldBegin(TABLES_SELECTED_FROM_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.tables_selected_from.size())); for (java.util.List<java.lang.String> _iter24 : struct.tables_selected_from) { { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter24.size())); for (java.lang.String _iter25 : _iter24) { oprot.writeString(_iter25); } oprot.writeListEnd(); } } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.tables_inserted_into != null) { oprot.writeFieldBegin(TABLES_INSERTED_INTO_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.tables_inserted_into.size())); for (java.util.List<java.lang.String> _iter26 : struct.tables_inserted_into) { { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter26.size())); for (java.lang.String _iter27 : _iter26) { oprot.writeString(_iter27); } oprot.writeListEnd(); } } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.tables_updated_in != null) { oprot.writeFieldBegin(TABLES_UPDATED_IN_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.tables_updated_in.size())); for (java.util.List<java.lang.String> _iter28 : struct.tables_updated_in) { { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter28.size())); for (java.lang.String _iter29 : _iter28) { oprot.writeString(_iter29); } oprot.writeListEnd(); } } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.tables_deleted_from != null) { oprot.writeFieldBegin(TABLES_DELETED_FROM_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.tables_deleted_from.size())); for (java.util.List<java.lang.String> _iter30 : struct.tables_deleted_from) { { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter30.size())); for (java.lang.String _iter31 : _iter30) { oprot.writeString(_iter31); } oprot.writeListEnd(); } } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TAccessedQueryObjectsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TAccessedQueryObjectsTupleScheme getScheme() { return new TAccessedQueryObjectsTupleScheme(); } } private static class TAccessedQueryObjectsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TAccessedQueryObjects> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TAccessedQueryObjects struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTables_selected_from()) { optionals.set(0); } if (struct.isSetTables_inserted_into()) { optionals.set(1); } if (struct.isSetTables_updated_in()) { optionals.set(2); } if (struct.isSetTables_deleted_from()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetTables_selected_from()) { { oprot.writeI32(struct.tables_selected_from.size()); for (java.util.List<java.lang.String> _iter32 : struct.tables_selected_from) { { oprot.writeI32(_iter32.size()); for (java.lang.String _iter33 : _iter32) { oprot.writeString(_iter33); } } } } } if (struct.isSetTables_inserted_into()) { { oprot.writeI32(struct.tables_inserted_into.size()); for (java.util.List<java.lang.String> _iter34 : struct.tables_inserted_into) { { oprot.writeI32(_iter34.size()); for (java.lang.String _iter35 : _iter34) { oprot.writeString(_iter35); } } } } } if (struct.isSetTables_updated_in()) { { oprot.writeI32(struct.tables_updated_in.size()); for (java.util.List<java.lang.String> _iter36 : struct.tables_updated_in) { { oprot.writeI32(_iter36.size()); for (java.lang.String _iter37 : _iter36) { oprot.writeString(_iter37); } } } } } if (struct.isSetTables_deleted_from()) { { oprot.writeI32(struct.tables_deleted_from.size()); for (java.util.List<java.lang.String> _iter38 : struct.tables_deleted_from) { { oprot.writeI32(_iter38.size()); for (java.lang.String _iter39 : _iter38) { oprot.writeString(_iter39); } } } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TAccessedQueryObjects struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list40 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); struct.tables_selected_from = new java.util.ArrayList<java.util.List<java.lang.String>>(_list40.size); @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _elem41; for (int _i42 = 0; _i42 < _list40.size; ++_i42) { { org.apache.thrift.protocol.TList _list43 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); _elem41 = new java.util.ArrayList<java.lang.String>(_list43.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem44; for (int _i45 = 0; _i45 < _list43.size; ++_i45) { _elem44 = iprot.readString(); _elem41.add(_elem44); } } struct.tables_selected_from.add(_elem41); } } struct.setTables_selected_fromIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list46 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); struct.tables_inserted_into = new java.util.ArrayList<java.util.List<java.lang.String>>(_list46.size); @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _elem47; for (int _i48 = 0; _i48 < _list46.size; ++_i48) { { org.apache.thrift.protocol.TList _list49 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); _elem47 = new java.util.ArrayList<java.lang.String>(_list49.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem50; for (int _i51 = 0; _i51 < _list49.size; ++_i51) { _elem50 = iprot.readString(); _elem47.add(_elem50); } } struct.tables_inserted_into.add(_elem47); } } struct.setTables_inserted_intoIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list52 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); struct.tables_updated_in = new java.util.ArrayList<java.util.List<java.lang.String>>(_list52.size); @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _elem53; for (int _i54 = 0; _i54 < _list52.size; ++_i54) { { org.apache.thrift.protocol.TList _list55 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); _elem53 = new java.util.ArrayList<java.lang.String>(_list55.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem56; for (int _i57 = 0; _i57 < _list55.size; ++_i57) { _elem56 = iprot.readString(); _elem53.add(_elem56); } } struct.tables_updated_in.add(_elem53); } } struct.setTables_updated_inIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list58 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); struct.tables_deleted_from = new java.util.ArrayList<java.util.List<java.lang.String>>(_list58.size); @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _elem59; for (int _i60 = 0; _i60 < _list58.size; ++_i60) { { org.apache.thrift.protocol.TList _list61 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); _elem59 = new java.util.ArrayList<java.lang.String>(_list61.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem62; for (int _i63 = 0; _i63 < _list61.size; ++_i63) { _elem62 = iprot.readString(); _elem59.add(_elem62); } } struct.tables_deleted_from.add(_elem59); } } struct.setTables_deleted_fromIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TCompletionHint.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TCompletionHint implements org.apache.thrift.TBase<TCompletionHint, TCompletionHint._Fields>, java.io.Serializable, Cloneable, Comparable<TCompletionHint> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCompletionHint"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField HINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("hints", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField REPLACED_FIELD_DESC = new org.apache.thrift.protocol.TField("replaced", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCompletionHintStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCompletionHintTupleSchemeFactory(); /** * * @see TCompletionHintType */ public @org.apache.thrift.annotation.Nullable TCompletionHintType type; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> hints; // required public @org.apache.thrift.annotation.Nullable java.lang.String replaced; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * * @see TCompletionHintType */ TYPE((short)1, "type"), HINTS((short)2, "hints"), REPLACED((short)3, "replaced"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TYPE return TYPE; case 2: // HINTS return HINTS; case 3: // REPLACED return REPLACED; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCompletionHintType.class))); tmpMap.put(_Fields.HINTS, new org.apache.thrift.meta_data.FieldMetaData("hints", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.REPLACED, new org.apache.thrift.meta_data.FieldMetaData("replaced", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCompletionHint.class, metaDataMap); } public TCompletionHint() { } public TCompletionHint( TCompletionHintType type, java.util.List<java.lang.String> hints, java.lang.String replaced) { this(); this.type = type; this.hints = hints; this.replaced = replaced; } /** * Performs a deep copy on <i>other</i>. */ public TCompletionHint(TCompletionHint other) { if (other.isSetType()) { this.type = other.type; } if (other.isSetHints()) { java.util.List<java.lang.String> __this__hints = new java.util.ArrayList<java.lang.String>(other.hints); this.hints = __this__hints; } if (other.isSetReplaced()) { this.replaced = other.replaced; } } public TCompletionHint deepCopy() { return new TCompletionHint(this); } @Override public void clear() { this.type = null; this.hints = null; this.replaced = null; } /** * * @see TCompletionHintType */ @org.apache.thrift.annotation.Nullable public TCompletionHintType getType() { return this.type; } /** * * @see TCompletionHintType */ public TCompletionHint setType(@org.apache.thrift.annotation.Nullable TCompletionHintType type) { this.type = type; return this; } public void unsetType() { this.type = null; } /** Returns true if field type is set (has been assigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } public void setTypeIsSet(boolean value) { if (!value) { this.type = null; } } public int getHintsSize() { return (this.hints == null) ? 0 : this.hints.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getHintsIterator() { return (this.hints == null) ? null : this.hints.iterator(); } public void addToHints(java.lang.String elem) { if (this.hints == null) { this.hints = new java.util.ArrayList<java.lang.String>(); } this.hints.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getHints() { return this.hints; } public TCompletionHint setHints(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> hints) { this.hints = hints; return this; } public void unsetHints() { this.hints = null; } /** Returns true if field hints is set (has been assigned a value) and false otherwise */ public boolean isSetHints() { return this.hints != null; } public void setHintsIsSet(boolean value) { if (!value) { this.hints = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getReplaced() { return this.replaced; } public TCompletionHint setReplaced(@org.apache.thrift.annotation.Nullable java.lang.String replaced) { this.replaced = replaced; return this; } public void unsetReplaced() { this.replaced = null; } /** Returns true if field replaced is set (has been assigned a value) and false otherwise */ public boolean isSetReplaced() { return this.replaced != null; } public void setReplacedIsSet(boolean value) { if (!value) { this.replaced = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TYPE: if (value == null) { unsetType(); } else { setType((TCompletionHintType)value); } break; case HINTS: if (value == null) { unsetHints(); } else { setHints((java.util.List<java.lang.String>)value); } break; case REPLACED: if (value == null) { unsetReplaced(); } else { setReplaced((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TYPE: return getType(); case HINTS: return getHints(); case REPLACED: return getReplaced(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case TYPE: return isSetType(); case HINTS: return isSetHints(); case REPLACED: return isSetReplaced(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TCompletionHint) return this.equals((TCompletionHint)that); return false; } public boolean equals(TCompletionHint that) { if (that == null) return false; if (this == that) return true; boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) return false; } boolean this_present_hints = true && this.isSetHints(); boolean that_present_hints = true && that.isSetHints(); if (this_present_hints || that_present_hints) { if (!(this_present_hints && that_present_hints)) return false; if (!this.hints.equals(that.hints)) return false; } boolean this_present_replaced = true && this.isSetReplaced(); boolean that_present_replaced = true && that.isSetReplaced(); if (this_present_replaced || that_present_replaced) { if (!(this_present_replaced && that_present_replaced)) return false; if (!this.replaced.equals(that.replaced)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); if (isSetType()) hashCode = hashCode * 8191 + type.getValue(); hashCode = hashCode * 8191 + ((isSetHints()) ? 131071 : 524287); if (isSetHints()) hashCode = hashCode * 8191 + hints.hashCode(); hashCode = hashCode * 8191 + ((isSetReplaced()) ? 131071 : 524287); if (isSetReplaced()) hashCode = hashCode * 8191 + replaced.hashCode(); return hashCode; } @Override public int compareTo(TCompletionHint other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetHints(), other.isSetHints()); if (lastComparison != 0) { return lastComparison; } if (isSetHints()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hints, other.hints); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetReplaced(), other.isSetReplaced()); if (lastComparison != 0) { return lastComparison; } if (isSetReplaced()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replaced, other.replaced); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TCompletionHint("); boolean first = true; sb.append("type:"); if (this.type == null) { sb.append("null"); } else { sb.append(this.type); } first = false; if (!first) sb.append(", "); sb.append("hints:"); if (this.hints == null) { sb.append("null"); } else { sb.append(this.hints); } first = false; if (!first) sb.append(", "); sb.append("replaced:"); if (this.replaced == null) { sb.append("null"); } else { sb.append(this.replaced); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TCompletionHintStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCompletionHintStandardScheme getScheme() { return new TCompletionHintStandardScheme(); } } private static class TCompletionHintStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCompletionHint> { public void read(org.apache.thrift.protocol.TProtocol iprot, TCompletionHint struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.type = ai.heavy.thrift.calciteserver.TCompletionHintType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // HINTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.hints = new java.util.ArrayList<java.lang.String>(_list0.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem1; for (int _i2 = 0; _i2 < _list0.size; ++_i2) { _elem1 = iprot.readString(); struct.hints.add(_elem1); } iprot.readListEnd(); } struct.setHintsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // REPLACED if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.replaced = iprot.readString(); struct.setReplacedIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TCompletionHint struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } if (struct.hints != null) { oprot.writeFieldBegin(HINTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.hints.size())); for (java.lang.String _iter3 : struct.hints) { oprot.writeString(_iter3); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.replaced != null) { oprot.writeFieldBegin(REPLACED_FIELD_DESC); oprot.writeString(struct.replaced); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TCompletionHintTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCompletionHintTupleScheme getScheme() { return new TCompletionHintTupleScheme(); } } private static class TCompletionHintTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCompletionHint> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TCompletionHint struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetType()) { optionals.set(0); } if (struct.isSetHints()) { optionals.set(1); } if (struct.isSetReplaced()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetType()) { oprot.writeI32(struct.type.getValue()); } if (struct.isSetHints()) { { oprot.writeI32(struct.hints.size()); for (java.lang.String _iter4 : struct.hints) { oprot.writeString(_iter4); } } } if (struct.isSetReplaced()) { oprot.writeString(struct.replaced); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TCompletionHint struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.type = ai.heavy.thrift.calciteserver.TCompletionHintType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list5 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.hints = new java.util.ArrayList<java.lang.String>(_list5.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = iprot.readString(); struct.hints.add(_elem6); } } struct.setHintsIsSet(true); } if (incoming.get(2)) { struct.replaced = iprot.readString(); struct.setReplacedIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TCompletionHintType.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; public enum TCompletionHintType implements org.apache.thrift.TEnum { COLUMN(0), TABLE(1), VIEW(2), SCHEMA(3), CATALOG(4), REPOSITORY(5), FUNCTION(6), KEYWORD(7); private final int value; private TCompletionHintType(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. */ @org.apache.thrift.annotation.Nullable public static TCompletionHintType findByValue(int value) { switch (value) { case 0: return COLUMN; case 1: return TABLE; case 2: return VIEW; case 3: return SCHEMA; case 4: return CATALOG; case 5: return REPOSITORY; case 6: return FUNCTION; case 7: return KEYWORD; default: return null; } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TExtArgumentType.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; public enum TExtArgumentType implements org.apache.thrift.TEnum { Int8(0), Int16(1), Int32(2), Int64(3), Float(4), Double(5), Void(6), PInt8(7), PInt16(8), PInt32(9), PInt64(10), PFloat(11), PDouble(12), PBool(13), Bool(14), ArrayInt8(15), ArrayInt16(16), ArrayInt32(17), ArrayInt64(18), ArrayFloat(19), ArrayDouble(20), ArrayBool(21), GeoPoint(22), GeoLineString(23), Cursor(24), GeoPolygon(25), GeoMultiPolygon(26), ColumnInt8(27), ColumnInt16(28), ColumnInt32(29), ColumnInt64(30), ColumnFloat(31), ColumnDouble(32), ColumnBool(33), TextEncodingNone(34), TextEncodingDict(35), ColumnListInt8(36), ColumnListInt16(37), ColumnListInt32(38), ColumnListInt64(39), ColumnListFloat(40), ColumnListDouble(41), ColumnListBool(42), ColumnTextEncodingDict(43), ColumnListTextEncodingDict(44), ColumnTimestamp(45), Timestamp(46), ColumnArrayInt8(47), ColumnArrayInt16(48), ColumnArrayInt32(49), ColumnArrayInt64(50), ColumnArrayFloat(51), ColumnArrayDouble(52), ColumnArrayBool(53), ColumnListArrayInt8(54), ColumnListArrayInt16(55), ColumnListArrayInt32(56), ColumnListArrayInt64(57), ColumnListArrayFloat(58), ColumnListArrayDouble(59), ColumnListArrayBool(60), GeoMultiLineString(61); private final int value; private TExtArgumentType(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. */ @org.apache.thrift.annotation.Nullable public static TExtArgumentType findByValue(int value) { switch (value) { case 0: return Int8; case 1: return Int16; case 2: return Int32; case 3: return Int64; case 4: return Float; case 5: return Double; case 6: return Void; case 7: return PInt8; case 8: return PInt16; case 9: return PInt32; case 10: return PInt64; case 11: return PFloat; case 12: return PDouble; case 13: return PBool; case 14: return Bool; case 15: return ArrayInt8; case 16: return ArrayInt16; case 17: return ArrayInt32; case 18: return ArrayInt64; case 19: return ArrayFloat; case 20: return ArrayDouble; case 21: return ArrayBool; case 22: return GeoPoint; case 23: return GeoLineString; case 24: return Cursor; case 25: return GeoPolygon; case 26: return GeoMultiPolygon; case 27: return ColumnInt8; case 28: return ColumnInt16; case 29: return ColumnInt32; case 30: return ColumnInt64; case 31: return ColumnFloat; case 32: return ColumnDouble; case 33: return ColumnBool; case 34: return TextEncodingNone; case 35: return TextEncodingDict; case 36: return ColumnListInt8; case 37: return ColumnListInt16; case 38: return ColumnListInt32; case 39: return ColumnListInt64; case 40: return ColumnListFloat; case 41: return ColumnListDouble; case 42: return ColumnListBool; case 43: return ColumnTextEncodingDict; case 44: return ColumnListTextEncodingDict; case 45: return ColumnTimestamp; case 46: return Timestamp; case 47: return ColumnArrayInt8; case 48: return ColumnArrayInt16; case 49: return ColumnArrayInt32; case 50: return ColumnArrayInt64; case 51: return ColumnArrayFloat; case 52: return ColumnArrayDouble; case 53: return ColumnArrayBool; case 54: return ColumnListArrayInt8; case 55: return ColumnListArrayInt16; case 56: return ColumnListArrayInt32; case 57: return ColumnListArrayInt64; case 58: return ColumnListArrayFloat; case 59: return ColumnListArrayDouble; case 60: return ColumnListArrayBool; case 61: return GeoMultiLineString; default: return null; } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TFilterPushDownInfo.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TFilterPushDownInfo implements org.apache.thrift.TBase<TFilterPushDownInfo, TFilterPushDownInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TFilterPushDownInfo> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFilterPushDownInfo"); private static final org.apache.thrift.protocol.TField INPUT_PREV_FIELD_DESC = new org.apache.thrift.protocol.TField("input_prev", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField INPUT_START_FIELD_DESC = new org.apache.thrift.protocol.TField("input_start", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField INPUT_NEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("input_next", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TFilterPushDownInfoStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TFilterPushDownInfoTupleSchemeFactory(); public int input_prev; // required public int input_start; // required public int input_next; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { INPUT_PREV((short)1, "input_prev"), INPUT_START((short)2, "input_start"), INPUT_NEXT((short)3, "input_next"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // INPUT_PREV return INPUT_PREV; case 2: // INPUT_START return INPUT_START; case 3: // INPUT_NEXT return INPUT_NEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __INPUT_PREV_ISSET_ID = 0; private static final int __INPUT_START_ISSET_ID = 1; private static final int __INPUT_NEXT_ISSET_ID = 2; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.INPUT_PREV, new org.apache.thrift.meta_data.FieldMetaData("input_prev", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.INPUT_START, new org.apache.thrift.meta_data.FieldMetaData("input_start", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.INPUT_NEXT, new org.apache.thrift.meta_data.FieldMetaData("input_next", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TFilterPushDownInfo.class, metaDataMap); } public TFilterPushDownInfo() { } public TFilterPushDownInfo( int input_prev, int input_start, int input_next) { this(); this.input_prev = input_prev; setInput_prevIsSet(true); this.input_start = input_start; setInput_startIsSet(true); this.input_next = input_next; setInput_nextIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public TFilterPushDownInfo(TFilterPushDownInfo other) { __isset_bitfield = other.__isset_bitfield; this.input_prev = other.input_prev; this.input_start = other.input_start; this.input_next = other.input_next; } public TFilterPushDownInfo deepCopy() { return new TFilterPushDownInfo(this); } @Override public void clear() { setInput_prevIsSet(false); this.input_prev = 0; setInput_startIsSet(false); this.input_start = 0; setInput_nextIsSet(false); this.input_next = 0; } public int getInput_prev() { return this.input_prev; } public TFilterPushDownInfo setInput_prev(int input_prev) { this.input_prev = input_prev; setInput_prevIsSet(true); return this; } public void unsetInput_prev() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INPUT_PREV_ISSET_ID); } /** Returns true if field input_prev is set (has been assigned a value) and false otherwise */ public boolean isSetInput_prev() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INPUT_PREV_ISSET_ID); } public void setInput_prevIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INPUT_PREV_ISSET_ID, value); } public int getInput_start() { return this.input_start; } public TFilterPushDownInfo setInput_start(int input_start) { this.input_start = input_start; setInput_startIsSet(true); return this; } public void unsetInput_start() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INPUT_START_ISSET_ID); } /** Returns true if field input_start is set (has been assigned a value) and false otherwise */ public boolean isSetInput_start() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INPUT_START_ISSET_ID); } public void setInput_startIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INPUT_START_ISSET_ID, value); } public int getInput_next() { return this.input_next; } public TFilterPushDownInfo setInput_next(int input_next) { this.input_next = input_next; setInput_nextIsSet(true); return this; } public void unsetInput_next() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INPUT_NEXT_ISSET_ID); } /** Returns true if field input_next is set (has been assigned a value) and false otherwise */ public boolean isSetInput_next() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INPUT_NEXT_ISSET_ID); } public void setInput_nextIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INPUT_NEXT_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case INPUT_PREV: if (value == null) { unsetInput_prev(); } else { setInput_prev((java.lang.Integer)value); } break; case INPUT_START: if (value == null) { unsetInput_start(); } else { setInput_start((java.lang.Integer)value); } break; case INPUT_NEXT: if (value == null) { unsetInput_next(); } else { setInput_next((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case INPUT_PREV: return getInput_prev(); case INPUT_START: return getInput_start(); case INPUT_NEXT: return getInput_next(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case INPUT_PREV: return isSetInput_prev(); case INPUT_START: return isSetInput_start(); case INPUT_NEXT: return isSetInput_next(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TFilterPushDownInfo) return this.equals((TFilterPushDownInfo)that); return false; } public boolean equals(TFilterPushDownInfo that) { if (that == null) return false; if (this == that) return true; boolean this_present_input_prev = true; boolean that_present_input_prev = true; if (this_present_input_prev || that_present_input_prev) { if (!(this_present_input_prev && that_present_input_prev)) return false; if (this.input_prev != that.input_prev) return false; } boolean this_present_input_start = true; boolean that_present_input_start = true; if (this_present_input_start || that_present_input_start) { if (!(this_present_input_start && that_present_input_start)) return false; if (this.input_start != that.input_start) return false; } boolean this_present_input_next = true; boolean that_present_input_next = true; if (this_present_input_next || that_present_input_next) { if (!(this_present_input_next && that_present_input_next)) return false; if (this.input_next != that.input_next) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + input_prev; hashCode = hashCode * 8191 + input_start; hashCode = hashCode * 8191 + input_next; return hashCode; } @Override public int compareTo(TFilterPushDownInfo other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetInput_prev(), other.isSetInput_prev()); if (lastComparison != 0) { return lastComparison; } if (isSetInput_prev()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.input_prev, other.input_prev); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetInput_start(), other.isSetInput_start()); if (lastComparison != 0) { return lastComparison; } if (isSetInput_start()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.input_start, other.input_start); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetInput_next(), other.isSetInput_next()); if (lastComparison != 0) { return lastComparison; } if (isSetInput_next()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.input_next, other.input_next); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TFilterPushDownInfo("); boolean first = true; sb.append("input_prev:"); sb.append(this.input_prev); first = false; if (!first) sb.append(", "); sb.append("input_start:"); sb.append(this.input_start); first = false; if (!first) sb.append(", "); sb.append("input_next:"); sb.append(this.input_next); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TFilterPushDownInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TFilterPushDownInfoStandardScheme getScheme() { return new TFilterPushDownInfoStandardScheme(); } } private static class TFilterPushDownInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TFilterPushDownInfo> { public void read(org.apache.thrift.protocol.TProtocol iprot, TFilterPushDownInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // INPUT_PREV if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.input_prev = iprot.readI32(); struct.setInput_prevIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // INPUT_START if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.input_start = iprot.readI32(); struct.setInput_startIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // INPUT_NEXT if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.input_next = iprot.readI32(); struct.setInput_nextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TFilterPushDownInfo struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(INPUT_PREV_FIELD_DESC); oprot.writeI32(struct.input_prev); oprot.writeFieldEnd(); oprot.writeFieldBegin(INPUT_START_FIELD_DESC); oprot.writeI32(struct.input_start); oprot.writeFieldEnd(); oprot.writeFieldBegin(INPUT_NEXT_FIELD_DESC); oprot.writeI32(struct.input_next); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TFilterPushDownInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TFilterPushDownInfoTupleScheme getScheme() { return new TFilterPushDownInfoTupleScheme(); } } private static class TFilterPushDownInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TFilterPushDownInfo> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TFilterPushDownInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetInput_prev()) { optionals.set(0); } if (struct.isSetInput_start()) { optionals.set(1); } if (struct.isSetInput_next()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetInput_prev()) { oprot.writeI32(struct.input_prev); } if (struct.isSetInput_start()) { oprot.writeI32(struct.input_start); } if (struct.isSetInput_next()) { oprot.writeI32(struct.input_next); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TFilterPushDownInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.input_prev = iprot.readI32(); struct.setInput_prevIsSet(true); } if (incoming.get(1)) { struct.input_start = iprot.readI32(); struct.setInput_startIsSet(true); } if (incoming.get(2)) { struct.input_next = iprot.readI32(); struct.setInput_nextIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TOptimizationOption.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TOptimizationOption implements org.apache.thrift.TBase<TOptimizationOption, TOptimizationOption._Fields>, java.io.Serializable, Cloneable, Comparable<TOptimizationOption> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TOptimizationOption"); private static final org.apache.thrift.protocol.TField IS_VIEW_OPTIMIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("is_view_optimize", org.apache.thrift.protocol.TType.BOOL, (short)1); private static final org.apache.thrift.protocol.TField ENABLE_WATCHDOG_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_watchdog", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField FILTER_PUSH_DOWN_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("filter_push_down_info", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField DISTRIBUTED_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("distributed_mode", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TOptimizationOptionStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TOptimizationOptionTupleSchemeFactory(); public boolean is_view_optimize; // required public boolean enable_watchdog; // required public @org.apache.thrift.annotation.Nullable java.util.List<TFilterPushDownInfo> filter_push_down_info; // required public boolean distributed_mode; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { IS_VIEW_OPTIMIZE((short)1, "is_view_optimize"), ENABLE_WATCHDOG((short)2, "enable_watchdog"), FILTER_PUSH_DOWN_INFO((short)3, "filter_push_down_info"), DISTRIBUTED_MODE((short)4, "distributed_mode"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // IS_VIEW_OPTIMIZE return IS_VIEW_OPTIMIZE; case 2: // ENABLE_WATCHDOG return ENABLE_WATCHDOG; case 3: // FILTER_PUSH_DOWN_INFO return FILTER_PUSH_DOWN_INFO; case 4: // DISTRIBUTED_MODE return DISTRIBUTED_MODE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __IS_VIEW_OPTIMIZE_ISSET_ID = 0; private static final int __ENABLE_WATCHDOG_ISSET_ID = 1; private static final int __DISTRIBUTED_MODE_ISSET_ID = 2; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.IS_VIEW_OPTIMIZE, new org.apache.thrift.meta_data.FieldMetaData("is_view_optimize", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.ENABLE_WATCHDOG, new org.apache.thrift.meta_data.FieldMetaData("enable_watchdog", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.FILTER_PUSH_DOWN_INFO, new org.apache.thrift.meta_data.FieldMetaData("filter_push_down_info", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFilterPushDownInfo.class)))); tmpMap.put(_Fields.DISTRIBUTED_MODE, new org.apache.thrift.meta_data.FieldMetaData("distributed_mode", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TOptimizationOption.class, metaDataMap); } public TOptimizationOption() { } public TOptimizationOption( boolean is_view_optimize, boolean enable_watchdog, java.util.List<TFilterPushDownInfo> filter_push_down_info, boolean distributed_mode) { this(); this.is_view_optimize = is_view_optimize; setIs_view_optimizeIsSet(true); this.enable_watchdog = enable_watchdog; setEnable_watchdogIsSet(true); this.filter_push_down_info = filter_push_down_info; this.distributed_mode = distributed_mode; setDistributed_modeIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public TOptimizationOption(TOptimizationOption other) { __isset_bitfield = other.__isset_bitfield; this.is_view_optimize = other.is_view_optimize; this.enable_watchdog = other.enable_watchdog; if (other.isSetFilter_push_down_info()) { java.util.List<TFilterPushDownInfo> __this__filter_push_down_info = new java.util.ArrayList<TFilterPushDownInfo>(other.filter_push_down_info.size()); for (TFilterPushDownInfo other_element : other.filter_push_down_info) { __this__filter_push_down_info.add(new TFilterPushDownInfo(other_element)); } this.filter_push_down_info = __this__filter_push_down_info; } this.distributed_mode = other.distributed_mode; } public TOptimizationOption deepCopy() { return new TOptimizationOption(this); } @Override public void clear() { setIs_view_optimizeIsSet(false); this.is_view_optimize = false; setEnable_watchdogIsSet(false); this.enable_watchdog = false; this.filter_push_down_info = null; setDistributed_modeIsSet(false); this.distributed_mode = false; } public boolean isIs_view_optimize() { return this.is_view_optimize; } public TOptimizationOption setIs_view_optimize(boolean is_view_optimize) { this.is_view_optimize = is_view_optimize; setIs_view_optimizeIsSet(true); return this; } public void unsetIs_view_optimize() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_VIEW_OPTIMIZE_ISSET_ID); } /** Returns true if field is_view_optimize is set (has been assigned a value) and false otherwise */ public boolean isSetIs_view_optimize() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_VIEW_OPTIMIZE_ISSET_ID); } public void setIs_view_optimizeIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_VIEW_OPTIMIZE_ISSET_ID, value); } public boolean isEnable_watchdog() { return this.enable_watchdog; } public TOptimizationOption setEnable_watchdog(boolean enable_watchdog) { this.enable_watchdog = enable_watchdog; setEnable_watchdogIsSet(true); return this; } public void unsetEnable_watchdog() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLE_WATCHDOG_ISSET_ID); } /** Returns true if field enable_watchdog is set (has been assigned a value) and false otherwise */ public boolean isSetEnable_watchdog() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLE_WATCHDOG_ISSET_ID); } public void setEnable_watchdogIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLE_WATCHDOG_ISSET_ID, value); } public int getFilter_push_down_infoSize() { return (this.filter_push_down_info == null) ? 0 : this.filter_push_down_info.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TFilterPushDownInfo> getFilter_push_down_infoIterator() { return (this.filter_push_down_info == null) ? null : this.filter_push_down_info.iterator(); } public void addToFilter_push_down_info(TFilterPushDownInfo elem) { if (this.filter_push_down_info == null) { this.filter_push_down_info = new java.util.ArrayList<TFilterPushDownInfo>(); } this.filter_push_down_info.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TFilterPushDownInfo> getFilter_push_down_info() { return this.filter_push_down_info; } public TOptimizationOption setFilter_push_down_info(@org.apache.thrift.annotation.Nullable java.util.List<TFilterPushDownInfo> filter_push_down_info) { this.filter_push_down_info = filter_push_down_info; return this; } public void unsetFilter_push_down_info() { this.filter_push_down_info = null; } /** Returns true if field filter_push_down_info is set (has been assigned a value) and false otherwise */ public boolean isSetFilter_push_down_info() { return this.filter_push_down_info != null; } public void setFilter_push_down_infoIsSet(boolean value) { if (!value) { this.filter_push_down_info = null; } } public boolean isDistributed_mode() { return this.distributed_mode; } public TOptimizationOption setDistributed_mode(boolean distributed_mode) { this.distributed_mode = distributed_mode; setDistributed_modeIsSet(true); return this; } public void unsetDistributed_mode() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DISTRIBUTED_MODE_ISSET_ID); } /** Returns true if field distributed_mode is set (has been assigned a value) and false otherwise */ public boolean isSetDistributed_mode() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DISTRIBUTED_MODE_ISSET_ID); } public void setDistributed_modeIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DISTRIBUTED_MODE_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case IS_VIEW_OPTIMIZE: if (value == null) { unsetIs_view_optimize(); } else { setIs_view_optimize((java.lang.Boolean)value); } break; case ENABLE_WATCHDOG: if (value == null) { unsetEnable_watchdog(); } else { setEnable_watchdog((java.lang.Boolean)value); } break; case FILTER_PUSH_DOWN_INFO: if (value == null) { unsetFilter_push_down_info(); } else { setFilter_push_down_info((java.util.List<TFilterPushDownInfo>)value); } break; case DISTRIBUTED_MODE: if (value == null) { unsetDistributed_mode(); } else { setDistributed_mode((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case IS_VIEW_OPTIMIZE: return isIs_view_optimize(); case ENABLE_WATCHDOG: return isEnable_watchdog(); case FILTER_PUSH_DOWN_INFO: return getFilter_push_down_info(); case DISTRIBUTED_MODE: return isDistributed_mode(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case IS_VIEW_OPTIMIZE: return isSetIs_view_optimize(); case ENABLE_WATCHDOG: return isSetEnable_watchdog(); case FILTER_PUSH_DOWN_INFO: return isSetFilter_push_down_info(); case DISTRIBUTED_MODE: return isSetDistributed_mode(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TOptimizationOption) return this.equals((TOptimizationOption)that); return false; } public boolean equals(TOptimizationOption that) { if (that == null) return false; if (this == that) return true; boolean this_present_is_view_optimize = true; boolean that_present_is_view_optimize = true; if (this_present_is_view_optimize || that_present_is_view_optimize) { if (!(this_present_is_view_optimize && that_present_is_view_optimize)) return false; if (this.is_view_optimize != that.is_view_optimize) return false; } boolean this_present_enable_watchdog = true; boolean that_present_enable_watchdog = true; if (this_present_enable_watchdog || that_present_enable_watchdog) { if (!(this_present_enable_watchdog && that_present_enable_watchdog)) return false; if (this.enable_watchdog != that.enable_watchdog) return false; } boolean this_present_filter_push_down_info = true && this.isSetFilter_push_down_info(); boolean that_present_filter_push_down_info = true && that.isSetFilter_push_down_info(); if (this_present_filter_push_down_info || that_present_filter_push_down_info) { if (!(this_present_filter_push_down_info && that_present_filter_push_down_info)) return false; if (!this.filter_push_down_info.equals(that.filter_push_down_info)) return false; } boolean this_present_distributed_mode = true; boolean that_present_distributed_mode = true; if (this_present_distributed_mode || that_present_distributed_mode) { if (!(this_present_distributed_mode && that_present_distributed_mode)) return false; if (this.distributed_mode != that.distributed_mode) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((is_view_optimize) ? 131071 : 524287); hashCode = hashCode * 8191 + ((enable_watchdog) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetFilter_push_down_info()) ? 131071 : 524287); if (isSetFilter_push_down_info()) hashCode = hashCode * 8191 + filter_push_down_info.hashCode(); hashCode = hashCode * 8191 + ((distributed_mode) ? 131071 : 524287); return hashCode; } @Override public int compareTo(TOptimizationOption other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetIs_view_optimize(), other.isSetIs_view_optimize()); if (lastComparison != 0) { return lastComparison; } if (isSetIs_view_optimize()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_view_optimize, other.is_view_optimize); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetEnable_watchdog(), other.isSetEnable_watchdog()); if (lastComparison != 0) { return lastComparison; } if (isSetEnable_watchdog()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_watchdog, other.enable_watchdog); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFilter_push_down_info(), other.isSetFilter_push_down_info()); if (lastComparison != 0) { return lastComparison; } if (isSetFilter_push_down_info()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter_push_down_info, other.filter_push_down_info); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDistributed_mode(), other.isSetDistributed_mode()); if (lastComparison != 0) { return lastComparison; } if (isSetDistributed_mode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.distributed_mode, other.distributed_mode); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TOptimizationOption("); boolean first = true; sb.append("is_view_optimize:"); sb.append(this.is_view_optimize); first = false; if (!first) sb.append(", "); sb.append("enable_watchdog:"); sb.append(this.enable_watchdog); first = false; if (!first) sb.append(", "); sb.append("filter_push_down_info:"); if (this.filter_push_down_info == null) { sb.append("null"); } else { sb.append(this.filter_push_down_info); } first = false; if (!first) sb.append(", "); sb.append("distributed_mode:"); sb.append(this.distributed_mode); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TOptimizationOptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TOptimizationOptionStandardScheme getScheme() { return new TOptimizationOptionStandardScheme(); } } private static class TOptimizationOptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TOptimizationOption> { public void read(org.apache.thrift.protocol.TProtocol iprot, TOptimizationOption struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // IS_VIEW_OPTIMIZE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.is_view_optimize = iprot.readBool(); struct.setIs_view_optimizeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ENABLE_WATCHDOG if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.enable_watchdog = iprot.readBool(); struct.setEnable_watchdogIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // FILTER_PUSH_DOWN_INFO if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list72 = iprot.readListBegin(); struct.filter_push_down_info = new java.util.ArrayList<TFilterPushDownInfo>(_list72.size); @org.apache.thrift.annotation.Nullable TFilterPushDownInfo _elem73; for (int _i74 = 0; _i74 < _list72.size; ++_i74) { _elem73 = new TFilterPushDownInfo(); _elem73.read(iprot); struct.filter_push_down_info.add(_elem73); } iprot.readListEnd(); } struct.setFilter_push_down_infoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DISTRIBUTED_MODE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.distributed_mode = iprot.readBool(); struct.setDistributed_modeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TOptimizationOption struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(IS_VIEW_OPTIMIZE_FIELD_DESC); oprot.writeBool(struct.is_view_optimize); oprot.writeFieldEnd(); oprot.writeFieldBegin(ENABLE_WATCHDOG_FIELD_DESC); oprot.writeBool(struct.enable_watchdog); oprot.writeFieldEnd(); if (struct.filter_push_down_info != null) { oprot.writeFieldBegin(FILTER_PUSH_DOWN_INFO_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.filter_push_down_info.size())); for (TFilterPushDownInfo _iter75 : struct.filter_push_down_info) { _iter75.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(DISTRIBUTED_MODE_FIELD_DESC); oprot.writeBool(struct.distributed_mode); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TOptimizationOptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TOptimizationOptionTupleScheme getScheme() { return new TOptimizationOptionTupleScheme(); } } private static class TOptimizationOptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TOptimizationOption> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TOptimizationOption struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetIs_view_optimize()) { optionals.set(0); } if (struct.isSetEnable_watchdog()) { optionals.set(1); } if (struct.isSetFilter_push_down_info()) { optionals.set(2); } if (struct.isSetDistributed_mode()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetIs_view_optimize()) { oprot.writeBool(struct.is_view_optimize); } if (struct.isSetEnable_watchdog()) { oprot.writeBool(struct.enable_watchdog); } if (struct.isSetFilter_push_down_info()) { { oprot.writeI32(struct.filter_push_down_info.size()); for (TFilterPushDownInfo _iter76 : struct.filter_push_down_info) { _iter76.write(oprot); } } } if (struct.isSetDistributed_mode()) { oprot.writeBool(struct.distributed_mode); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TOptimizationOption struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.is_view_optimize = iprot.readBool(); struct.setIs_view_optimizeIsSet(true); } if (incoming.get(1)) { struct.enable_watchdog = iprot.readBool(); struct.setEnable_watchdogIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list77 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.filter_push_down_info = new java.util.ArrayList<TFilterPushDownInfo>(_list77.size); @org.apache.thrift.annotation.Nullable TFilterPushDownInfo _elem78; for (int _i79 = 0; _i79 < _list77.size; ++_i79) { _elem78 = new TFilterPushDownInfo(); _elem78.read(iprot); struct.filter_push_down_info.add(_elem78); } } struct.setFilter_push_down_infoIsSet(true); } if (incoming.get(3)) { struct.distributed_mode = iprot.readBool(); struct.setDistributed_modeIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TOutputBufferSizeType.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; public enum TOutputBufferSizeType implements org.apache.thrift.TEnum { kConstant(0), kUserSpecifiedConstantParameter(1), kUserSpecifiedRowMultiplier(2), kTableFunctionSpecifiedParameter(3), kPreFlightParameter(4); private final int value; private TOutputBufferSizeType(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. */ @org.apache.thrift.annotation.Nullable public static TOutputBufferSizeType findByValue(int value) { switch (value) { case 0: return kConstant; case 1: return kUserSpecifiedConstantParameter; case 2: return kUserSpecifiedRowMultiplier; case 3: return kTableFunctionSpecifiedParameter; case 4: return kPreFlightParameter; default: return null; } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TPlanResult.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TPlanResult implements org.apache.thrift.TBase<TPlanResult, TPlanResult._Fields>, java.io.Serializable, Cloneable, Comparable<TPlanResult> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPlanResult"); private static final org.apache.thrift.protocol.TField PLAN_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("plan_result", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField EXECUTION_TIME_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("execution_time_ms", org.apache.thrift.protocol.TType.I64, (short)2); private static final org.apache.thrift.protocol.TField PRIMARY_ACCESSED_OBJECTS_FIELD_DESC = new org.apache.thrift.protocol.TField("primary_accessed_objects", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField RESOLVED_ACCESSED_OBJECTS_FIELD_DESC = new org.apache.thrift.protocol.TField("resolved_accessed_objects", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPlanResultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPlanResultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String plan_result; // required public long execution_time_ms; // required public @org.apache.thrift.annotation.Nullable TAccessedQueryObjects primary_accessed_objects; // required public @org.apache.thrift.annotation.Nullable TAccessedQueryObjects resolved_accessed_objects; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PLAN_RESULT((short)1, "plan_result"), EXECUTION_TIME_MS((short)2, "execution_time_ms"), PRIMARY_ACCESSED_OBJECTS((short)3, "primary_accessed_objects"), RESOLVED_ACCESSED_OBJECTS((short)4, "resolved_accessed_objects"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PLAN_RESULT return PLAN_RESULT; case 2: // EXECUTION_TIME_MS return EXECUTION_TIME_MS; case 3: // PRIMARY_ACCESSED_OBJECTS return PRIMARY_ACCESSED_OBJECTS; case 4: // RESOLVED_ACCESSED_OBJECTS return RESOLVED_ACCESSED_OBJECTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __EXECUTION_TIME_MS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PLAN_RESULT, new org.apache.thrift.meta_data.FieldMetaData("plan_result", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.EXECUTION_TIME_MS, new org.apache.thrift.meta_data.FieldMetaData("execution_time_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.PRIMARY_ACCESSED_OBJECTS, new org.apache.thrift.meta_data.FieldMetaData("primary_accessed_objects", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAccessedQueryObjects.class))); tmpMap.put(_Fields.RESOLVED_ACCESSED_OBJECTS, new org.apache.thrift.meta_data.FieldMetaData("resolved_accessed_objects", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAccessedQueryObjects.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPlanResult.class, metaDataMap); } public TPlanResult() { } public TPlanResult( java.lang.String plan_result, long execution_time_ms, TAccessedQueryObjects primary_accessed_objects, TAccessedQueryObjects resolved_accessed_objects) { this(); this.plan_result = plan_result; this.execution_time_ms = execution_time_ms; setExecution_time_msIsSet(true); this.primary_accessed_objects = primary_accessed_objects; this.resolved_accessed_objects = resolved_accessed_objects; } /** * Performs a deep copy on <i>other</i>. */ public TPlanResult(TPlanResult other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetPlan_result()) { this.plan_result = other.plan_result; } this.execution_time_ms = other.execution_time_ms; if (other.isSetPrimary_accessed_objects()) { this.primary_accessed_objects = new TAccessedQueryObjects(other.primary_accessed_objects); } if (other.isSetResolved_accessed_objects()) { this.resolved_accessed_objects = new TAccessedQueryObjects(other.resolved_accessed_objects); } } public TPlanResult deepCopy() { return new TPlanResult(this); } @Override public void clear() { this.plan_result = null; setExecution_time_msIsSet(false); this.execution_time_ms = 0; this.primary_accessed_objects = null; this.resolved_accessed_objects = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getPlan_result() { return this.plan_result; } public TPlanResult setPlan_result(@org.apache.thrift.annotation.Nullable java.lang.String plan_result) { this.plan_result = plan_result; return this; } public void unsetPlan_result() { this.plan_result = null; } /** Returns true if field plan_result is set (has been assigned a value) and false otherwise */ public boolean isSetPlan_result() { return this.plan_result != null; } public void setPlan_resultIsSet(boolean value) { if (!value) { this.plan_result = null; } } public long getExecution_time_ms() { return this.execution_time_ms; } public TPlanResult setExecution_time_ms(long execution_time_ms) { this.execution_time_ms = execution_time_ms; setExecution_time_msIsSet(true); return this; } public void unsetExecution_time_ms() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXECUTION_TIME_MS_ISSET_ID); } /** Returns true if field execution_time_ms is set (has been assigned a value) and false otherwise */ public boolean isSetExecution_time_ms() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXECUTION_TIME_MS_ISSET_ID); } public void setExecution_time_msIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXECUTION_TIME_MS_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public TAccessedQueryObjects getPrimary_accessed_objects() { return this.primary_accessed_objects; } public TPlanResult setPrimary_accessed_objects(@org.apache.thrift.annotation.Nullable TAccessedQueryObjects primary_accessed_objects) { this.primary_accessed_objects = primary_accessed_objects; return this; } public void unsetPrimary_accessed_objects() { this.primary_accessed_objects = null; } /** Returns true if field primary_accessed_objects is set (has been assigned a value) and false otherwise */ public boolean isSetPrimary_accessed_objects() { return this.primary_accessed_objects != null; } public void setPrimary_accessed_objectsIsSet(boolean value) { if (!value) { this.primary_accessed_objects = null; } } @org.apache.thrift.annotation.Nullable public TAccessedQueryObjects getResolved_accessed_objects() { return this.resolved_accessed_objects; } public TPlanResult setResolved_accessed_objects(@org.apache.thrift.annotation.Nullable TAccessedQueryObjects resolved_accessed_objects) { this.resolved_accessed_objects = resolved_accessed_objects; return this; } public void unsetResolved_accessed_objects() { this.resolved_accessed_objects = null; } /** Returns true if field resolved_accessed_objects is set (has been assigned a value) and false otherwise */ public boolean isSetResolved_accessed_objects() { return this.resolved_accessed_objects != null; } public void setResolved_accessed_objectsIsSet(boolean value) { if (!value) { this.resolved_accessed_objects = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PLAN_RESULT: if (value == null) { unsetPlan_result(); } else { setPlan_result((java.lang.String)value); } break; case EXECUTION_TIME_MS: if (value == null) { unsetExecution_time_ms(); } else { setExecution_time_ms((java.lang.Long)value); } break; case PRIMARY_ACCESSED_OBJECTS: if (value == null) { unsetPrimary_accessed_objects(); } else { setPrimary_accessed_objects((TAccessedQueryObjects)value); } break; case RESOLVED_ACCESSED_OBJECTS: if (value == null) { unsetResolved_accessed_objects(); } else { setResolved_accessed_objects((TAccessedQueryObjects)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PLAN_RESULT: return getPlan_result(); case EXECUTION_TIME_MS: return getExecution_time_ms(); case PRIMARY_ACCESSED_OBJECTS: return getPrimary_accessed_objects(); case RESOLVED_ACCESSED_OBJECTS: return getResolved_accessed_objects(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case PLAN_RESULT: return isSetPlan_result(); case EXECUTION_TIME_MS: return isSetExecution_time_ms(); case PRIMARY_ACCESSED_OBJECTS: return isSetPrimary_accessed_objects(); case RESOLVED_ACCESSED_OBJECTS: return isSetResolved_accessed_objects(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TPlanResult) return this.equals((TPlanResult)that); return false; } public boolean equals(TPlanResult that) { if (that == null) return false; if (this == that) return true; boolean this_present_plan_result = true && this.isSetPlan_result(); boolean that_present_plan_result = true && that.isSetPlan_result(); if (this_present_plan_result || that_present_plan_result) { if (!(this_present_plan_result && that_present_plan_result)) return false; if (!this.plan_result.equals(that.plan_result)) return false; } boolean this_present_execution_time_ms = true; boolean that_present_execution_time_ms = true; if (this_present_execution_time_ms || that_present_execution_time_ms) { if (!(this_present_execution_time_ms && that_present_execution_time_ms)) return false; if (this.execution_time_ms != that.execution_time_ms) return false; } boolean this_present_primary_accessed_objects = true && this.isSetPrimary_accessed_objects(); boolean that_present_primary_accessed_objects = true && that.isSetPrimary_accessed_objects(); if (this_present_primary_accessed_objects || that_present_primary_accessed_objects) { if (!(this_present_primary_accessed_objects && that_present_primary_accessed_objects)) return false; if (!this.primary_accessed_objects.equals(that.primary_accessed_objects)) return false; } boolean this_present_resolved_accessed_objects = true && this.isSetResolved_accessed_objects(); boolean that_present_resolved_accessed_objects = true && that.isSetResolved_accessed_objects(); if (this_present_resolved_accessed_objects || that_present_resolved_accessed_objects) { if (!(this_present_resolved_accessed_objects && that_present_resolved_accessed_objects)) return false; if (!this.resolved_accessed_objects.equals(that.resolved_accessed_objects)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetPlan_result()) ? 131071 : 524287); if (isSetPlan_result()) hashCode = hashCode * 8191 + plan_result.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(execution_time_ms); hashCode = hashCode * 8191 + ((isSetPrimary_accessed_objects()) ? 131071 : 524287); if (isSetPrimary_accessed_objects()) hashCode = hashCode * 8191 + primary_accessed_objects.hashCode(); hashCode = hashCode * 8191 + ((isSetResolved_accessed_objects()) ? 131071 : 524287); if (isSetResolved_accessed_objects()) hashCode = hashCode * 8191 + resolved_accessed_objects.hashCode(); return hashCode; } @Override public int compareTo(TPlanResult other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetPlan_result(), other.isSetPlan_result()); if (lastComparison != 0) { return lastComparison; } if (isSetPlan_result()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.plan_result, other.plan_result); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetExecution_time_ms(), other.isSetExecution_time_ms()); if (lastComparison != 0) { return lastComparison; } if (isSetExecution_time_ms()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.execution_time_ms, other.execution_time_ms); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPrimary_accessed_objects(), other.isSetPrimary_accessed_objects()); if (lastComparison != 0) { return lastComparison; } if (isSetPrimary_accessed_objects()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primary_accessed_objects, other.primary_accessed_objects); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetResolved_accessed_objects(), other.isSetResolved_accessed_objects()); if (lastComparison != 0) { return lastComparison; } if (isSetResolved_accessed_objects()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resolved_accessed_objects, other.resolved_accessed_objects); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TPlanResult("); boolean first = true; sb.append("plan_result:"); if (this.plan_result == null) { sb.append("null"); } else { sb.append(this.plan_result); } first = false; if (!first) sb.append(", "); sb.append("execution_time_ms:"); sb.append(this.execution_time_ms); first = false; if (!first) sb.append(", "); sb.append("primary_accessed_objects:"); if (this.primary_accessed_objects == null) { sb.append("null"); } else { sb.append(this.primary_accessed_objects); } first = false; if (!first) sb.append(", "); sb.append("resolved_accessed_objects:"); if (this.resolved_accessed_objects == null) { sb.append("null"); } else { sb.append(this.resolved_accessed_objects); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (primary_accessed_objects != null) { primary_accessed_objects.validate(); } if (resolved_accessed_objects != null) { resolved_accessed_objects.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TPlanResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TPlanResultStandardScheme getScheme() { return new TPlanResultStandardScheme(); } } private static class TPlanResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TPlanResult> { public void read(org.apache.thrift.protocol.TProtocol iprot, TPlanResult struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PLAN_RESULT if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.plan_result = iprot.readString(); struct.setPlan_resultIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // EXECUTION_TIME_MS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.execution_time_ms = iprot.readI64(); struct.setExecution_time_msIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PRIMARY_ACCESSED_OBJECTS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.primary_accessed_objects = new TAccessedQueryObjects(); struct.primary_accessed_objects.read(iprot); struct.setPrimary_accessed_objectsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // RESOLVED_ACCESSED_OBJECTS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.resolved_accessed_objects = new TAccessedQueryObjects(); struct.resolved_accessed_objects.read(iprot); struct.setResolved_accessed_objectsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TPlanResult struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.plan_result != null) { oprot.writeFieldBegin(PLAN_RESULT_FIELD_DESC); oprot.writeString(struct.plan_result); oprot.writeFieldEnd(); } oprot.writeFieldBegin(EXECUTION_TIME_MS_FIELD_DESC); oprot.writeI64(struct.execution_time_ms); oprot.writeFieldEnd(); if (struct.primary_accessed_objects != null) { oprot.writeFieldBegin(PRIMARY_ACCESSED_OBJECTS_FIELD_DESC); struct.primary_accessed_objects.write(oprot); oprot.writeFieldEnd(); } if (struct.resolved_accessed_objects != null) { oprot.writeFieldBegin(RESOLVED_ACCESSED_OBJECTS_FIELD_DESC); struct.resolved_accessed_objects.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TPlanResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TPlanResultTupleScheme getScheme() { return new TPlanResultTupleScheme(); } } private static class TPlanResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TPlanResult> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TPlanResult struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetPlan_result()) { optionals.set(0); } if (struct.isSetExecution_time_ms()) { optionals.set(1); } if (struct.isSetPrimary_accessed_objects()) { optionals.set(2); } if (struct.isSetResolved_accessed_objects()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetPlan_result()) { oprot.writeString(struct.plan_result); } if (struct.isSetExecution_time_ms()) { oprot.writeI64(struct.execution_time_ms); } if (struct.isSetPrimary_accessed_objects()) { struct.primary_accessed_objects.write(oprot); } if (struct.isSetResolved_accessed_objects()) { struct.resolved_accessed_objects.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TPlanResult struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.plan_result = iprot.readString(); struct.setPlan_resultIsSet(true); } if (incoming.get(1)) { struct.execution_time_ms = iprot.readI64(); struct.setExecution_time_msIsSet(true); } if (incoming.get(2)) { struct.primary_accessed_objects = new TAccessedQueryObjects(); struct.primary_accessed_objects.read(iprot); struct.setPrimary_accessed_objectsIsSet(true); } if (incoming.get(3)) { struct.resolved_accessed_objects = new TAccessedQueryObjects(); struct.resolved_accessed_objects.read(iprot); struct.setResolved_accessed_objectsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TQueryParsingOption.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TQueryParsingOption implements org.apache.thrift.TBase<TQueryParsingOption, TQueryParsingOption._Fields>, java.io.Serializable, Cloneable, Comparable<TQueryParsingOption> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TQueryParsingOption"); private static final org.apache.thrift.protocol.TField LEGACY_SYNTAX_FIELD_DESC = new org.apache.thrift.protocol.TField("legacy_syntax", org.apache.thrift.protocol.TType.BOOL, (short)1); private static final org.apache.thrift.protocol.TField IS_EXPLAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("is_explain", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField CHECK_PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("check_privileges", org.apache.thrift.protocol.TType.BOOL, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TQueryParsingOptionStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TQueryParsingOptionTupleSchemeFactory(); public boolean legacy_syntax; // required public boolean is_explain; // required public boolean check_privileges; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { LEGACY_SYNTAX((short)1, "legacy_syntax"), IS_EXPLAIN((short)2, "is_explain"), CHECK_PRIVILEGES((short)3, "check_privileges"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // LEGACY_SYNTAX return LEGACY_SYNTAX; case 2: // IS_EXPLAIN return IS_EXPLAIN; case 3: // CHECK_PRIVILEGES return CHECK_PRIVILEGES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __LEGACY_SYNTAX_ISSET_ID = 0; private static final int __IS_EXPLAIN_ISSET_ID = 1; private static final int __CHECK_PRIVILEGES_ISSET_ID = 2; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.LEGACY_SYNTAX, new org.apache.thrift.meta_data.FieldMetaData("legacy_syntax", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.IS_EXPLAIN, new org.apache.thrift.meta_data.FieldMetaData("is_explain", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.CHECK_PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("check_privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TQueryParsingOption.class, metaDataMap); } public TQueryParsingOption() { } public TQueryParsingOption( boolean legacy_syntax, boolean is_explain, boolean check_privileges) { this(); this.legacy_syntax = legacy_syntax; setLegacy_syntaxIsSet(true); this.is_explain = is_explain; setIs_explainIsSet(true); this.check_privileges = check_privileges; setCheck_privilegesIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public TQueryParsingOption(TQueryParsingOption other) { __isset_bitfield = other.__isset_bitfield; this.legacy_syntax = other.legacy_syntax; this.is_explain = other.is_explain; this.check_privileges = other.check_privileges; } public TQueryParsingOption deepCopy() { return new TQueryParsingOption(this); } @Override public void clear() { setLegacy_syntaxIsSet(false); this.legacy_syntax = false; setIs_explainIsSet(false); this.is_explain = false; setCheck_privilegesIsSet(false); this.check_privileges = false; } public boolean isLegacy_syntax() { return this.legacy_syntax; } public TQueryParsingOption setLegacy_syntax(boolean legacy_syntax) { this.legacy_syntax = legacy_syntax; setLegacy_syntaxIsSet(true); return this; } public void unsetLegacy_syntax() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LEGACY_SYNTAX_ISSET_ID); } /** Returns true if field legacy_syntax is set (has been assigned a value) and false otherwise */ public boolean isSetLegacy_syntax() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LEGACY_SYNTAX_ISSET_ID); } public void setLegacy_syntaxIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LEGACY_SYNTAX_ISSET_ID, value); } public boolean isIs_explain() { return this.is_explain; } public TQueryParsingOption setIs_explain(boolean is_explain) { this.is_explain = is_explain; setIs_explainIsSet(true); return this; } public void unsetIs_explain() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_EXPLAIN_ISSET_ID); } /** Returns true if field is_explain is set (has been assigned a value) and false otherwise */ public boolean isSetIs_explain() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_EXPLAIN_ISSET_ID); } public void setIs_explainIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_EXPLAIN_ISSET_ID, value); } public boolean isCheck_privileges() { return this.check_privileges; } public TQueryParsingOption setCheck_privileges(boolean check_privileges) { this.check_privileges = check_privileges; setCheck_privilegesIsSet(true); return this; } public void unsetCheck_privileges() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CHECK_PRIVILEGES_ISSET_ID); } /** Returns true if field check_privileges is set (has been assigned a value) and false otherwise */ public boolean isSetCheck_privileges() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CHECK_PRIVILEGES_ISSET_ID); } public void setCheck_privilegesIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CHECK_PRIVILEGES_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case LEGACY_SYNTAX: if (value == null) { unsetLegacy_syntax(); } else { setLegacy_syntax((java.lang.Boolean)value); } break; case IS_EXPLAIN: if (value == null) { unsetIs_explain(); } else { setIs_explain((java.lang.Boolean)value); } break; case CHECK_PRIVILEGES: if (value == null) { unsetCheck_privileges(); } else { setCheck_privileges((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case LEGACY_SYNTAX: return isLegacy_syntax(); case IS_EXPLAIN: return isIs_explain(); case CHECK_PRIVILEGES: return isCheck_privileges(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case LEGACY_SYNTAX: return isSetLegacy_syntax(); case IS_EXPLAIN: return isSetIs_explain(); case CHECK_PRIVILEGES: return isSetCheck_privileges(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TQueryParsingOption) return this.equals((TQueryParsingOption)that); return false; } public boolean equals(TQueryParsingOption that) { if (that == null) return false; if (this == that) return true; boolean this_present_legacy_syntax = true; boolean that_present_legacy_syntax = true; if (this_present_legacy_syntax || that_present_legacy_syntax) { if (!(this_present_legacy_syntax && that_present_legacy_syntax)) return false; if (this.legacy_syntax != that.legacy_syntax) return false; } boolean this_present_is_explain = true; boolean that_present_is_explain = true; if (this_present_is_explain || that_present_is_explain) { if (!(this_present_is_explain && that_present_is_explain)) return false; if (this.is_explain != that.is_explain) return false; } boolean this_present_check_privileges = true; boolean that_present_check_privileges = true; if (this_present_check_privileges || that_present_check_privileges) { if (!(this_present_check_privileges && that_present_check_privileges)) return false; if (this.check_privileges != that.check_privileges) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((legacy_syntax) ? 131071 : 524287); hashCode = hashCode * 8191 + ((is_explain) ? 131071 : 524287); hashCode = hashCode * 8191 + ((check_privileges) ? 131071 : 524287); return hashCode; } @Override public int compareTo(TQueryParsingOption other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetLegacy_syntax(), other.isSetLegacy_syntax()); if (lastComparison != 0) { return lastComparison; } if (isSetLegacy_syntax()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.legacy_syntax, other.legacy_syntax); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetIs_explain(), other.isSetIs_explain()); if (lastComparison != 0) { return lastComparison; } if (isSetIs_explain()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_explain, other.is_explain); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCheck_privileges(), other.isSetCheck_privileges()); if (lastComparison != 0) { return lastComparison; } if (isSetCheck_privileges()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.check_privileges, other.check_privileges); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TQueryParsingOption("); boolean first = true; sb.append("legacy_syntax:"); sb.append(this.legacy_syntax); first = false; if (!first) sb.append(", "); sb.append("is_explain:"); sb.append(this.is_explain); first = false; if (!first) sb.append(", "); sb.append("check_privileges:"); sb.append(this.check_privileges); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TQueryParsingOptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TQueryParsingOptionStandardScheme getScheme() { return new TQueryParsingOptionStandardScheme(); } } private static class TQueryParsingOptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TQueryParsingOption> { public void read(org.apache.thrift.protocol.TProtocol iprot, TQueryParsingOption struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // LEGACY_SYNTAX if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.legacy_syntax = iprot.readBool(); struct.setLegacy_syntaxIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IS_EXPLAIN if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.is_explain = iprot.readBool(); struct.setIs_explainIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // CHECK_PRIVILEGES if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.check_privileges = iprot.readBool(); struct.setCheck_privilegesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TQueryParsingOption struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(LEGACY_SYNTAX_FIELD_DESC); oprot.writeBool(struct.legacy_syntax); oprot.writeFieldEnd(); oprot.writeFieldBegin(IS_EXPLAIN_FIELD_DESC); oprot.writeBool(struct.is_explain); oprot.writeFieldEnd(); oprot.writeFieldBegin(CHECK_PRIVILEGES_FIELD_DESC); oprot.writeBool(struct.check_privileges); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TQueryParsingOptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TQueryParsingOptionTupleScheme getScheme() { return new TQueryParsingOptionTupleScheme(); } } private static class TQueryParsingOptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TQueryParsingOption> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TQueryParsingOption struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetLegacy_syntax()) { optionals.set(0); } if (struct.isSetIs_explain()) { optionals.set(1); } if (struct.isSetCheck_privileges()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetLegacy_syntax()) { oprot.writeBool(struct.legacy_syntax); } if (struct.isSetIs_explain()) { oprot.writeBool(struct.is_explain); } if (struct.isSetCheck_privileges()) { oprot.writeBool(struct.check_privileges); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TQueryParsingOption struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.legacy_syntax = iprot.readBool(); struct.setLegacy_syntaxIsSet(true); } if (incoming.get(1)) { struct.is_explain = iprot.readBool(); struct.setIs_explainIsSet(true); } if (incoming.get(2)) { struct.check_privileges = iprot.readBool(); struct.setCheck_privilegesIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TRestriction.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TRestriction implements org.apache.thrift.TBase<TRestriction, TRestriction._Fields>, java.io.Serializable, Cloneable, Comparable<TRestriction> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRestriction"); private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TRestrictionStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TRestrictionTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String database; // required public @org.apache.thrift.annotation.Nullable java.lang.String table; // required public @org.apache.thrift.annotation.Nullable java.lang.String column; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> values; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { DATABASE((short)1, "database"), TABLE((short)2, "table"), COLUMN((short)3, "column"), VALUES((short)4, "values"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DATABASE return DATABASE; case 2: // TABLE return TABLE; case 3: // COLUMN return COLUMN; case 4: // VALUES return VALUES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRestriction.class, metaDataMap); } public TRestriction() { } public TRestriction( java.lang.String database, java.lang.String table, java.lang.String column, java.util.List<java.lang.String> values) { this(); this.database = database; this.table = table; this.column = column; this.values = values; } /** * Performs a deep copy on <i>other</i>. */ public TRestriction(TRestriction other) { if (other.isSetDatabase()) { this.database = other.database; } if (other.isSetTable()) { this.table = other.table; } if (other.isSetColumn()) { this.column = other.column; } if (other.isSetValues()) { java.util.List<java.lang.String> __this__values = new java.util.ArrayList<java.lang.String>(other.values); this.values = __this__values; } } public TRestriction deepCopy() { return new TRestriction(this); } @Override public void clear() { this.database = null; this.table = null; this.column = null; this.values = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getDatabase() { return this.database; } public TRestriction setDatabase(@org.apache.thrift.annotation.Nullable java.lang.String database) { this.database = database; return this; } public void unsetDatabase() { this.database = null; } /** Returns true if field database is set (has been assigned a value) and false otherwise */ public boolean isSetDatabase() { return this.database != null; } public void setDatabaseIsSet(boolean value) { if (!value) { this.database = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable() { return this.table; } public TRestriction setTable(@org.apache.thrift.annotation.Nullable java.lang.String table) { this.table = table; return this; } public void unsetTable() { this.table = null; } /** Returns true if field table is set (has been assigned a value) and false otherwise */ public boolean isSetTable() { return this.table != null; } public void setTableIsSet(boolean value) { if (!value) { this.table = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getColumn() { return this.column; } public TRestriction setColumn(@org.apache.thrift.annotation.Nullable java.lang.String column) { this.column = column; return this; } public void unsetColumn() { this.column = null; } /** Returns true if field column is set (has been assigned a value) and false otherwise */ public boolean isSetColumn() { return this.column != null; } public void setColumnIsSet(boolean value) { if (!value) { this.column = null; } } public int getValuesSize() { return (this.values == null) ? 0 : this.values.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getValuesIterator() { return (this.values == null) ? null : this.values.iterator(); } public void addToValues(java.lang.String elem) { if (this.values == null) { this.values = new java.util.ArrayList<java.lang.String>(); } this.values.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getValues() { return this.values; } public TRestriction setValues(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> values) { this.values = values; return this; } public void unsetValues() { this.values = null; } /** Returns true if field values is set (has been assigned a value) and false otherwise */ public boolean isSetValues() { return this.values != null; } public void setValuesIsSet(boolean value) { if (!value) { this.values = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case DATABASE: if (value == null) { unsetDatabase(); } else { setDatabase((java.lang.String)value); } break; case TABLE: if (value == null) { unsetTable(); } else { setTable((java.lang.String)value); } break; case COLUMN: if (value == null) { unsetColumn(); } else { setColumn((java.lang.String)value); } break; case VALUES: if (value == null) { unsetValues(); } else { setValues((java.util.List<java.lang.String>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case DATABASE: return getDatabase(); case TABLE: return getTable(); case COLUMN: return getColumn(); case VALUES: return getValues(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case DATABASE: return isSetDatabase(); case TABLE: return isSetTable(); case COLUMN: return isSetColumn(); case VALUES: return isSetValues(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TRestriction) return this.equals((TRestriction)that); return false; } public boolean equals(TRestriction that) { if (that == null) return false; if (this == that) return true; boolean this_present_database = true && this.isSetDatabase(); boolean that_present_database = true && that.isSetDatabase(); if (this_present_database || that_present_database) { if (!(this_present_database && that_present_database)) return false; if (!this.database.equals(that.database)) return false; } boolean this_present_table = true && this.isSetTable(); boolean that_present_table = true && that.isSetTable(); if (this_present_table || that_present_table) { if (!(this_present_table && that_present_table)) return false; if (!this.table.equals(that.table)) return false; } boolean this_present_column = true && this.isSetColumn(); boolean that_present_column = true && that.isSetColumn(); if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) return false; if (!this.column.equals(that.column)) return false; } boolean this_present_values = true && this.isSetValues(); boolean that_present_values = true && that.isSetValues(); if (this_present_values || that_present_values) { if (!(this_present_values && that_present_values)) return false; if (!this.values.equals(that.values)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetDatabase()) ? 131071 : 524287); if (isSetDatabase()) hashCode = hashCode * 8191 + database.hashCode(); hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287); if (isSetTable()) hashCode = hashCode * 8191 + table.hashCode(); hashCode = hashCode * 8191 + ((isSetColumn()) ? 131071 : 524287); if (isSetColumn()) hashCode = hashCode * 8191 + column.hashCode(); hashCode = hashCode * 8191 + ((isSetValues()) ? 131071 : 524287); if (isSetValues()) hashCode = hashCode * 8191 + values.hashCode(); return hashCode; } @Override public int compareTo(TRestriction other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetDatabase(), other.isSetDatabase()); if (lastComparison != 0) { return lastComparison; } if (isSetDatabase()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable(), other.isSetTable()); if (lastComparison != 0) { return lastComparison; } if (isSetTable()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetColumn(), other.isSetColumn()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, other.column); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetValues(), other.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TRestriction("); boolean first = true; sb.append("database:"); if (this.database == null) { sb.append("null"); } else { sb.append(this.database); } first = false; if (!first) sb.append(", "); sb.append("table:"); if (this.table == null) { sb.append("null"); } else { sb.append(this.table); } first = false; if (!first) sb.append(", "); sb.append("column:"); if (this.column == null) { sb.append("null"); } else { sb.append(this.column); } first = false; if (!first) sb.append(", "); sb.append("values:"); if (this.values == null) { sb.append("null"); } else { sb.append(this.values); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TRestrictionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TRestrictionStandardScheme getScheme() { return new TRestrictionStandardScheme(); } } private static class TRestrictionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TRestriction> { public void read(org.apache.thrift.protocol.TProtocol iprot, TRestriction struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DATABASE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.database = iprot.readString(); struct.setDatabaseIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table = iprot.readString(); struct.setTableIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COLUMN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.column = iprot.readString(); struct.setColumnIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // VALUES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); struct.values = new java.util.ArrayList<java.lang.String>(_list64.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem65; for (int _i66 = 0; _i66 < _list64.size; ++_i66) { _elem65 = iprot.readString(); struct.values.add(_elem65); } iprot.readListEnd(); } struct.setValuesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TRestriction struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.database != null) { oprot.writeFieldBegin(DATABASE_FIELD_DESC); oprot.writeString(struct.database); oprot.writeFieldEnd(); } if (struct.table != null) { oprot.writeFieldBegin(TABLE_FIELD_DESC); oprot.writeString(struct.table); oprot.writeFieldEnd(); } if (struct.column != null) { oprot.writeFieldBegin(COLUMN_FIELD_DESC); oprot.writeString(struct.column); oprot.writeFieldEnd(); } if (struct.values != null) { oprot.writeFieldBegin(VALUES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size())); for (java.lang.String _iter67 : struct.values) { oprot.writeString(_iter67); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TRestrictionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TRestrictionTupleScheme getScheme() { return new TRestrictionTupleScheme(); } } private static class TRestrictionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TRestriction> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TRestriction struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetDatabase()) { optionals.set(0); } if (struct.isSetTable()) { optionals.set(1); } if (struct.isSetColumn()) { optionals.set(2); } if (struct.isSetValues()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDatabase()) { oprot.writeString(struct.database); } if (struct.isSetTable()) { oprot.writeString(struct.table); } if (struct.isSetColumn()) { oprot.writeString(struct.column); } if (struct.isSetValues()) { { oprot.writeI32(struct.values.size()); for (java.lang.String _iter68 : struct.values) { oprot.writeString(_iter68); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TRestriction struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.database = iprot.readString(); struct.setDatabaseIsSet(true); } if (incoming.get(1)) { struct.table = iprot.readString(); struct.setTableIsSet(true); } if (incoming.get(2)) { struct.column = iprot.readString(); struct.setColumnIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list69 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.values = new java.util.ArrayList<java.lang.String>(_list69.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem70; for (int _i71 = 0; _i71 < _list69.size; ++_i71) { _elem70 = iprot.readString(); struct.values.add(_elem70); } } struct.setValuesIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TUserDefinedFunction.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TUserDefinedFunction implements org.apache.thrift.TBase<TUserDefinedFunction, TUserDefinedFunction._Fields>, java.io.Serializable, Cloneable, Comparable<TUserDefinedFunction> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TUserDefinedFunction"); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ARG_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("argTypes", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField RET_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("retType", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TUserDefinedFunctionStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TUserDefinedFunctionTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String name; // required public @org.apache.thrift.annotation.Nullable java.util.List<TExtArgumentType> argTypes; // required /** * * @see TExtArgumentType */ public @org.apache.thrift.annotation.Nullable TExtArgumentType retType; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { NAME((short)1, "name"), ARG_TYPES((short)2, "argTypes"), /** * * @see TExtArgumentType */ RET_TYPE((short)3, "retType"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // NAME return NAME; case 2: // ARG_TYPES return ARG_TYPES; case 3: // RET_TYPE return RET_TYPE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ARG_TYPES, new org.apache.thrift.meta_data.FieldMetaData("argTypes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TExtArgumentType.class)))); tmpMap.put(_Fields.RET_TYPE, new org.apache.thrift.meta_data.FieldMetaData("retType", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TExtArgumentType.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TUserDefinedFunction.class, metaDataMap); } public TUserDefinedFunction() { } public TUserDefinedFunction( java.lang.String name, java.util.List<TExtArgumentType> argTypes, TExtArgumentType retType) { this(); this.name = name; this.argTypes = argTypes; this.retType = retType; } /** * Performs a deep copy on <i>other</i>. */ public TUserDefinedFunction(TUserDefinedFunction other) { if (other.isSetName()) { this.name = other.name; } if (other.isSetArgTypes()) { java.util.List<TExtArgumentType> __this__argTypes = new java.util.ArrayList<TExtArgumentType>(other.argTypes.size()); for (TExtArgumentType other_element : other.argTypes) { __this__argTypes.add(other_element); } this.argTypes = __this__argTypes; } if (other.isSetRetType()) { this.retType = other.retType; } } public TUserDefinedFunction deepCopy() { return new TUserDefinedFunction(this); } @Override public void clear() { this.name = null; this.argTypes = null; this.retType = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getName() { return this.name; } public TUserDefinedFunction setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { this.name = name; return this; } public void unsetName() { this.name = null; } /** Returns true if field name is set (has been assigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } public void setNameIsSet(boolean value) { if (!value) { this.name = null; } } public int getArgTypesSize() { return (this.argTypes == null) ? 0 : this.argTypes.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TExtArgumentType> getArgTypesIterator() { return (this.argTypes == null) ? null : this.argTypes.iterator(); } public void addToArgTypes(TExtArgumentType elem) { if (this.argTypes == null) { this.argTypes = new java.util.ArrayList<TExtArgumentType>(); } this.argTypes.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TExtArgumentType> getArgTypes() { return this.argTypes; } public TUserDefinedFunction setArgTypes(@org.apache.thrift.annotation.Nullable java.util.List<TExtArgumentType> argTypes) { this.argTypes = argTypes; return this; } public void unsetArgTypes() { this.argTypes = null; } /** Returns true if field argTypes is set (has been assigned a value) and false otherwise */ public boolean isSetArgTypes() { return this.argTypes != null; } public void setArgTypesIsSet(boolean value) { if (!value) { this.argTypes = null; } } /** * * @see TExtArgumentType */ @org.apache.thrift.annotation.Nullable public TExtArgumentType getRetType() { return this.retType; } /** * * @see TExtArgumentType */ public TUserDefinedFunction setRetType(@org.apache.thrift.annotation.Nullable TExtArgumentType retType) { this.retType = retType; return this; } public void unsetRetType() { this.retType = null; } /** Returns true if field retType is set (has been assigned a value) and false otherwise */ public boolean isSetRetType() { return this.retType != null; } public void setRetTypeIsSet(boolean value) { if (!value) { this.retType = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case NAME: if (value == null) { unsetName(); } else { setName((java.lang.String)value); } break; case ARG_TYPES: if (value == null) { unsetArgTypes(); } else { setArgTypes((java.util.List<TExtArgumentType>)value); } break; case RET_TYPE: if (value == null) { unsetRetType(); } else { setRetType((TExtArgumentType)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case ARG_TYPES: return getArgTypes(); case RET_TYPE: return getRetType(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case ARG_TYPES: return isSetArgTypes(); case RET_TYPE: return isSetRetType(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TUserDefinedFunction) return this.equals((TUserDefinedFunction)that); return false; } public boolean equals(TUserDefinedFunction that) { if (that == null) return false; if (this == that) return true; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_argTypes = true && this.isSetArgTypes(); boolean that_present_argTypes = true && that.isSetArgTypes(); if (this_present_argTypes || that_present_argTypes) { if (!(this_present_argTypes && that_present_argTypes)) return false; if (!this.argTypes.equals(that.argTypes)) return false; } boolean this_present_retType = true && this.isSetRetType(); boolean that_present_retType = true && that.isSetRetType(); if (this_present_retType || that_present_retType) { if (!(this_present_retType && that_present_retType)) return false; if (!this.retType.equals(that.retType)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); if (isSetName()) hashCode = hashCode * 8191 + name.hashCode(); hashCode = hashCode * 8191 + ((isSetArgTypes()) ? 131071 : 524287); if (isSetArgTypes()) hashCode = hashCode * 8191 + argTypes.hashCode(); hashCode = hashCode * 8191 + ((isSetRetType()) ? 131071 : 524287); if (isSetRetType()) hashCode = hashCode * 8191 + retType.getValue(); return hashCode; } @Override public int compareTo(TUserDefinedFunction other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetArgTypes(), other.isSetArgTypes()); if (lastComparison != 0) { return lastComparison; } if (isSetArgTypes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.argTypes, other.argTypes); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRetType(), other.isSetRetType()); if (lastComparison != 0) { return lastComparison; } if (isSetRetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retType, other.retType); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TUserDefinedFunction("); boolean first = true; sb.append("name:"); if (this.name == null) { sb.append("null"); } else { sb.append(this.name); } first = false; if (!first) sb.append(", "); sb.append("argTypes:"); if (this.argTypes == null) { sb.append("null"); } else { sb.append(this.argTypes); } first = false; if (!first) sb.append(", "); sb.append("retType:"); if (this.retType == null) { sb.append("null"); } else { sb.append(this.retType); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TUserDefinedFunctionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TUserDefinedFunctionStandardScheme getScheme() { return new TUserDefinedFunctionStandardScheme(); } } private static class TUserDefinedFunctionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TUserDefinedFunction> { public void read(org.apache.thrift.protocol.TProtocol iprot, TUserDefinedFunction struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ARG_TYPES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.argTypes = new java.util.ArrayList<TExtArgumentType>(_list0.size); @org.apache.thrift.annotation.Nullable TExtArgumentType _elem1; for (int _i2 = 0; _i2 < _list0.size; ++_i2) { _elem1 = ai.heavy.thrift.calciteserver.TExtArgumentType.findByValue(iprot.readI32()); if (_elem1 != null) { struct.argTypes.add(_elem1); } } iprot.readListEnd(); } struct.setArgTypesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // RET_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.retType = ai.heavy.thrift.calciteserver.TExtArgumentType.findByValue(iprot.readI32()); struct.setRetTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TUserDefinedFunction struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } if (struct.argTypes != null) { oprot.writeFieldBegin(ARG_TYPES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.argTypes.size())); for (TExtArgumentType _iter3 : struct.argTypes) { oprot.writeI32(_iter3.getValue()); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.retType != null) { oprot.writeFieldBegin(RET_TYPE_FIELD_DESC); oprot.writeI32(struct.retType.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TUserDefinedFunctionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TUserDefinedFunctionTupleScheme getScheme() { return new TUserDefinedFunctionTupleScheme(); } } private static class TUserDefinedFunctionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TUserDefinedFunction> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TUserDefinedFunction struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetName()) { optionals.set(0); } if (struct.isSetArgTypes()) { optionals.set(1); } if (struct.isSetRetType()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetArgTypes()) { { oprot.writeI32(struct.argTypes.size()); for (TExtArgumentType _iter4 : struct.argTypes) { oprot.writeI32(_iter4.getValue()); } } } if (struct.isSetRetType()) { oprot.writeI32(struct.retType.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TUserDefinedFunction struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list5 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.argTypes = new java.util.ArrayList<TExtArgumentType>(_list5.size); @org.apache.thrift.annotation.Nullable TExtArgumentType _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = ai.heavy.thrift.calciteserver.TExtArgumentType.findByValue(iprot.readI32()); if (_elem6 != null) { struct.argTypes.add(_elem6); } } } struct.setArgTypesIsSet(true); } if (incoming.get(2)) { struct.retType = ai.heavy.thrift.calciteserver.TExtArgumentType.findByValue(iprot.readI32()); struct.setRetTypeIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/calciteserver/TUserDefinedTableFunction.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.calciteserver; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TUserDefinedTableFunction implements org.apache.thrift.TBase<TUserDefinedTableFunction, TUserDefinedTableFunction._Fields>, java.io.Serializable, Cloneable, Comparable<TUserDefinedTableFunction> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TUserDefinedTableFunction"); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField SIZER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("sizerType", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField SIZER_ARG_POS_FIELD_DESC = new org.apache.thrift.protocol.TField("sizerArgPos", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField INPUT_ARG_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("inputArgTypes", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.protocol.TField OUTPUT_ARG_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("outputArgTypes", org.apache.thrift.protocol.TType.LIST, (short)5); private static final org.apache.thrift.protocol.TField SQL_ARG_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("sqlArgTypes", org.apache.thrift.protocol.TType.LIST, (short)6); private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)7); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TUserDefinedTableFunctionStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TUserDefinedTableFunctionTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String name; // required /** * * @see TOutputBufferSizeType */ public @org.apache.thrift.annotation.Nullable TOutputBufferSizeType sizerType; // required public int sizerArgPos; // required public @org.apache.thrift.annotation.Nullable java.util.List<TExtArgumentType> inputArgTypes; // required public @org.apache.thrift.annotation.Nullable java.util.List<TExtArgumentType> outputArgTypes; // required public @org.apache.thrift.annotation.Nullable java.util.List<TExtArgumentType> sqlArgTypes; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.util.Map<java.lang.String,java.lang.String>> annotations; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { NAME((short)1, "name"), /** * * @see TOutputBufferSizeType */ SIZER_TYPE((short)2, "sizerType"), SIZER_ARG_POS((short)3, "sizerArgPos"), INPUT_ARG_TYPES((short)4, "inputArgTypes"), OUTPUT_ARG_TYPES((short)5, "outputArgTypes"), SQL_ARG_TYPES((short)6, "sqlArgTypes"), ANNOTATIONS((short)7, "annotations"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // NAME return NAME; case 2: // SIZER_TYPE return SIZER_TYPE; case 3: // SIZER_ARG_POS return SIZER_ARG_POS; case 4: // INPUT_ARG_TYPES return INPUT_ARG_TYPES; case 5: // OUTPUT_ARG_TYPES return OUTPUT_ARG_TYPES; case 6: // SQL_ARG_TYPES return SQL_ARG_TYPES; case 7: // ANNOTATIONS return ANNOTATIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SIZERARGPOS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.SIZER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("sizerType", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TOutputBufferSizeType.class))); tmpMap.put(_Fields.SIZER_ARG_POS, new org.apache.thrift.meta_data.FieldMetaData("sizerArgPos", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.INPUT_ARG_TYPES, new org.apache.thrift.meta_data.FieldMetaData("inputArgTypes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TExtArgumentType.class)))); tmpMap.put(_Fields.OUTPUT_ARG_TYPES, new org.apache.thrift.meta_data.FieldMetaData("outputArgTypes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TExtArgumentType.class)))); tmpMap.put(_Fields.SQL_ARG_TYPES, new org.apache.thrift.meta_data.FieldMetaData("sqlArgTypes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TExtArgumentType.class)))); tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TUserDefinedTableFunction.class, metaDataMap); } public TUserDefinedTableFunction() { } public TUserDefinedTableFunction( java.lang.String name, TOutputBufferSizeType sizerType, int sizerArgPos, java.util.List<TExtArgumentType> inputArgTypes, java.util.List<TExtArgumentType> outputArgTypes, java.util.List<TExtArgumentType> sqlArgTypes, java.util.List<java.util.Map<java.lang.String,java.lang.String>> annotations) { this(); this.name = name; this.sizerType = sizerType; this.sizerArgPos = sizerArgPos; setSizerArgPosIsSet(true); this.inputArgTypes = inputArgTypes; this.outputArgTypes = outputArgTypes; this.sqlArgTypes = sqlArgTypes; this.annotations = annotations; } /** * Performs a deep copy on <i>other</i>. */ public TUserDefinedTableFunction(TUserDefinedTableFunction other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetName()) { this.name = other.name; } if (other.isSetSizerType()) { this.sizerType = other.sizerType; } this.sizerArgPos = other.sizerArgPos; if (other.isSetInputArgTypes()) { java.util.List<TExtArgumentType> __this__inputArgTypes = new java.util.ArrayList<TExtArgumentType>(other.inputArgTypes.size()); for (TExtArgumentType other_element : other.inputArgTypes) { __this__inputArgTypes.add(other_element); } this.inputArgTypes = __this__inputArgTypes; } if (other.isSetOutputArgTypes()) { java.util.List<TExtArgumentType> __this__outputArgTypes = new java.util.ArrayList<TExtArgumentType>(other.outputArgTypes.size()); for (TExtArgumentType other_element : other.outputArgTypes) { __this__outputArgTypes.add(other_element); } this.outputArgTypes = __this__outputArgTypes; } if (other.isSetSqlArgTypes()) { java.util.List<TExtArgumentType> __this__sqlArgTypes = new java.util.ArrayList<TExtArgumentType>(other.sqlArgTypes.size()); for (TExtArgumentType other_element : other.sqlArgTypes) { __this__sqlArgTypes.add(other_element); } this.sqlArgTypes = __this__sqlArgTypes; } if (other.isSetAnnotations()) { java.util.List<java.util.Map<java.lang.String,java.lang.String>> __this__annotations = new java.util.ArrayList<java.util.Map<java.lang.String,java.lang.String>>(other.annotations.size()); for (java.util.Map<java.lang.String,java.lang.String> other_element : other.annotations) { java.util.Map<java.lang.String,java.lang.String> __this__annotations_copy = new java.util.HashMap<java.lang.String,java.lang.String>(other_element); __this__annotations.add(__this__annotations_copy); } this.annotations = __this__annotations; } } public TUserDefinedTableFunction deepCopy() { return new TUserDefinedTableFunction(this); } @Override public void clear() { this.name = null; this.sizerType = null; setSizerArgPosIsSet(false); this.sizerArgPos = 0; this.inputArgTypes = null; this.outputArgTypes = null; this.sqlArgTypes = null; this.annotations = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getName() { return this.name; } public TUserDefinedTableFunction setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { this.name = name; return this; } public void unsetName() { this.name = null; } /** Returns true if field name is set (has been assigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } public void setNameIsSet(boolean value) { if (!value) { this.name = null; } } /** * * @see TOutputBufferSizeType */ @org.apache.thrift.annotation.Nullable public TOutputBufferSizeType getSizerType() { return this.sizerType; } /** * * @see TOutputBufferSizeType */ public TUserDefinedTableFunction setSizerType(@org.apache.thrift.annotation.Nullable TOutputBufferSizeType sizerType) { this.sizerType = sizerType; return this; } public void unsetSizerType() { this.sizerType = null; } /** Returns true if field sizerType is set (has been assigned a value) and false otherwise */ public boolean isSetSizerType() { return this.sizerType != null; } public void setSizerTypeIsSet(boolean value) { if (!value) { this.sizerType = null; } } public int getSizerArgPos() { return this.sizerArgPos; } public TUserDefinedTableFunction setSizerArgPos(int sizerArgPos) { this.sizerArgPos = sizerArgPos; setSizerArgPosIsSet(true); return this; } public void unsetSizerArgPos() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SIZERARGPOS_ISSET_ID); } /** Returns true if field sizerArgPos is set (has been assigned a value) and false otherwise */ public boolean isSetSizerArgPos() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SIZERARGPOS_ISSET_ID); } public void setSizerArgPosIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SIZERARGPOS_ISSET_ID, value); } public int getInputArgTypesSize() { return (this.inputArgTypes == null) ? 0 : this.inputArgTypes.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TExtArgumentType> getInputArgTypesIterator() { return (this.inputArgTypes == null) ? null : this.inputArgTypes.iterator(); } public void addToInputArgTypes(TExtArgumentType elem) { if (this.inputArgTypes == null) { this.inputArgTypes = new java.util.ArrayList<TExtArgumentType>(); } this.inputArgTypes.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TExtArgumentType> getInputArgTypes() { return this.inputArgTypes; } public TUserDefinedTableFunction setInputArgTypes(@org.apache.thrift.annotation.Nullable java.util.List<TExtArgumentType> inputArgTypes) { this.inputArgTypes = inputArgTypes; return this; } public void unsetInputArgTypes() { this.inputArgTypes = null; } /** Returns true if field inputArgTypes is set (has been assigned a value) and false otherwise */ public boolean isSetInputArgTypes() { return this.inputArgTypes != null; } public void setInputArgTypesIsSet(boolean value) { if (!value) { this.inputArgTypes = null; } } public int getOutputArgTypesSize() { return (this.outputArgTypes == null) ? 0 : this.outputArgTypes.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TExtArgumentType> getOutputArgTypesIterator() { return (this.outputArgTypes == null) ? null : this.outputArgTypes.iterator(); } public void addToOutputArgTypes(TExtArgumentType elem) { if (this.outputArgTypes == null) { this.outputArgTypes = new java.util.ArrayList<TExtArgumentType>(); } this.outputArgTypes.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TExtArgumentType> getOutputArgTypes() { return this.outputArgTypes; } public TUserDefinedTableFunction setOutputArgTypes(@org.apache.thrift.annotation.Nullable java.util.List<TExtArgumentType> outputArgTypes) { this.outputArgTypes = outputArgTypes; return this; } public void unsetOutputArgTypes() { this.outputArgTypes = null; } /** Returns true if field outputArgTypes is set (has been assigned a value) and false otherwise */ public boolean isSetOutputArgTypes() { return this.outputArgTypes != null; } public void setOutputArgTypesIsSet(boolean value) { if (!value) { this.outputArgTypes = null; } } public int getSqlArgTypesSize() { return (this.sqlArgTypes == null) ? 0 : this.sqlArgTypes.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TExtArgumentType> getSqlArgTypesIterator() { return (this.sqlArgTypes == null) ? null : this.sqlArgTypes.iterator(); } public void addToSqlArgTypes(TExtArgumentType elem) { if (this.sqlArgTypes == null) { this.sqlArgTypes = new java.util.ArrayList<TExtArgumentType>(); } this.sqlArgTypes.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TExtArgumentType> getSqlArgTypes() { return this.sqlArgTypes; } public TUserDefinedTableFunction setSqlArgTypes(@org.apache.thrift.annotation.Nullable java.util.List<TExtArgumentType> sqlArgTypes) { this.sqlArgTypes = sqlArgTypes; return this; } public void unsetSqlArgTypes() { this.sqlArgTypes = null; } /** Returns true if field sqlArgTypes is set (has been assigned a value) and false otherwise */ public boolean isSetSqlArgTypes() { return this.sqlArgTypes != null; } public void setSqlArgTypesIsSet(boolean value) { if (!value) { this.sqlArgTypes = null; } } public int getAnnotationsSize() { return (this.annotations == null) ? 0 : this.annotations.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.util.Map<java.lang.String,java.lang.String>> getAnnotationsIterator() { return (this.annotations == null) ? null : this.annotations.iterator(); } public void addToAnnotations(java.util.Map<java.lang.String,java.lang.String> elem) { if (this.annotations == null) { this.annotations = new java.util.ArrayList<java.util.Map<java.lang.String,java.lang.String>>(); } this.annotations.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getAnnotations() { return this.annotations; } public TUserDefinedTableFunction setAnnotations(@org.apache.thrift.annotation.Nullable java.util.List<java.util.Map<java.lang.String,java.lang.String>> annotations) { this.annotations = annotations; return this; } public void unsetAnnotations() { this.annotations = null; } /** Returns true if field annotations is set (has been assigned a value) and false otherwise */ public boolean isSetAnnotations() { return this.annotations != null; } public void setAnnotationsIsSet(boolean value) { if (!value) { this.annotations = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case NAME: if (value == null) { unsetName(); } else { setName((java.lang.String)value); } break; case SIZER_TYPE: if (value == null) { unsetSizerType(); } else { setSizerType((TOutputBufferSizeType)value); } break; case SIZER_ARG_POS: if (value == null) { unsetSizerArgPos(); } else { setSizerArgPos((java.lang.Integer)value); } break; case INPUT_ARG_TYPES: if (value == null) { unsetInputArgTypes(); } else { setInputArgTypes((java.util.List<TExtArgumentType>)value); } break; case OUTPUT_ARG_TYPES: if (value == null) { unsetOutputArgTypes(); } else { setOutputArgTypes((java.util.List<TExtArgumentType>)value); } break; case SQL_ARG_TYPES: if (value == null) { unsetSqlArgTypes(); } else { setSqlArgTypes((java.util.List<TExtArgumentType>)value); } break; case ANNOTATIONS: if (value == null) { unsetAnnotations(); } else { setAnnotations((java.util.List<java.util.Map<java.lang.String,java.lang.String>>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case SIZER_TYPE: return getSizerType(); case SIZER_ARG_POS: return getSizerArgPos(); case INPUT_ARG_TYPES: return getInputArgTypes(); case OUTPUT_ARG_TYPES: return getOutputArgTypes(); case SQL_ARG_TYPES: return getSqlArgTypes(); case ANNOTATIONS: return getAnnotations(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case SIZER_TYPE: return isSetSizerType(); case SIZER_ARG_POS: return isSetSizerArgPos(); case INPUT_ARG_TYPES: return isSetInputArgTypes(); case OUTPUT_ARG_TYPES: return isSetOutputArgTypes(); case SQL_ARG_TYPES: return isSetSqlArgTypes(); case ANNOTATIONS: return isSetAnnotations(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TUserDefinedTableFunction) return this.equals((TUserDefinedTableFunction)that); return false; } public boolean equals(TUserDefinedTableFunction that) { if (that == null) return false; if (this == that) return true; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_sizerType = true && this.isSetSizerType(); boolean that_present_sizerType = true && that.isSetSizerType(); if (this_present_sizerType || that_present_sizerType) { if (!(this_present_sizerType && that_present_sizerType)) return false; if (!this.sizerType.equals(that.sizerType)) return false; } boolean this_present_sizerArgPos = true; boolean that_present_sizerArgPos = true; if (this_present_sizerArgPos || that_present_sizerArgPos) { if (!(this_present_sizerArgPos && that_present_sizerArgPos)) return false; if (this.sizerArgPos != that.sizerArgPos) return false; } boolean this_present_inputArgTypes = true && this.isSetInputArgTypes(); boolean that_present_inputArgTypes = true && that.isSetInputArgTypes(); if (this_present_inputArgTypes || that_present_inputArgTypes) { if (!(this_present_inputArgTypes && that_present_inputArgTypes)) return false; if (!this.inputArgTypes.equals(that.inputArgTypes)) return false; } boolean this_present_outputArgTypes = true && this.isSetOutputArgTypes(); boolean that_present_outputArgTypes = true && that.isSetOutputArgTypes(); if (this_present_outputArgTypes || that_present_outputArgTypes) { if (!(this_present_outputArgTypes && that_present_outputArgTypes)) return false; if (!this.outputArgTypes.equals(that.outputArgTypes)) return false; } boolean this_present_sqlArgTypes = true && this.isSetSqlArgTypes(); boolean that_present_sqlArgTypes = true && that.isSetSqlArgTypes(); if (this_present_sqlArgTypes || that_present_sqlArgTypes) { if (!(this_present_sqlArgTypes && that_present_sqlArgTypes)) return false; if (!this.sqlArgTypes.equals(that.sqlArgTypes)) return false; } boolean this_present_annotations = true && this.isSetAnnotations(); boolean that_present_annotations = true && that.isSetAnnotations(); if (this_present_annotations || that_present_annotations) { if (!(this_present_annotations && that_present_annotations)) return false; if (!this.annotations.equals(that.annotations)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); if (isSetName()) hashCode = hashCode * 8191 + name.hashCode(); hashCode = hashCode * 8191 + ((isSetSizerType()) ? 131071 : 524287); if (isSetSizerType()) hashCode = hashCode * 8191 + sizerType.getValue(); hashCode = hashCode * 8191 + sizerArgPos; hashCode = hashCode * 8191 + ((isSetInputArgTypes()) ? 131071 : 524287); if (isSetInputArgTypes()) hashCode = hashCode * 8191 + inputArgTypes.hashCode(); hashCode = hashCode * 8191 + ((isSetOutputArgTypes()) ? 131071 : 524287); if (isSetOutputArgTypes()) hashCode = hashCode * 8191 + outputArgTypes.hashCode(); hashCode = hashCode * 8191 + ((isSetSqlArgTypes()) ? 131071 : 524287); if (isSetSqlArgTypes()) hashCode = hashCode * 8191 + sqlArgTypes.hashCode(); hashCode = hashCode * 8191 + ((isSetAnnotations()) ? 131071 : 524287); if (isSetAnnotations()) hashCode = hashCode * 8191 + annotations.hashCode(); return hashCode; } @Override public int compareTo(TUserDefinedTableFunction other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSizerType(), other.isSetSizerType()); if (lastComparison != 0) { return lastComparison; } if (isSetSizerType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sizerType, other.sizerType); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSizerArgPos(), other.isSetSizerArgPos()); if (lastComparison != 0) { return lastComparison; } if (isSetSizerArgPos()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sizerArgPos, other.sizerArgPos); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetInputArgTypes(), other.isSetInputArgTypes()); if (lastComparison != 0) { return lastComparison; } if (isSetInputArgTypes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inputArgTypes, other.inputArgTypes); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOutputArgTypes(), other.isSetOutputArgTypes()); if (lastComparison != 0) { return lastComparison; } if (isSetOutputArgTypes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputArgTypes, other.outputArgTypes); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSqlArgTypes(), other.isSetSqlArgTypes()); if (lastComparison != 0) { return lastComparison; } if (isSetSqlArgTypes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlArgTypes, other.sqlArgTypes); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetAnnotations(), other.isSetAnnotations()); if (lastComparison != 0) { return lastComparison; } if (isSetAnnotations()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotations, other.annotations); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TUserDefinedTableFunction("); boolean first = true; sb.append("name:"); if (this.name == null) { sb.append("null"); } else { sb.append(this.name); } first = false; if (!first) sb.append(", "); sb.append("sizerType:"); if (this.sizerType == null) { sb.append("null"); } else { sb.append(this.sizerType); } first = false; if (!first) sb.append(", "); sb.append("sizerArgPos:"); sb.append(this.sizerArgPos); first = false; if (!first) sb.append(", "); sb.append("inputArgTypes:"); if (this.inputArgTypes == null) { sb.append("null"); } else { sb.append(this.inputArgTypes); } first = false; if (!first) sb.append(", "); sb.append("outputArgTypes:"); if (this.outputArgTypes == null) { sb.append("null"); } else { sb.append(this.outputArgTypes); } first = false; if (!first) sb.append(", "); sb.append("sqlArgTypes:"); if (this.sqlArgTypes == null) { sb.append("null"); } else { sb.append(this.sqlArgTypes); } first = false; if (!first) sb.append(", "); sb.append("annotations:"); if (this.annotations == null) { sb.append("null"); } else { sb.append(this.annotations); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TUserDefinedTableFunctionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TUserDefinedTableFunctionStandardScheme getScheme() { return new TUserDefinedTableFunctionStandardScheme(); } } private static class TUserDefinedTableFunctionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TUserDefinedTableFunction> { public void read(org.apache.thrift.protocol.TProtocol iprot, TUserDefinedTableFunction struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SIZER_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.sizerType = ai.heavy.thrift.calciteserver.TOutputBufferSizeType.findByValue(iprot.readI32()); struct.setSizerTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SIZER_ARG_POS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.sizerArgPos = iprot.readI32(); struct.setSizerArgPosIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // INPUT_ARG_TYPES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); struct.inputArgTypes = new java.util.ArrayList<TExtArgumentType>(_list8.size); @org.apache.thrift.annotation.Nullable TExtArgumentType _elem9; for (int _i10 = 0; _i10 < _list8.size; ++_i10) { _elem9 = ai.heavy.thrift.calciteserver.TExtArgumentType.findByValue(iprot.readI32()); if (_elem9 != null) { struct.inputArgTypes.add(_elem9); } } iprot.readListEnd(); } struct.setInputArgTypesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // OUTPUT_ARG_TYPES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list11 = iprot.readListBegin(); struct.outputArgTypes = new java.util.ArrayList<TExtArgumentType>(_list11.size); @org.apache.thrift.annotation.Nullable TExtArgumentType _elem12; for (int _i13 = 0; _i13 < _list11.size; ++_i13) { _elem12 = ai.heavy.thrift.calciteserver.TExtArgumentType.findByValue(iprot.readI32()); if (_elem12 != null) { struct.outputArgTypes.add(_elem12); } } iprot.readListEnd(); } struct.setOutputArgTypesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // SQL_ARG_TYPES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list14 = iprot.readListBegin(); struct.sqlArgTypes = new java.util.ArrayList<TExtArgumentType>(_list14.size); @org.apache.thrift.annotation.Nullable TExtArgumentType _elem15; for (int _i16 = 0; _i16 < _list14.size; ++_i16) { _elem15 = ai.heavy.thrift.calciteserver.TExtArgumentType.findByValue(iprot.readI32()); if (_elem15 != null) { struct.sqlArgTypes.add(_elem15); } } iprot.readListEnd(); } struct.setSqlArgTypesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // ANNOTATIONS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list17 = iprot.readListBegin(); struct.annotations = new java.util.ArrayList<java.util.Map<java.lang.String,java.lang.String>>(_list17.size); @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> _elem18; for (int _i19 = 0; _i19 < _list17.size; ++_i19) { { org.apache.thrift.protocol.TMap _map20 = iprot.readMapBegin(); _elem18 = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map20.size); @org.apache.thrift.annotation.Nullable java.lang.String _key21; @org.apache.thrift.annotation.Nullable java.lang.String _val22; for (int _i23 = 0; _i23 < _map20.size; ++_i23) { _key21 = iprot.readString(); _val22 = iprot.readString(); _elem18.put(_key21, _val22); } iprot.readMapEnd(); } struct.annotations.add(_elem18); } iprot.readListEnd(); } struct.setAnnotationsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TUserDefinedTableFunction struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } if (struct.sizerType != null) { oprot.writeFieldBegin(SIZER_TYPE_FIELD_DESC); oprot.writeI32(struct.sizerType.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(SIZER_ARG_POS_FIELD_DESC); oprot.writeI32(struct.sizerArgPos); oprot.writeFieldEnd(); if (struct.inputArgTypes != null) { oprot.writeFieldBegin(INPUT_ARG_TYPES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.inputArgTypes.size())); for (TExtArgumentType _iter24 : struct.inputArgTypes) { oprot.writeI32(_iter24.getValue()); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.outputArgTypes != null) { oprot.writeFieldBegin(OUTPUT_ARG_TYPES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.outputArgTypes.size())); for (TExtArgumentType _iter25 : struct.outputArgTypes) { oprot.writeI32(_iter25.getValue()); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.sqlArgTypes != null) { oprot.writeFieldBegin(SQL_ARG_TYPES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.sqlArgTypes.size())); for (TExtArgumentType _iter26 : struct.sqlArgTypes) { oprot.writeI32(_iter26.getValue()); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.annotations != null) { oprot.writeFieldBegin(ANNOTATIONS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.annotations.size())); for (java.util.Map<java.lang.String,java.lang.String> _iter27 : struct.annotations) { { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter27.size())); for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter28 : _iter27.entrySet()) { oprot.writeString(_iter28.getKey()); oprot.writeString(_iter28.getValue()); } oprot.writeMapEnd(); } } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TUserDefinedTableFunctionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TUserDefinedTableFunctionTupleScheme getScheme() { return new TUserDefinedTableFunctionTupleScheme(); } } private static class TUserDefinedTableFunctionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TUserDefinedTableFunction> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TUserDefinedTableFunction struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetName()) { optionals.set(0); } if (struct.isSetSizerType()) { optionals.set(1); } if (struct.isSetSizerArgPos()) { optionals.set(2); } if (struct.isSetInputArgTypes()) { optionals.set(3); } if (struct.isSetOutputArgTypes()) { optionals.set(4); } if (struct.isSetSqlArgTypes()) { optionals.set(5); } if (struct.isSetAnnotations()) { optionals.set(6); } oprot.writeBitSet(optionals, 7); if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetSizerType()) { oprot.writeI32(struct.sizerType.getValue()); } if (struct.isSetSizerArgPos()) { oprot.writeI32(struct.sizerArgPos); } if (struct.isSetInputArgTypes()) { { oprot.writeI32(struct.inputArgTypes.size()); for (TExtArgumentType _iter29 : struct.inputArgTypes) { oprot.writeI32(_iter29.getValue()); } } } if (struct.isSetOutputArgTypes()) { { oprot.writeI32(struct.outputArgTypes.size()); for (TExtArgumentType _iter30 : struct.outputArgTypes) { oprot.writeI32(_iter30.getValue()); } } } if (struct.isSetSqlArgTypes()) { { oprot.writeI32(struct.sqlArgTypes.size()); for (TExtArgumentType _iter31 : struct.sqlArgTypes) { oprot.writeI32(_iter31.getValue()); } } } if (struct.isSetAnnotations()) { { oprot.writeI32(struct.annotations.size()); for (java.util.Map<java.lang.String,java.lang.String> _iter32 : struct.annotations) { { oprot.writeI32(_iter32.size()); for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter33 : _iter32.entrySet()) { oprot.writeString(_iter33.getKey()); oprot.writeString(_iter33.getValue()); } } } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TUserDefinedTableFunction struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } if (incoming.get(1)) { struct.sizerType = ai.heavy.thrift.calciteserver.TOutputBufferSizeType.findByValue(iprot.readI32()); struct.setSizerTypeIsSet(true); } if (incoming.get(2)) { struct.sizerArgPos = iprot.readI32(); struct.setSizerArgPosIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list34 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.inputArgTypes = new java.util.ArrayList<TExtArgumentType>(_list34.size); @org.apache.thrift.annotation.Nullable TExtArgumentType _elem35; for (int _i36 = 0; _i36 < _list34.size; ++_i36) { _elem35 = ai.heavy.thrift.calciteserver.TExtArgumentType.findByValue(iprot.readI32()); if (_elem35 != null) { struct.inputArgTypes.add(_elem35); } } } struct.setInputArgTypesIsSet(true); } if (incoming.get(4)) { { org.apache.thrift.protocol.TList _list37 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.outputArgTypes = new java.util.ArrayList<TExtArgumentType>(_list37.size); @org.apache.thrift.annotation.Nullable TExtArgumentType _elem38; for (int _i39 = 0; _i39 < _list37.size; ++_i39) { _elem38 = ai.heavy.thrift.calciteserver.TExtArgumentType.findByValue(iprot.readI32()); if (_elem38 != null) { struct.outputArgTypes.add(_elem38); } } } struct.setOutputArgTypesIsSet(true); } if (incoming.get(5)) { { org.apache.thrift.protocol.TList _list40 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.sqlArgTypes = new java.util.ArrayList<TExtArgumentType>(_list40.size); @org.apache.thrift.annotation.Nullable TExtArgumentType _elem41; for (int _i42 = 0; _i42 < _list40.size; ++_i42) { _elem41 = ai.heavy.thrift.calciteserver.TExtArgumentType.findByValue(iprot.readI32()); if (_elem41 != null) { struct.sqlArgTypes.add(_elem41); } } } struct.setSqlArgTypesIsSet(true); } if (incoming.get(6)) { { org.apache.thrift.protocol.TList _list43 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); struct.annotations = new java.util.ArrayList<java.util.Map<java.lang.String,java.lang.String>>(_list43.size); @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> _elem44; for (int _i45 = 0; _i45 < _list43.size; ++_i45) { { org.apache.thrift.protocol.TMap _map46 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); _elem44 = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map46.size); @org.apache.thrift.annotation.Nullable java.lang.String _key47; @org.apache.thrift.annotation.Nullable java.lang.String _val48; for (int _i49 = 0; _i49 < _map46.size; ++_i49) { _key47 = iprot.readString(); _val48 = iprot.readString(); _elem44.put(_key47, _val48); } } struct.annotations.add(_elem44); } } struct.setAnnotationsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/Heavy.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class Heavy { public interface Iface { public java.lang.String connect(java.lang.String user, java.lang.String passwd, java.lang.String dbname) throws TDBException, org.apache.thrift.TException; public TKrb5Session krb5_connect(java.lang.String inputToken, java.lang.String dbname) throws TDBException, org.apache.thrift.TException; public void disconnect(java.lang.String session) throws TDBException, org.apache.thrift.TException; public void switch_database(java.lang.String session, java.lang.String dbname) throws TDBException, org.apache.thrift.TException; public java.lang.String clone_session(java.lang.String session) throws TDBException, org.apache.thrift.TException; public TServerStatus get_server_status(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<TServerStatus> get_status(java.lang.String session) throws TDBException, org.apache.thrift.TException; public TClusterHardwareInfo get_hardware_info(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_tables(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_tables_for_database(java.lang.String session, java.lang.String database_name) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_physical_tables(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_views(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<TTableMeta> get_tables_meta(java.lang.String session) throws TDBException, org.apache.thrift.TException; public TTableDetails get_table_details(java.lang.String session, java.lang.String table_name) throws TDBException, org.apache.thrift.TException; public TTableDetails get_table_details_for_database(java.lang.String session, java.lang.String table_name, java.lang.String database_name) throws TDBException, org.apache.thrift.TException; public TTableDetails get_internal_table_details(java.lang.String session, java.lang.String table_name, boolean include_system_columns) throws TDBException, org.apache.thrift.TException; public TTableDetails get_internal_table_details_for_database(java.lang.String session, java.lang.String table_name, java.lang.String database_name) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_users(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<TDBInfo> get_databases(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.lang.String get_version() throws TDBException, org.apache.thrift.TException; public void start_heap_profile(java.lang.String session) throws TDBException, org.apache.thrift.TException; public void stop_heap_profile(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.lang.String get_heap_profile(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<TNodeMemoryInfo> get_memory(java.lang.String session, java.lang.String memory_level) throws TDBException, org.apache.thrift.TException; public void clear_cpu_memory(java.lang.String session) throws TDBException, org.apache.thrift.TException; public void clear_gpu_memory(java.lang.String session) throws TDBException, org.apache.thrift.TException; public void set_cur_session(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel) throws TDBException, org.apache.thrift.TException; public void invalidate_cur_session(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel) throws TDBException, org.apache.thrift.TException; public void set_table_epoch(java.lang.String session, int db_id, int table_id, int new_epoch) throws TDBException, org.apache.thrift.TException; public void set_table_epoch_by_name(java.lang.String session, java.lang.String table_name, int new_epoch) throws TDBException, org.apache.thrift.TException; public int get_table_epoch(java.lang.String session, int db_id, int table_id) throws org.apache.thrift.TException; public int get_table_epoch_by_name(java.lang.String session, java.lang.String table_name) throws org.apache.thrift.TException; public java.util.List<TTableEpochInfo> get_table_epochs(java.lang.String session, int db_id, int table_id) throws org.apache.thrift.TException; public void set_table_epochs(java.lang.String session, int db_id, java.util.List<TTableEpochInfo> table_epochs) throws org.apache.thrift.TException; public TSessionInfo get_session_info(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<TQueryInfo> get_queries_info(java.lang.String session) throws TDBException, org.apache.thrift.TException; public void set_leaf_info(java.lang.String session, TLeafInfo leaf_info) throws TDBException, org.apache.thrift.TException; public TQueryResult sql_execute(java.lang.String session, java.lang.String query, boolean column_format, java.lang.String nonce, int first_n, int at_most_n) throws TDBException, org.apache.thrift.TException; public TDataFrame sql_execute_df(java.lang.String session, java.lang.String query, ai.heavy.thrift.server.TDeviceType device_type, int device_id, int first_n, TArrowTransport transport_method) throws TDBException, org.apache.thrift.TException; public TDataFrame sql_execute_gdf(java.lang.String session, java.lang.String query, int device_id, int first_n) throws TDBException, org.apache.thrift.TException; public void deallocate_df(java.lang.String session, TDataFrame df, ai.heavy.thrift.server.TDeviceType device_type, int device_id) throws TDBException, org.apache.thrift.TException; public void interrupt(java.lang.String query_session, java.lang.String interrupt_session) throws TDBException, org.apache.thrift.TException; public java.util.List<TColumnType> sql_validate(java.lang.String session, java.lang.String query) throws TDBException, org.apache.thrift.TException; public java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> get_completion_hints(java.lang.String session, java.lang.String sql, int cursor) throws TDBException, org.apache.thrift.TException; public void set_execution_mode(java.lang.String session, TExecuteMode mode) throws TDBException, org.apache.thrift.TException; public TRenderResult render_vega(java.lang.String session, long widget_id, java.lang.String vega_json, int compression_level, java.lang.String nonce) throws TDBException, org.apache.thrift.TException; public TPixelTableRowResult get_result_row_for_pixel(java.lang.String session, long widget_id, TPixel pixel, java.util.Map<java.lang.String,java.util.List<java.lang.String>> table_col_names, boolean column_format, int pixelRadius, java.lang.String nonce) throws TDBException, org.apache.thrift.TException; public int create_custom_expression(java.lang.String session, TCustomExpression custom_expression) throws TDBException, org.apache.thrift.TException; public java.util.List<TCustomExpression> get_custom_expressions(java.lang.String session) throws TDBException, org.apache.thrift.TException; public void update_custom_expression(java.lang.String session, int id, java.lang.String expression_json) throws TDBException, org.apache.thrift.TException; public void delete_custom_expressions(java.lang.String session, java.util.List<java.lang.Integer> custom_expression_ids, boolean do_soft_delete) throws TDBException, org.apache.thrift.TException; public TDashboard get_dashboard(java.lang.String session, int dashboard_id) throws TDBException, org.apache.thrift.TException; public java.util.List<TDashboard> get_dashboards(java.lang.String session) throws TDBException, org.apache.thrift.TException; public int create_dashboard(java.lang.String session, java.lang.String dashboard_name, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata) throws TDBException, org.apache.thrift.TException; public void replace_dashboard(java.lang.String session, int dashboard_id, java.lang.String dashboard_name, java.lang.String dashboard_owner, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata) throws TDBException, org.apache.thrift.TException; public void delete_dashboard(java.lang.String session, int dashboard_id) throws TDBException, org.apache.thrift.TException; public void share_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions) throws TDBException, org.apache.thrift.TException; public void delete_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids) throws TDBException, org.apache.thrift.TException; public void share_dashboard(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions, boolean grant_role) throws TDBException, org.apache.thrift.TException; public void unshare_dashboard(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions) throws TDBException, org.apache.thrift.TException; public void unshare_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions) throws TDBException, org.apache.thrift.TException; public java.util.List<TDashboardGrantees> get_dashboard_grantees(java.lang.String session, int dashboard_id) throws TDBException, org.apache.thrift.TException; public TFrontendView get_link_view(java.lang.String session, java.lang.String link) throws TDBException, org.apache.thrift.TException; public java.lang.String create_link(java.lang.String session, java.lang.String view_state, java.lang.String view_metadata) throws TDBException, org.apache.thrift.TException; public void load_table_binary(java.lang.String session, java.lang.String table_name, java.util.List<TRow> rows, java.util.List<java.lang.String> column_names) throws TDBException, org.apache.thrift.TException; public void load_table_binary_columnar(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names) throws TDBException, org.apache.thrift.TException; public void load_table_binary_columnar_polys(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names, boolean assign_render_groups) throws TDBException, org.apache.thrift.TException; public void load_table_binary_arrow(java.lang.String session, java.lang.String table_name, java.nio.ByteBuffer arrow_stream, boolean use_column_names) throws TDBException, org.apache.thrift.TException; public void load_table(java.lang.String session, java.lang.String table_name, java.util.List<TStringRow> rows, java.util.List<java.lang.String> column_names) throws TDBException, org.apache.thrift.TException; public TDetectResult detect_column_types(java.lang.String session, java.lang.String file_name, TCopyParams copy_params) throws TDBException, org.apache.thrift.TException; public void create_table(java.lang.String session, java.lang.String table_name, java.util.List<TColumnType> row_desc, TCreateParams create_params) throws TDBException, org.apache.thrift.TException; public void import_table(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params) throws TDBException, org.apache.thrift.TException; public void import_geo_table(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params, java.util.List<TColumnType> row_desc, TCreateParams create_params) throws TDBException, org.apache.thrift.TException; public TImportStatus import_table_status(java.lang.String session, java.lang.String import_id) throws TDBException, org.apache.thrift.TException; public java.lang.String get_first_geo_file_in_archive(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_all_files_in_archive(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params) throws TDBException, org.apache.thrift.TException; public java.util.List<TGeoFileLayerInfo> get_layers_in_geo_file(java.lang.String session, java.lang.String file_name, TCopyParams copy_params) throws TDBException, org.apache.thrift.TException; public long query_get_outer_fragment_count(java.lang.String session, java.lang.String query) throws TDBException, org.apache.thrift.TException; public TTableMeta check_table_consistency(java.lang.String session, int table_id) throws TDBException, org.apache.thrift.TException; public TPendingQuery start_query(java.lang.String leaf_session, java.lang.String parent_session, java.lang.String query_ra, java.lang.String start_time_str, boolean just_explain, java.util.List<java.lang.Long> outer_fragment_indices) throws TDBException, org.apache.thrift.TException; public TStepResult execute_query_step(TPendingQuery pending_query, long subquery_id, java.lang.String start_time_str) throws TDBException, org.apache.thrift.TException; public void broadcast_serialized_rows(ai.heavy.thrift.server.TSerializedRows serialized_rows, java.util.List<TColumnType> row_desc, long query_id, long subquery_id, boolean is_final_subquery_result) throws TDBException, org.apache.thrift.TException; public TPendingRenderQuery start_render_query(java.lang.String session, long widget_id, short node_idx, java.lang.String vega_json) throws TDBException, org.apache.thrift.TException; public TRenderStepResult execute_next_render_step(TPendingRenderQuery pending_render, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> merged_data) throws TDBException, org.apache.thrift.TException; public void insert_data(java.lang.String session, TInsertData insert_data) throws TDBException, org.apache.thrift.TException; public void insert_chunks(java.lang.String session, TInsertChunks insert_chunks) throws TDBException, org.apache.thrift.TException; public void checkpoint(java.lang.String session, int table_id) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_roles(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<TDBObject> get_db_objects_for_grantee(java.lang.String session, java.lang.String roleName) throws TDBException, org.apache.thrift.TException; public java.util.List<TDBObject> get_db_object_privs(java.lang.String session, java.lang.String objectName, TDBObjectType type) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_all_roles_for_user(java.lang.String session, java.lang.String userName) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_all_effective_roles_for_user(java.lang.String session, java.lang.String userName) throws TDBException, org.apache.thrift.TException; public boolean has_role(java.lang.String session, java.lang.String granteeName, java.lang.String roleName) throws TDBException, org.apache.thrift.TException; public boolean has_object_privilege(java.lang.String session, java.lang.String granteeName, java.lang.String ObjectName, TDBObjectType objectType, TDBObjectPermissions permissions) throws TDBException, org.apache.thrift.TException; public TLicenseInfo set_license_key(java.lang.String session, java.lang.String key, java.lang.String nonce) throws TDBException, org.apache.thrift.TException; public TLicenseInfo get_license_claims(java.lang.String session, java.lang.String nonce) throws TDBException, org.apache.thrift.TException; public java.util.Map<java.lang.String,java.lang.String> get_device_parameters(java.lang.String session) throws TDBException, org.apache.thrift.TException; public void register_runtime_extension_functions(java.lang.String session, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, java.util.Map<java.lang.String,java.lang.String> device_ir_map) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_table_function_names(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_runtime_table_function_names(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> get_table_function_details(java.lang.String session, java.util.List<java.lang.String> udtf_names) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_function_names(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<java.lang.String> get_runtime_function_names(java.lang.String session) throws TDBException, org.apache.thrift.TException; public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> get_function_details(java.lang.String session, java.util.List<java.lang.String> udf_names) throws TDBException, org.apache.thrift.TException; } public interface AsyncIface { public void connect(java.lang.String user, java.lang.String passwd, java.lang.String dbname, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException; public void krb5_connect(java.lang.String inputToken, java.lang.String dbname, org.apache.thrift.async.AsyncMethodCallback<TKrb5Session> resultHandler) throws org.apache.thrift.TException; public void disconnect(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void switch_database(java.lang.String session, java.lang.String dbname, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void clone_session(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException; public void get_server_status(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<TServerStatus> resultHandler) throws org.apache.thrift.TException; public void get_status(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TServerStatus>> resultHandler) throws org.apache.thrift.TException; public void get_hardware_info(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<TClusterHardwareInfo> resultHandler) throws org.apache.thrift.TException; public void get_tables(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_tables_for_database(java.lang.String session, java.lang.String database_name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_physical_tables(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_views(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_tables_meta(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableMeta>> resultHandler) throws org.apache.thrift.TException; public void get_table_details(java.lang.String session, java.lang.String table_name, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException; public void get_table_details_for_database(java.lang.String session, java.lang.String table_name, java.lang.String database_name, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException; public void get_internal_table_details(java.lang.String session, java.lang.String table_name, boolean include_system_columns, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException; public void get_internal_table_details_for_database(java.lang.String session, java.lang.String table_name, java.lang.String database_name, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException; public void get_users(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_databases(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBInfo>> resultHandler) throws org.apache.thrift.TException; public void get_version(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException; public void start_heap_profile(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void stop_heap_profile(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void get_heap_profile(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException; public void get_memory(java.lang.String session, java.lang.String memory_level, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TNodeMemoryInfo>> resultHandler) throws org.apache.thrift.TException; public void clear_cpu_memory(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void clear_gpu_memory(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void set_cur_session(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void invalidate_cur_session(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void set_table_epoch(java.lang.String session, int db_id, int table_id, int new_epoch, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void set_table_epoch_by_name(java.lang.String session, java.lang.String table_name, int new_epoch, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void get_table_epoch(java.lang.String session, int db_id, int table_id, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException; public void get_table_epoch_by_name(java.lang.String session, java.lang.String table_name, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException; public void get_table_epochs(java.lang.String session, int db_id, int table_id, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableEpochInfo>> resultHandler) throws org.apache.thrift.TException; public void set_table_epochs(java.lang.String session, int db_id, java.util.List<TTableEpochInfo> table_epochs, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void get_session_info(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<TSessionInfo> resultHandler) throws org.apache.thrift.TException; public void get_queries_info(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TQueryInfo>> resultHandler) throws org.apache.thrift.TException; public void set_leaf_info(java.lang.String session, TLeafInfo leaf_info, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void sql_execute(java.lang.String session, java.lang.String query, boolean column_format, java.lang.String nonce, int first_n, int at_most_n, org.apache.thrift.async.AsyncMethodCallback<TQueryResult> resultHandler) throws org.apache.thrift.TException; public void sql_execute_df(java.lang.String session, java.lang.String query, ai.heavy.thrift.server.TDeviceType device_type, int device_id, int first_n, TArrowTransport transport_method, org.apache.thrift.async.AsyncMethodCallback<TDataFrame> resultHandler) throws org.apache.thrift.TException; public void sql_execute_gdf(java.lang.String session, java.lang.String query, int device_id, int first_n, org.apache.thrift.async.AsyncMethodCallback<TDataFrame> resultHandler) throws org.apache.thrift.TException; public void deallocate_df(java.lang.String session, TDataFrame df, ai.heavy.thrift.server.TDeviceType device_type, int device_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void interrupt(java.lang.String query_session, java.lang.String interrupt_session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void sql_validate(java.lang.String session, java.lang.String query, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TColumnType>> resultHandler) throws org.apache.thrift.TException; public void get_completion_hints(java.lang.String session, java.lang.String sql, int cursor, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> resultHandler) throws org.apache.thrift.TException; public void set_execution_mode(java.lang.String session, TExecuteMode mode, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void render_vega(java.lang.String session, long widget_id, java.lang.String vega_json, int compression_level, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TRenderResult> resultHandler) throws org.apache.thrift.TException; public void get_result_row_for_pixel(java.lang.String session, long widget_id, TPixel pixel, java.util.Map<java.lang.String,java.util.List<java.lang.String>> table_col_names, boolean column_format, int pixelRadius, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TPixelTableRowResult> resultHandler) throws org.apache.thrift.TException; public void create_custom_expression(java.lang.String session, TCustomExpression custom_expression, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException; public void get_custom_expressions(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCustomExpression>> resultHandler) throws org.apache.thrift.TException; public void update_custom_expression(java.lang.String session, int id, java.lang.String expression_json, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void delete_custom_expressions(java.lang.String session, java.util.List<java.lang.Integer> custom_expression_ids, boolean do_soft_delete, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void get_dashboard(java.lang.String session, int dashboard_id, org.apache.thrift.async.AsyncMethodCallback<TDashboard> resultHandler) throws org.apache.thrift.TException; public void get_dashboards(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboard>> resultHandler) throws org.apache.thrift.TException; public void create_dashboard(java.lang.String session, java.lang.String dashboard_name, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException; public void replace_dashboard(java.lang.String session, int dashboard_id, java.lang.String dashboard_name, java.lang.String dashboard_owner, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void delete_dashboard(java.lang.String session, int dashboard_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void share_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void delete_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void share_dashboard(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions, boolean grant_role, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void unshare_dashboard(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void unshare_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void get_dashboard_grantees(java.lang.String session, int dashboard_id, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboardGrantees>> resultHandler) throws org.apache.thrift.TException; public void get_link_view(java.lang.String session, java.lang.String link, org.apache.thrift.async.AsyncMethodCallback<TFrontendView> resultHandler) throws org.apache.thrift.TException; public void create_link(java.lang.String session, java.lang.String view_state, java.lang.String view_metadata, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException; public void load_table_binary(java.lang.String session, java.lang.String table_name, java.util.List<TRow> rows, java.util.List<java.lang.String> column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void load_table_binary_columnar(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void load_table_binary_columnar_polys(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names, boolean assign_render_groups, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void load_table_binary_arrow(java.lang.String session, java.lang.String table_name, java.nio.ByteBuffer arrow_stream, boolean use_column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void load_table(java.lang.String session, java.lang.String table_name, java.util.List<TStringRow> rows, java.util.List<java.lang.String> column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void detect_column_types(java.lang.String session, java.lang.String file_name, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<TDetectResult> resultHandler) throws org.apache.thrift.TException; public void create_table(java.lang.String session, java.lang.String table_name, java.util.List<TColumnType> row_desc, TCreateParams create_params, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void import_table(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void import_geo_table(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params, java.util.List<TColumnType> row_desc, TCreateParams create_params, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void import_table_status(java.lang.String session, java.lang.String import_id, org.apache.thrift.async.AsyncMethodCallback<TImportStatus> resultHandler) throws org.apache.thrift.TException; public void get_first_geo_file_in_archive(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException; public void get_all_files_in_archive(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_layers_in_geo_file(java.lang.String session, java.lang.String file_name, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TGeoFileLayerInfo>> resultHandler) throws org.apache.thrift.TException; public void query_get_outer_fragment_count(java.lang.String session, java.lang.String query, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException; public void check_table_consistency(java.lang.String session, int table_id, org.apache.thrift.async.AsyncMethodCallback<TTableMeta> resultHandler) throws org.apache.thrift.TException; public void start_query(java.lang.String leaf_session, java.lang.String parent_session, java.lang.String query_ra, java.lang.String start_time_str, boolean just_explain, java.util.List<java.lang.Long> outer_fragment_indices, org.apache.thrift.async.AsyncMethodCallback<TPendingQuery> resultHandler) throws org.apache.thrift.TException; public void execute_query_step(TPendingQuery pending_query, long subquery_id, java.lang.String start_time_str, org.apache.thrift.async.AsyncMethodCallback<TStepResult> resultHandler) throws org.apache.thrift.TException; public void broadcast_serialized_rows(ai.heavy.thrift.server.TSerializedRows serialized_rows, java.util.List<TColumnType> row_desc, long query_id, long subquery_id, boolean is_final_subquery_result, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void start_render_query(java.lang.String session, long widget_id, short node_idx, java.lang.String vega_json, org.apache.thrift.async.AsyncMethodCallback<TPendingRenderQuery> resultHandler) throws org.apache.thrift.TException; public void execute_next_render_step(TPendingRenderQuery pending_render, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> merged_data, org.apache.thrift.async.AsyncMethodCallback<TRenderStepResult> resultHandler) throws org.apache.thrift.TException; public void insert_data(java.lang.String session, TInsertData insert_data, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void insert_chunks(java.lang.String session, TInsertChunks insert_chunks, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void checkpoint(java.lang.String session, int table_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void get_roles(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_db_objects_for_grantee(java.lang.String session, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>> resultHandler) throws org.apache.thrift.TException; public void get_db_object_privs(java.lang.String session, java.lang.String objectName, TDBObjectType type, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>> resultHandler) throws org.apache.thrift.TException; public void get_all_roles_for_user(java.lang.String session, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_all_effective_roles_for_user(java.lang.String session, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void has_role(java.lang.String session, java.lang.String granteeName, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException; public void has_object_privilege(java.lang.String session, java.lang.String granteeName, java.lang.String ObjectName, TDBObjectType objectType, TDBObjectPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException; public void set_license_key(java.lang.String session, java.lang.String key, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo> resultHandler) throws org.apache.thrift.TException; public void get_license_claims(java.lang.String session, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo> resultHandler) throws org.apache.thrift.TException; public void get_device_parameters(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void register_runtime_extension_functions(java.lang.String session, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, java.util.Map<java.lang.String,java.lang.String> device_ir_map, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; public void get_table_function_names(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_runtime_table_function_names(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_table_function_details(java.lang.String session, java.util.List<java.lang.String> udtf_names, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>> resultHandler) throws org.apache.thrift.TException; public void get_function_names(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_runtime_function_names(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException; public void get_function_details(java.lang.String session, java.util.List<java.lang.String> udf_names, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>> resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public java.lang.String connect(java.lang.String user, java.lang.String passwd, java.lang.String dbname) throws TDBException, org.apache.thrift.TException { send_connect(user, passwd, dbname); return recv_connect(); } public void send_connect(java.lang.String user, java.lang.String passwd, java.lang.String dbname) throws org.apache.thrift.TException { connect_args args = new connect_args(); args.setUser(user); args.setPasswd(passwd); args.setDbname(dbname); sendBase("connect", args); } public java.lang.String recv_connect() throws TDBException, org.apache.thrift.TException { connect_result result = new connect_result(); receiveBase(result, "connect"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "connect failed: unknown result"); } public TKrb5Session krb5_connect(java.lang.String inputToken, java.lang.String dbname) throws TDBException, org.apache.thrift.TException { send_krb5_connect(inputToken, dbname); return recv_krb5_connect(); } public void send_krb5_connect(java.lang.String inputToken, java.lang.String dbname) throws org.apache.thrift.TException { krb5_connect_args args = new krb5_connect_args(); args.setInputToken(inputToken); args.setDbname(dbname); sendBase("krb5_connect", args); } public TKrb5Session recv_krb5_connect() throws TDBException, org.apache.thrift.TException { krb5_connect_result result = new krb5_connect_result(); receiveBase(result, "krb5_connect"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "krb5_connect failed: unknown result"); } public void disconnect(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_disconnect(session); recv_disconnect(); } public void send_disconnect(java.lang.String session) throws org.apache.thrift.TException { disconnect_args args = new disconnect_args(); args.setSession(session); sendBase("disconnect", args); } public void recv_disconnect() throws TDBException, org.apache.thrift.TException { disconnect_result result = new disconnect_result(); receiveBase(result, "disconnect"); if (result.e != null) { throw result.e; } return; } public void switch_database(java.lang.String session, java.lang.String dbname) throws TDBException, org.apache.thrift.TException { send_switch_database(session, dbname); recv_switch_database(); } public void send_switch_database(java.lang.String session, java.lang.String dbname) throws org.apache.thrift.TException { switch_database_args args = new switch_database_args(); args.setSession(session); args.setDbname(dbname); sendBase("switch_database", args); } public void recv_switch_database() throws TDBException, org.apache.thrift.TException { switch_database_result result = new switch_database_result(); receiveBase(result, "switch_database"); if (result.e != null) { throw result.e; } return; } public java.lang.String clone_session(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_clone_session(session); return recv_clone_session(); } public void send_clone_session(java.lang.String session) throws org.apache.thrift.TException { clone_session_args args = new clone_session_args(); args.setSession(session); sendBase("clone_session", args); } public java.lang.String recv_clone_session() throws TDBException, org.apache.thrift.TException { clone_session_result result = new clone_session_result(); receiveBase(result, "clone_session"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "clone_session failed: unknown result"); } public TServerStatus get_server_status(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_server_status(session); return recv_get_server_status(); } public void send_get_server_status(java.lang.String session) throws org.apache.thrift.TException { get_server_status_args args = new get_server_status_args(); args.setSession(session); sendBase("get_server_status", args); } public TServerStatus recv_get_server_status() throws TDBException, org.apache.thrift.TException { get_server_status_result result = new get_server_status_result(); receiveBase(result, "get_server_status"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_server_status failed: unknown result"); } public java.util.List<TServerStatus> get_status(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_status(session); return recv_get_status(); } public void send_get_status(java.lang.String session) throws org.apache.thrift.TException { get_status_args args = new get_status_args(); args.setSession(session); sendBase("get_status", args); } public java.util.List<TServerStatus> recv_get_status() throws TDBException, org.apache.thrift.TException { get_status_result result = new get_status_result(); receiveBase(result, "get_status"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_status failed: unknown result"); } public TClusterHardwareInfo get_hardware_info(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_hardware_info(session); return recv_get_hardware_info(); } public void send_get_hardware_info(java.lang.String session) throws org.apache.thrift.TException { get_hardware_info_args args = new get_hardware_info_args(); args.setSession(session); sendBase("get_hardware_info", args); } public TClusterHardwareInfo recv_get_hardware_info() throws TDBException, org.apache.thrift.TException { get_hardware_info_result result = new get_hardware_info_result(); receiveBase(result, "get_hardware_info"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_hardware_info failed: unknown result"); } public java.util.List<java.lang.String> get_tables(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_tables(session); return recv_get_tables(); } public void send_get_tables(java.lang.String session) throws org.apache.thrift.TException { get_tables_args args = new get_tables_args(); args.setSession(session); sendBase("get_tables", args); } public java.util.List<java.lang.String> recv_get_tables() throws TDBException, org.apache.thrift.TException { get_tables_result result = new get_tables_result(); receiveBase(result, "get_tables"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_tables failed: unknown result"); } public java.util.List<java.lang.String> get_tables_for_database(java.lang.String session, java.lang.String database_name) throws TDBException, org.apache.thrift.TException { send_get_tables_for_database(session, database_name); return recv_get_tables_for_database(); } public void send_get_tables_for_database(java.lang.String session, java.lang.String database_name) throws org.apache.thrift.TException { get_tables_for_database_args args = new get_tables_for_database_args(); args.setSession(session); args.setDatabase_name(database_name); sendBase("get_tables_for_database", args); } public java.util.List<java.lang.String> recv_get_tables_for_database() throws TDBException, org.apache.thrift.TException { get_tables_for_database_result result = new get_tables_for_database_result(); receiveBase(result, "get_tables_for_database"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_tables_for_database failed: unknown result"); } public java.util.List<java.lang.String> get_physical_tables(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_physical_tables(session); return recv_get_physical_tables(); } public void send_get_physical_tables(java.lang.String session) throws org.apache.thrift.TException { get_physical_tables_args args = new get_physical_tables_args(); args.setSession(session); sendBase("get_physical_tables", args); } public java.util.List<java.lang.String> recv_get_physical_tables() throws TDBException, org.apache.thrift.TException { get_physical_tables_result result = new get_physical_tables_result(); receiveBase(result, "get_physical_tables"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_physical_tables failed: unknown result"); } public java.util.List<java.lang.String> get_views(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_views(session); return recv_get_views(); } public void send_get_views(java.lang.String session) throws org.apache.thrift.TException { get_views_args args = new get_views_args(); args.setSession(session); sendBase("get_views", args); } public java.util.List<java.lang.String> recv_get_views() throws TDBException, org.apache.thrift.TException { get_views_result result = new get_views_result(); receiveBase(result, "get_views"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_views failed: unknown result"); } public java.util.List<TTableMeta> get_tables_meta(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_tables_meta(session); return recv_get_tables_meta(); } public void send_get_tables_meta(java.lang.String session) throws org.apache.thrift.TException { get_tables_meta_args args = new get_tables_meta_args(); args.setSession(session); sendBase("get_tables_meta", args); } public java.util.List<TTableMeta> recv_get_tables_meta() throws TDBException, org.apache.thrift.TException { get_tables_meta_result result = new get_tables_meta_result(); receiveBase(result, "get_tables_meta"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_tables_meta failed: unknown result"); } public TTableDetails get_table_details(java.lang.String session, java.lang.String table_name) throws TDBException, org.apache.thrift.TException { send_get_table_details(session, table_name); return recv_get_table_details(); } public void send_get_table_details(java.lang.String session, java.lang.String table_name) throws org.apache.thrift.TException { get_table_details_args args = new get_table_details_args(); args.setSession(session); args.setTable_name(table_name); sendBase("get_table_details", args); } public TTableDetails recv_get_table_details() throws TDBException, org.apache.thrift.TException { get_table_details_result result = new get_table_details_result(); receiveBase(result, "get_table_details"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_details failed: unknown result"); } public TTableDetails get_table_details_for_database(java.lang.String session, java.lang.String table_name, java.lang.String database_name) throws TDBException, org.apache.thrift.TException { send_get_table_details_for_database(session, table_name, database_name); return recv_get_table_details_for_database(); } public void send_get_table_details_for_database(java.lang.String session, java.lang.String table_name, java.lang.String database_name) throws org.apache.thrift.TException { get_table_details_for_database_args args = new get_table_details_for_database_args(); args.setSession(session); args.setTable_name(table_name); args.setDatabase_name(database_name); sendBase("get_table_details_for_database", args); } public TTableDetails recv_get_table_details_for_database() throws TDBException, org.apache.thrift.TException { get_table_details_for_database_result result = new get_table_details_for_database_result(); receiveBase(result, "get_table_details_for_database"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_details_for_database failed: unknown result"); } public TTableDetails get_internal_table_details(java.lang.String session, java.lang.String table_name, boolean include_system_columns) throws TDBException, org.apache.thrift.TException { send_get_internal_table_details(session, table_name, include_system_columns); return recv_get_internal_table_details(); } public void send_get_internal_table_details(java.lang.String session, java.lang.String table_name, boolean include_system_columns) throws org.apache.thrift.TException { get_internal_table_details_args args = new get_internal_table_details_args(); args.setSession(session); args.setTable_name(table_name); args.setInclude_system_columns(include_system_columns); sendBase("get_internal_table_details", args); } public TTableDetails recv_get_internal_table_details() throws TDBException, org.apache.thrift.TException { get_internal_table_details_result result = new get_internal_table_details_result(); receiveBase(result, "get_internal_table_details"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_internal_table_details failed: unknown result"); } public TTableDetails get_internal_table_details_for_database(java.lang.String session, java.lang.String table_name, java.lang.String database_name) throws TDBException, org.apache.thrift.TException { send_get_internal_table_details_for_database(session, table_name, database_name); return recv_get_internal_table_details_for_database(); } public void send_get_internal_table_details_for_database(java.lang.String session, java.lang.String table_name, java.lang.String database_name) throws org.apache.thrift.TException { get_internal_table_details_for_database_args args = new get_internal_table_details_for_database_args(); args.setSession(session); args.setTable_name(table_name); args.setDatabase_name(database_name); sendBase("get_internal_table_details_for_database", args); } public TTableDetails recv_get_internal_table_details_for_database() throws TDBException, org.apache.thrift.TException { get_internal_table_details_for_database_result result = new get_internal_table_details_for_database_result(); receiveBase(result, "get_internal_table_details_for_database"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_internal_table_details_for_database failed: unknown result"); } public java.util.List<java.lang.String> get_users(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_users(session); return recv_get_users(); } public void send_get_users(java.lang.String session) throws org.apache.thrift.TException { get_users_args args = new get_users_args(); args.setSession(session); sendBase("get_users", args); } public java.util.List<java.lang.String> recv_get_users() throws TDBException, org.apache.thrift.TException { get_users_result result = new get_users_result(); receiveBase(result, "get_users"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_users failed: unknown result"); } public java.util.List<TDBInfo> get_databases(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_databases(session); return recv_get_databases(); } public void send_get_databases(java.lang.String session) throws org.apache.thrift.TException { get_databases_args args = new get_databases_args(); args.setSession(session); sendBase("get_databases", args); } public java.util.List<TDBInfo> recv_get_databases() throws TDBException, org.apache.thrift.TException { get_databases_result result = new get_databases_result(); receiveBase(result, "get_databases"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_databases failed: unknown result"); } public java.lang.String get_version() throws TDBException, org.apache.thrift.TException { send_get_version(); return recv_get_version(); } public void send_get_version() throws org.apache.thrift.TException { get_version_args args = new get_version_args(); sendBase("get_version", args); } public java.lang.String recv_get_version() throws TDBException, org.apache.thrift.TException { get_version_result result = new get_version_result(); receiveBase(result, "get_version"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_version failed: unknown result"); } public void start_heap_profile(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_start_heap_profile(session); recv_start_heap_profile(); } public void send_start_heap_profile(java.lang.String session) throws org.apache.thrift.TException { start_heap_profile_args args = new start_heap_profile_args(); args.setSession(session); sendBase("start_heap_profile", args); } public void recv_start_heap_profile() throws TDBException, org.apache.thrift.TException { start_heap_profile_result result = new start_heap_profile_result(); receiveBase(result, "start_heap_profile"); if (result.e != null) { throw result.e; } return; } public void stop_heap_profile(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_stop_heap_profile(session); recv_stop_heap_profile(); } public void send_stop_heap_profile(java.lang.String session) throws org.apache.thrift.TException { stop_heap_profile_args args = new stop_heap_profile_args(); args.setSession(session); sendBase("stop_heap_profile", args); } public void recv_stop_heap_profile() throws TDBException, org.apache.thrift.TException { stop_heap_profile_result result = new stop_heap_profile_result(); receiveBase(result, "stop_heap_profile"); if (result.e != null) { throw result.e; } return; } public java.lang.String get_heap_profile(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_heap_profile(session); return recv_get_heap_profile(); } public void send_get_heap_profile(java.lang.String session) throws org.apache.thrift.TException { get_heap_profile_args args = new get_heap_profile_args(); args.setSession(session); sendBase("get_heap_profile", args); } public java.lang.String recv_get_heap_profile() throws TDBException, org.apache.thrift.TException { get_heap_profile_result result = new get_heap_profile_result(); receiveBase(result, "get_heap_profile"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_heap_profile failed: unknown result"); } public java.util.List<TNodeMemoryInfo> get_memory(java.lang.String session, java.lang.String memory_level) throws TDBException, org.apache.thrift.TException { send_get_memory(session, memory_level); return recv_get_memory(); } public void send_get_memory(java.lang.String session, java.lang.String memory_level) throws org.apache.thrift.TException { get_memory_args args = new get_memory_args(); args.setSession(session); args.setMemory_level(memory_level); sendBase("get_memory", args); } public java.util.List<TNodeMemoryInfo> recv_get_memory() throws TDBException, org.apache.thrift.TException { get_memory_result result = new get_memory_result(); receiveBase(result, "get_memory"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_memory failed: unknown result"); } public void clear_cpu_memory(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_clear_cpu_memory(session); recv_clear_cpu_memory(); } public void send_clear_cpu_memory(java.lang.String session) throws org.apache.thrift.TException { clear_cpu_memory_args args = new clear_cpu_memory_args(); args.setSession(session); sendBase("clear_cpu_memory", args); } public void recv_clear_cpu_memory() throws TDBException, org.apache.thrift.TException { clear_cpu_memory_result result = new clear_cpu_memory_result(); receiveBase(result, "clear_cpu_memory"); if (result.e != null) { throw result.e; } return; } public void clear_gpu_memory(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_clear_gpu_memory(session); recv_clear_gpu_memory(); } public void send_clear_gpu_memory(java.lang.String session) throws org.apache.thrift.TException { clear_gpu_memory_args args = new clear_gpu_memory_args(); args.setSession(session); sendBase("clear_gpu_memory", args); } public void recv_clear_gpu_memory() throws TDBException, org.apache.thrift.TException { clear_gpu_memory_result result = new clear_gpu_memory_result(); receiveBase(result, "clear_gpu_memory"); if (result.e != null) { throw result.e; } return; } public void set_cur_session(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel) throws TDBException, org.apache.thrift.TException { send_set_cur_session(parent_session, leaf_session, start_time_str, label, for_running_query_kernel); recv_set_cur_session(); } public void send_set_cur_session(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel) throws org.apache.thrift.TException { set_cur_session_args args = new set_cur_session_args(); args.setParent_session(parent_session); args.setLeaf_session(leaf_session); args.setStart_time_str(start_time_str); args.setLabel(label); args.setFor_running_query_kernel(for_running_query_kernel); sendBase("set_cur_session", args); } public void recv_set_cur_session() throws TDBException, org.apache.thrift.TException { set_cur_session_result result = new set_cur_session_result(); receiveBase(result, "set_cur_session"); if (result.e != null) { throw result.e; } return; } public void invalidate_cur_session(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel) throws TDBException, org.apache.thrift.TException { send_invalidate_cur_session(parent_session, leaf_session, start_time_str, label, for_running_query_kernel); recv_invalidate_cur_session(); } public void send_invalidate_cur_session(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel) throws org.apache.thrift.TException { invalidate_cur_session_args args = new invalidate_cur_session_args(); args.setParent_session(parent_session); args.setLeaf_session(leaf_session); args.setStart_time_str(start_time_str); args.setLabel(label); args.setFor_running_query_kernel(for_running_query_kernel); sendBase("invalidate_cur_session", args); } public void recv_invalidate_cur_session() throws TDBException, org.apache.thrift.TException { invalidate_cur_session_result result = new invalidate_cur_session_result(); receiveBase(result, "invalidate_cur_session"); if (result.e != null) { throw result.e; } return; } public void set_table_epoch(java.lang.String session, int db_id, int table_id, int new_epoch) throws TDBException, org.apache.thrift.TException { send_set_table_epoch(session, db_id, table_id, new_epoch); recv_set_table_epoch(); } public void send_set_table_epoch(java.lang.String session, int db_id, int table_id, int new_epoch) throws org.apache.thrift.TException { set_table_epoch_args args = new set_table_epoch_args(); args.setSession(session); args.setDb_id(db_id); args.setTable_id(table_id); args.setNew_epoch(new_epoch); sendBase("set_table_epoch", args); } public void recv_set_table_epoch() throws TDBException, org.apache.thrift.TException { set_table_epoch_result result = new set_table_epoch_result(); receiveBase(result, "set_table_epoch"); if (result.e != null) { throw result.e; } return; } public void set_table_epoch_by_name(java.lang.String session, java.lang.String table_name, int new_epoch) throws TDBException, org.apache.thrift.TException { send_set_table_epoch_by_name(session, table_name, new_epoch); recv_set_table_epoch_by_name(); } public void send_set_table_epoch_by_name(java.lang.String session, java.lang.String table_name, int new_epoch) throws org.apache.thrift.TException { set_table_epoch_by_name_args args = new set_table_epoch_by_name_args(); args.setSession(session); args.setTable_name(table_name); args.setNew_epoch(new_epoch); sendBase("set_table_epoch_by_name", args); } public void recv_set_table_epoch_by_name() throws TDBException, org.apache.thrift.TException { set_table_epoch_by_name_result result = new set_table_epoch_by_name_result(); receiveBase(result, "set_table_epoch_by_name"); if (result.e != null) { throw result.e; } return; } public int get_table_epoch(java.lang.String session, int db_id, int table_id) throws org.apache.thrift.TException { send_get_table_epoch(session, db_id, table_id); return recv_get_table_epoch(); } public void send_get_table_epoch(java.lang.String session, int db_id, int table_id) throws org.apache.thrift.TException { get_table_epoch_args args = new get_table_epoch_args(); args.setSession(session); args.setDb_id(db_id); args.setTable_id(table_id); sendBase("get_table_epoch", args); } public int recv_get_table_epoch() throws org.apache.thrift.TException { get_table_epoch_result result = new get_table_epoch_result(); receiveBase(result, "get_table_epoch"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_epoch failed: unknown result"); } public int get_table_epoch_by_name(java.lang.String session, java.lang.String table_name) throws org.apache.thrift.TException { send_get_table_epoch_by_name(session, table_name); return recv_get_table_epoch_by_name(); } public void send_get_table_epoch_by_name(java.lang.String session, java.lang.String table_name) throws org.apache.thrift.TException { get_table_epoch_by_name_args args = new get_table_epoch_by_name_args(); args.setSession(session); args.setTable_name(table_name); sendBase("get_table_epoch_by_name", args); } public int recv_get_table_epoch_by_name() throws org.apache.thrift.TException { get_table_epoch_by_name_result result = new get_table_epoch_by_name_result(); receiveBase(result, "get_table_epoch_by_name"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_epoch_by_name failed: unknown result"); } public java.util.List<TTableEpochInfo> get_table_epochs(java.lang.String session, int db_id, int table_id) throws org.apache.thrift.TException { send_get_table_epochs(session, db_id, table_id); return recv_get_table_epochs(); } public void send_get_table_epochs(java.lang.String session, int db_id, int table_id) throws org.apache.thrift.TException { get_table_epochs_args args = new get_table_epochs_args(); args.setSession(session); args.setDb_id(db_id); args.setTable_id(table_id); sendBase("get_table_epochs", args); } public java.util.List<TTableEpochInfo> recv_get_table_epochs() throws org.apache.thrift.TException { get_table_epochs_result result = new get_table_epochs_result(); receiveBase(result, "get_table_epochs"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_epochs failed: unknown result"); } public void set_table_epochs(java.lang.String session, int db_id, java.util.List<TTableEpochInfo> table_epochs) throws org.apache.thrift.TException { send_set_table_epochs(session, db_id, table_epochs); recv_set_table_epochs(); } public void send_set_table_epochs(java.lang.String session, int db_id, java.util.List<TTableEpochInfo> table_epochs) throws org.apache.thrift.TException { set_table_epochs_args args = new set_table_epochs_args(); args.setSession(session); args.setDb_id(db_id); args.setTable_epochs(table_epochs); sendBase("set_table_epochs", args); } public void recv_set_table_epochs() throws org.apache.thrift.TException { set_table_epochs_result result = new set_table_epochs_result(); receiveBase(result, "set_table_epochs"); return; } public TSessionInfo get_session_info(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_session_info(session); return recv_get_session_info(); } public void send_get_session_info(java.lang.String session) throws org.apache.thrift.TException { get_session_info_args args = new get_session_info_args(); args.setSession(session); sendBase("get_session_info", args); } public TSessionInfo recv_get_session_info() throws TDBException, org.apache.thrift.TException { get_session_info_result result = new get_session_info_result(); receiveBase(result, "get_session_info"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_session_info failed: unknown result"); } public java.util.List<TQueryInfo> get_queries_info(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_queries_info(session); return recv_get_queries_info(); } public void send_get_queries_info(java.lang.String session) throws org.apache.thrift.TException { get_queries_info_args args = new get_queries_info_args(); args.setSession(session); sendBase("get_queries_info", args); } public java.util.List<TQueryInfo> recv_get_queries_info() throws TDBException, org.apache.thrift.TException { get_queries_info_result result = new get_queries_info_result(); receiveBase(result, "get_queries_info"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_queries_info failed: unknown result"); } public void set_leaf_info(java.lang.String session, TLeafInfo leaf_info) throws TDBException, org.apache.thrift.TException { send_set_leaf_info(session, leaf_info); recv_set_leaf_info(); } public void send_set_leaf_info(java.lang.String session, TLeafInfo leaf_info) throws org.apache.thrift.TException { set_leaf_info_args args = new set_leaf_info_args(); args.setSession(session); args.setLeaf_info(leaf_info); sendBase("set_leaf_info", args); } public void recv_set_leaf_info() throws TDBException, org.apache.thrift.TException { set_leaf_info_result result = new set_leaf_info_result(); receiveBase(result, "set_leaf_info"); if (result.e != null) { throw result.e; } return; } public TQueryResult sql_execute(java.lang.String session, java.lang.String query, boolean column_format, java.lang.String nonce, int first_n, int at_most_n) throws TDBException, org.apache.thrift.TException { send_sql_execute(session, query, column_format, nonce, first_n, at_most_n); return recv_sql_execute(); } public void send_sql_execute(java.lang.String session, java.lang.String query, boolean column_format, java.lang.String nonce, int first_n, int at_most_n) throws org.apache.thrift.TException { sql_execute_args args = new sql_execute_args(); args.setSession(session); args.setQuery(query); args.setColumn_format(column_format); args.setNonce(nonce); args.setFirst_n(first_n); args.setAt_most_n(at_most_n); sendBase("sql_execute", args); } public TQueryResult recv_sql_execute() throws TDBException, org.apache.thrift.TException { sql_execute_result result = new sql_execute_result(); receiveBase(result, "sql_execute"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sql_execute failed: unknown result"); } public TDataFrame sql_execute_df(java.lang.String session, java.lang.String query, ai.heavy.thrift.server.TDeviceType device_type, int device_id, int first_n, TArrowTransport transport_method) throws TDBException, org.apache.thrift.TException { send_sql_execute_df(session, query, device_type, device_id, first_n, transport_method); return recv_sql_execute_df(); } public void send_sql_execute_df(java.lang.String session, java.lang.String query, ai.heavy.thrift.server.TDeviceType device_type, int device_id, int first_n, TArrowTransport transport_method) throws org.apache.thrift.TException { sql_execute_df_args args = new sql_execute_df_args(); args.setSession(session); args.setQuery(query); args.setDevice_type(device_type); args.setDevice_id(device_id); args.setFirst_n(first_n); args.setTransport_method(transport_method); sendBase("sql_execute_df", args); } public TDataFrame recv_sql_execute_df() throws TDBException, org.apache.thrift.TException { sql_execute_df_result result = new sql_execute_df_result(); receiveBase(result, "sql_execute_df"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sql_execute_df failed: unknown result"); } public TDataFrame sql_execute_gdf(java.lang.String session, java.lang.String query, int device_id, int first_n) throws TDBException, org.apache.thrift.TException { send_sql_execute_gdf(session, query, device_id, first_n); return recv_sql_execute_gdf(); } public void send_sql_execute_gdf(java.lang.String session, java.lang.String query, int device_id, int first_n) throws org.apache.thrift.TException { sql_execute_gdf_args args = new sql_execute_gdf_args(); args.setSession(session); args.setQuery(query); args.setDevice_id(device_id); args.setFirst_n(first_n); sendBase("sql_execute_gdf", args); } public TDataFrame recv_sql_execute_gdf() throws TDBException, org.apache.thrift.TException { sql_execute_gdf_result result = new sql_execute_gdf_result(); receiveBase(result, "sql_execute_gdf"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sql_execute_gdf failed: unknown result"); } public void deallocate_df(java.lang.String session, TDataFrame df, ai.heavy.thrift.server.TDeviceType device_type, int device_id) throws TDBException, org.apache.thrift.TException { send_deallocate_df(session, df, device_type, device_id); recv_deallocate_df(); } public void send_deallocate_df(java.lang.String session, TDataFrame df, ai.heavy.thrift.server.TDeviceType device_type, int device_id) throws org.apache.thrift.TException { deallocate_df_args args = new deallocate_df_args(); args.setSession(session); args.setDf(df); args.setDevice_type(device_type); args.setDevice_id(device_id); sendBase("deallocate_df", args); } public void recv_deallocate_df() throws TDBException, org.apache.thrift.TException { deallocate_df_result result = new deallocate_df_result(); receiveBase(result, "deallocate_df"); if (result.e != null) { throw result.e; } return; } public void interrupt(java.lang.String query_session, java.lang.String interrupt_session) throws TDBException, org.apache.thrift.TException { send_interrupt(query_session, interrupt_session); recv_interrupt(); } public void send_interrupt(java.lang.String query_session, java.lang.String interrupt_session) throws org.apache.thrift.TException { interrupt_args args = new interrupt_args(); args.setQuery_session(query_session); args.setInterrupt_session(interrupt_session); sendBase("interrupt", args); } public void recv_interrupt() throws TDBException, org.apache.thrift.TException { interrupt_result result = new interrupt_result(); receiveBase(result, "interrupt"); if (result.e != null) { throw result.e; } return; } public java.util.List<TColumnType> sql_validate(java.lang.String session, java.lang.String query) throws TDBException, org.apache.thrift.TException { send_sql_validate(session, query); return recv_sql_validate(); } public void send_sql_validate(java.lang.String session, java.lang.String query) throws org.apache.thrift.TException { sql_validate_args args = new sql_validate_args(); args.setSession(session); args.setQuery(query); sendBase("sql_validate", args); } public java.util.List<TColumnType> recv_sql_validate() throws TDBException, org.apache.thrift.TException { sql_validate_result result = new sql_validate_result(); receiveBase(result, "sql_validate"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sql_validate failed: unknown result"); } public java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> get_completion_hints(java.lang.String session, java.lang.String sql, int cursor) throws TDBException, org.apache.thrift.TException { send_get_completion_hints(session, sql, cursor); return recv_get_completion_hints(); } public void send_get_completion_hints(java.lang.String session, java.lang.String sql, int cursor) throws org.apache.thrift.TException { get_completion_hints_args args = new get_completion_hints_args(); args.setSession(session); args.setSql(sql); args.setCursor(cursor); sendBase("get_completion_hints", args); } public java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> recv_get_completion_hints() throws TDBException, org.apache.thrift.TException { get_completion_hints_result result = new get_completion_hints_result(); receiveBase(result, "get_completion_hints"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_completion_hints failed: unknown result"); } public void set_execution_mode(java.lang.String session, TExecuteMode mode) throws TDBException, org.apache.thrift.TException { send_set_execution_mode(session, mode); recv_set_execution_mode(); } public void send_set_execution_mode(java.lang.String session, TExecuteMode mode) throws org.apache.thrift.TException { set_execution_mode_args args = new set_execution_mode_args(); args.setSession(session); args.setMode(mode); sendBase("set_execution_mode", args); } public void recv_set_execution_mode() throws TDBException, org.apache.thrift.TException { set_execution_mode_result result = new set_execution_mode_result(); receiveBase(result, "set_execution_mode"); if (result.e != null) { throw result.e; } return; } public TRenderResult render_vega(java.lang.String session, long widget_id, java.lang.String vega_json, int compression_level, java.lang.String nonce) throws TDBException, org.apache.thrift.TException { send_render_vega(session, widget_id, vega_json, compression_level, nonce); return recv_render_vega(); } public void send_render_vega(java.lang.String session, long widget_id, java.lang.String vega_json, int compression_level, java.lang.String nonce) throws org.apache.thrift.TException { render_vega_args args = new render_vega_args(); args.setSession(session); args.setWidget_id(widget_id); args.setVega_json(vega_json); args.setCompression_level(compression_level); args.setNonce(nonce); sendBase("render_vega", args); } public TRenderResult recv_render_vega() throws TDBException, org.apache.thrift.TException { render_vega_result result = new render_vega_result(); receiveBase(result, "render_vega"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "render_vega failed: unknown result"); } public TPixelTableRowResult get_result_row_for_pixel(java.lang.String session, long widget_id, TPixel pixel, java.util.Map<java.lang.String,java.util.List<java.lang.String>> table_col_names, boolean column_format, int pixelRadius, java.lang.String nonce) throws TDBException, org.apache.thrift.TException { send_get_result_row_for_pixel(session, widget_id, pixel, table_col_names, column_format, pixelRadius, nonce); return recv_get_result_row_for_pixel(); } public void send_get_result_row_for_pixel(java.lang.String session, long widget_id, TPixel pixel, java.util.Map<java.lang.String,java.util.List<java.lang.String>> table_col_names, boolean column_format, int pixelRadius, java.lang.String nonce) throws org.apache.thrift.TException { get_result_row_for_pixel_args args = new get_result_row_for_pixel_args(); args.setSession(session); args.setWidget_id(widget_id); args.setPixel(pixel); args.setTable_col_names(table_col_names); args.setColumn_format(column_format); args.setPixelRadius(pixelRadius); args.setNonce(nonce); sendBase("get_result_row_for_pixel", args); } public TPixelTableRowResult recv_get_result_row_for_pixel() throws TDBException, org.apache.thrift.TException { get_result_row_for_pixel_result result = new get_result_row_for_pixel_result(); receiveBase(result, "get_result_row_for_pixel"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_result_row_for_pixel failed: unknown result"); } public int create_custom_expression(java.lang.String session, TCustomExpression custom_expression) throws TDBException, org.apache.thrift.TException { send_create_custom_expression(session, custom_expression); return recv_create_custom_expression(); } public void send_create_custom_expression(java.lang.String session, TCustomExpression custom_expression) throws org.apache.thrift.TException { create_custom_expression_args args = new create_custom_expression_args(); args.setSession(session); args.setCustom_expression(custom_expression); sendBase("create_custom_expression", args); } public int recv_create_custom_expression() throws TDBException, org.apache.thrift.TException { create_custom_expression_result result = new create_custom_expression_result(); receiveBase(result, "create_custom_expression"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_custom_expression failed: unknown result"); } public java.util.List<TCustomExpression> get_custom_expressions(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_custom_expressions(session); return recv_get_custom_expressions(); } public void send_get_custom_expressions(java.lang.String session) throws org.apache.thrift.TException { get_custom_expressions_args args = new get_custom_expressions_args(); args.setSession(session); sendBase("get_custom_expressions", args); } public java.util.List<TCustomExpression> recv_get_custom_expressions() throws TDBException, org.apache.thrift.TException { get_custom_expressions_result result = new get_custom_expressions_result(); receiveBase(result, "get_custom_expressions"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_custom_expressions failed: unknown result"); } public void update_custom_expression(java.lang.String session, int id, java.lang.String expression_json) throws TDBException, org.apache.thrift.TException { send_update_custom_expression(session, id, expression_json); recv_update_custom_expression(); } public void send_update_custom_expression(java.lang.String session, int id, java.lang.String expression_json) throws org.apache.thrift.TException { update_custom_expression_args args = new update_custom_expression_args(); args.setSession(session); args.setId(id); args.setExpression_json(expression_json); sendBase("update_custom_expression", args); } public void recv_update_custom_expression() throws TDBException, org.apache.thrift.TException { update_custom_expression_result result = new update_custom_expression_result(); receiveBase(result, "update_custom_expression"); if (result.e != null) { throw result.e; } return; } public void delete_custom_expressions(java.lang.String session, java.util.List<java.lang.Integer> custom_expression_ids, boolean do_soft_delete) throws TDBException, org.apache.thrift.TException { send_delete_custom_expressions(session, custom_expression_ids, do_soft_delete); recv_delete_custom_expressions(); } public void send_delete_custom_expressions(java.lang.String session, java.util.List<java.lang.Integer> custom_expression_ids, boolean do_soft_delete) throws org.apache.thrift.TException { delete_custom_expressions_args args = new delete_custom_expressions_args(); args.setSession(session); args.setCustom_expression_ids(custom_expression_ids); args.setDo_soft_delete(do_soft_delete); sendBase("delete_custom_expressions", args); } public void recv_delete_custom_expressions() throws TDBException, org.apache.thrift.TException { delete_custom_expressions_result result = new delete_custom_expressions_result(); receiveBase(result, "delete_custom_expressions"); if (result.e != null) { throw result.e; } return; } public TDashboard get_dashboard(java.lang.String session, int dashboard_id) throws TDBException, org.apache.thrift.TException { send_get_dashboard(session, dashboard_id); return recv_get_dashboard(); } public void send_get_dashboard(java.lang.String session, int dashboard_id) throws org.apache.thrift.TException { get_dashboard_args args = new get_dashboard_args(); args.setSession(session); args.setDashboard_id(dashboard_id); sendBase("get_dashboard", args); } public TDashboard recv_get_dashboard() throws TDBException, org.apache.thrift.TException { get_dashboard_result result = new get_dashboard_result(); receiveBase(result, "get_dashboard"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_dashboard failed: unknown result"); } public java.util.List<TDashboard> get_dashboards(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_dashboards(session); return recv_get_dashboards(); } public void send_get_dashboards(java.lang.String session) throws org.apache.thrift.TException { get_dashboards_args args = new get_dashboards_args(); args.setSession(session); sendBase("get_dashboards", args); } public java.util.List<TDashboard> recv_get_dashboards() throws TDBException, org.apache.thrift.TException { get_dashboards_result result = new get_dashboards_result(); receiveBase(result, "get_dashboards"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_dashboards failed: unknown result"); } public int create_dashboard(java.lang.String session, java.lang.String dashboard_name, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata) throws TDBException, org.apache.thrift.TException { send_create_dashboard(session, dashboard_name, dashboard_state, image_hash, dashboard_metadata); return recv_create_dashboard(); } public void send_create_dashboard(java.lang.String session, java.lang.String dashboard_name, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata) throws org.apache.thrift.TException { create_dashboard_args args = new create_dashboard_args(); args.setSession(session); args.setDashboard_name(dashboard_name); args.setDashboard_state(dashboard_state); args.setImage_hash(image_hash); args.setDashboard_metadata(dashboard_metadata); sendBase("create_dashboard", args); } public int recv_create_dashboard() throws TDBException, org.apache.thrift.TException { create_dashboard_result result = new create_dashboard_result(); receiveBase(result, "create_dashboard"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_dashboard failed: unknown result"); } public void replace_dashboard(java.lang.String session, int dashboard_id, java.lang.String dashboard_name, java.lang.String dashboard_owner, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata) throws TDBException, org.apache.thrift.TException { send_replace_dashboard(session, dashboard_id, dashboard_name, dashboard_owner, dashboard_state, image_hash, dashboard_metadata); recv_replace_dashboard(); } public void send_replace_dashboard(java.lang.String session, int dashboard_id, java.lang.String dashboard_name, java.lang.String dashboard_owner, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata) throws org.apache.thrift.TException { replace_dashboard_args args = new replace_dashboard_args(); args.setSession(session); args.setDashboard_id(dashboard_id); args.setDashboard_name(dashboard_name); args.setDashboard_owner(dashboard_owner); args.setDashboard_state(dashboard_state); args.setImage_hash(image_hash); args.setDashboard_metadata(dashboard_metadata); sendBase("replace_dashboard", args); } public void recv_replace_dashboard() throws TDBException, org.apache.thrift.TException { replace_dashboard_result result = new replace_dashboard_result(); receiveBase(result, "replace_dashboard"); if (result.e != null) { throw result.e; } return; } public void delete_dashboard(java.lang.String session, int dashboard_id) throws TDBException, org.apache.thrift.TException { send_delete_dashboard(session, dashboard_id); recv_delete_dashboard(); } public void send_delete_dashboard(java.lang.String session, int dashboard_id) throws org.apache.thrift.TException { delete_dashboard_args args = new delete_dashboard_args(); args.setSession(session); args.setDashboard_id(dashboard_id); sendBase("delete_dashboard", args); } public void recv_delete_dashboard() throws TDBException, org.apache.thrift.TException { delete_dashboard_result result = new delete_dashboard_result(); receiveBase(result, "delete_dashboard"); if (result.e != null) { throw result.e; } return; } public void share_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions) throws TDBException, org.apache.thrift.TException { send_share_dashboards(session, dashboard_ids, groups, permissions); recv_share_dashboards(); } public void send_share_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions) throws org.apache.thrift.TException { share_dashboards_args args = new share_dashboards_args(); args.setSession(session); args.setDashboard_ids(dashboard_ids); args.setGroups(groups); args.setPermissions(permissions); sendBase("share_dashboards", args); } public void recv_share_dashboards() throws TDBException, org.apache.thrift.TException { share_dashboards_result result = new share_dashboards_result(); receiveBase(result, "share_dashboards"); if (result.e != null) { throw result.e; } return; } public void delete_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids) throws TDBException, org.apache.thrift.TException { send_delete_dashboards(session, dashboard_ids); recv_delete_dashboards(); } public void send_delete_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids) throws org.apache.thrift.TException { delete_dashboards_args args = new delete_dashboards_args(); args.setSession(session); args.setDashboard_ids(dashboard_ids); sendBase("delete_dashboards", args); } public void recv_delete_dashboards() throws TDBException, org.apache.thrift.TException { delete_dashboards_result result = new delete_dashboards_result(); receiveBase(result, "delete_dashboards"); if (result.e != null) { throw result.e; } return; } public void share_dashboard(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions, boolean grant_role) throws TDBException, org.apache.thrift.TException { send_share_dashboard(session, dashboard_id, groups, objects, permissions, grant_role); recv_share_dashboard(); } public void send_share_dashboard(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions, boolean grant_role) throws org.apache.thrift.TException { share_dashboard_args args = new share_dashboard_args(); args.setSession(session); args.setDashboard_id(dashboard_id); args.setGroups(groups); args.setObjects(objects); args.setPermissions(permissions); args.setGrant_role(grant_role); sendBase("share_dashboard", args); } public void recv_share_dashboard() throws TDBException, org.apache.thrift.TException { share_dashboard_result result = new share_dashboard_result(); receiveBase(result, "share_dashboard"); if (result.e != null) { throw result.e; } return; } public void unshare_dashboard(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions) throws TDBException, org.apache.thrift.TException { send_unshare_dashboard(session, dashboard_id, groups, objects, permissions); recv_unshare_dashboard(); } public void send_unshare_dashboard(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions) throws org.apache.thrift.TException { unshare_dashboard_args args = new unshare_dashboard_args(); args.setSession(session); args.setDashboard_id(dashboard_id); args.setGroups(groups); args.setObjects(objects); args.setPermissions(permissions); sendBase("unshare_dashboard", args); } public void recv_unshare_dashboard() throws TDBException, org.apache.thrift.TException { unshare_dashboard_result result = new unshare_dashboard_result(); receiveBase(result, "unshare_dashboard"); if (result.e != null) { throw result.e; } return; } public void unshare_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions) throws TDBException, org.apache.thrift.TException { send_unshare_dashboards(session, dashboard_ids, groups, permissions); recv_unshare_dashboards(); } public void send_unshare_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions) throws org.apache.thrift.TException { unshare_dashboards_args args = new unshare_dashboards_args(); args.setSession(session); args.setDashboard_ids(dashboard_ids); args.setGroups(groups); args.setPermissions(permissions); sendBase("unshare_dashboards", args); } public void recv_unshare_dashboards() throws TDBException, org.apache.thrift.TException { unshare_dashboards_result result = new unshare_dashboards_result(); receiveBase(result, "unshare_dashboards"); if (result.e != null) { throw result.e; } return; } public java.util.List<TDashboardGrantees> get_dashboard_grantees(java.lang.String session, int dashboard_id) throws TDBException, org.apache.thrift.TException { send_get_dashboard_grantees(session, dashboard_id); return recv_get_dashboard_grantees(); } public void send_get_dashboard_grantees(java.lang.String session, int dashboard_id) throws org.apache.thrift.TException { get_dashboard_grantees_args args = new get_dashboard_grantees_args(); args.setSession(session); args.setDashboard_id(dashboard_id); sendBase("get_dashboard_grantees", args); } public java.util.List<TDashboardGrantees> recv_get_dashboard_grantees() throws TDBException, org.apache.thrift.TException { get_dashboard_grantees_result result = new get_dashboard_grantees_result(); receiveBase(result, "get_dashboard_grantees"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_dashboard_grantees failed: unknown result"); } public TFrontendView get_link_view(java.lang.String session, java.lang.String link) throws TDBException, org.apache.thrift.TException { send_get_link_view(session, link); return recv_get_link_view(); } public void send_get_link_view(java.lang.String session, java.lang.String link) throws org.apache.thrift.TException { get_link_view_args args = new get_link_view_args(); args.setSession(session); args.setLink(link); sendBase("get_link_view", args); } public TFrontendView recv_get_link_view() throws TDBException, org.apache.thrift.TException { get_link_view_result result = new get_link_view_result(); receiveBase(result, "get_link_view"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_link_view failed: unknown result"); } public java.lang.String create_link(java.lang.String session, java.lang.String view_state, java.lang.String view_metadata) throws TDBException, org.apache.thrift.TException { send_create_link(session, view_state, view_metadata); return recv_create_link(); } public void send_create_link(java.lang.String session, java.lang.String view_state, java.lang.String view_metadata) throws org.apache.thrift.TException { create_link_args args = new create_link_args(); args.setSession(session); args.setView_state(view_state); args.setView_metadata(view_metadata); sendBase("create_link", args); } public java.lang.String recv_create_link() throws TDBException, org.apache.thrift.TException { create_link_result result = new create_link_result(); receiveBase(result, "create_link"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_link failed: unknown result"); } public void load_table_binary(java.lang.String session, java.lang.String table_name, java.util.List<TRow> rows, java.util.List<java.lang.String> column_names) throws TDBException, org.apache.thrift.TException { send_load_table_binary(session, table_name, rows, column_names); recv_load_table_binary(); } public void send_load_table_binary(java.lang.String session, java.lang.String table_name, java.util.List<TRow> rows, java.util.List<java.lang.String> column_names) throws org.apache.thrift.TException { load_table_binary_args args = new load_table_binary_args(); args.setSession(session); args.setTable_name(table_name); args.setRows(rows); args.setColumn_names(column_names); sendBase("load_table_binary", args); } public void recv_load_table_binary() throws TDBException, org.apache.thrift.TException { load_table_binary_result result = new load_table_binary_result(); receiveBase(result, "load_table_binary"); if (result.e != null) { throw result.e; } return; } public void load_table_binary_columnar(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names) throws TDBException, org.apache.thrift.TException { send_load_table_binary_columnar(session, table_name, cols, column_names); recv_load_table_binary_columnar(); } public void send_load_table_binary_columnar(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names) throws org.apache.thrift.TException { load_table_binary_columnar_args args = new load_table_binary_columnar_args(); args.setSession(session); args.setTable_name(table_name); args.setCols(cols); args.setColumn_names(column_names); sendBase("load_table_binary_columnar", args); } public void recv_load_table_binary_columnar() throws TDBException, org.apache.thrift.TException { load_table_binary_columnar_result result = new load_table_binary_columnar_result(); receiveBase(result, "load_table_binary_columnar"); if (result.e != null) { throw result.e; } return; } public void load_table_binary_columnar_polys(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names, boolean assign_render_groups) throws TDBException, org.apache.thrift.TException { send_load_table_binary_columnar_polys(session, table_name, cols, column_names, assign_render_groups); recv_load_table_binary_columnar_polys(); } public void send_load_table_binary_columnar_polys(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names, boolean assign_render_groups) throws org.apache.thrift.TException { load_table_binary_columnar_polys_args args = new load_table_binary_columnar_polys_args(); args.setSession(session); args.setTable_name(table_name); args.setCols(cols); args.setColumn_names(column_names); args.setAssign_render_groups(assign_render_groups); sendBase("load_table_binary_columnar_polys", args); } public void recv_load_table_binary_columnar_polys() throws TDBException, org.apache.thrift.TException { load_table_binary_columnar_polys_result result = new load_table_binary_columnar_polys_result(); receiveBase(result, "load_table_binary_columnar_polys"); if (result.e != null) { throw result.e; } return; } public void load_table_binary_arrow(java.lang.String session, java.lang.String table_name, java.nio.ByteBuffer arrow_stream, boolean use_column_names) throws TDBException, org.apache.thrift.TException { send_load_table_binary_arrow(session, table_name, arrow_stream, use_column_names); recv_load_table_binary_arrow(); } public void send_load_table_binary_arrow(java.lang.String session, java.lang.String table_name, java.nio.ByteBuffer arrow_stream, boolean use_column_names) throws org.apache.thrift.TException { load_table_binary_arrow_args args = new load_table_binary_arrow_args(); args.setSession(session); args.setTable_name(table_name); args.setArrow_stream(arrow_stream); args.setUse_column_names(use_column_names); sendBase("load_table_binary_arrow", args); } public void recv_load_table_binary_arrow() throws TDBException, org.apache.thrift.TException { load_table_binary_arrow_result result = new load_table_binary_arrow_result(); receiveBase(result, "load_table_binary_arrow"); if (result.e != null) { throw result.e; } return; } public void load_table(java.lang.String session, java.lang.String table_name, java.util.List<TStringRow> rows, java.util.List<java.lang.String> column_names) throws TDBException, org.apache.thrift.TException { send_load_table(session, table_name, rows, column_names); recv_load_table(); } public void send_load_table(java.lang.String session, java.lang.String table_name, java.util.List<TStringRow> rows, java.util.List<java.lang.String> column_names) throws org.apache.thrift.TException { load_table_args args = new load_table_args(); args.setSession(session); args.setTable_name(table_name); args.setRows(rows); args.setColumn_names(column_names); sendBase("load_table", args); } public void recv_load_table() throws TDBException, org.apache.thrift.TException { load_table_result result = new load_table_result(); receiveBase(result, "load_table"); if (result.e != null) { throw result.e; } return; } public TDetectResult detect_column_types(java.lang.String session, java.lang.String file_name, TCopyParams copy_params) throws TDBException, org.apache.thrift.TException { send_detect_column_types(session, file_name, copy_params); return recv_detect_column_types(); } public void send_detect_column_types(java.lang.String session, java.lang.String file_name, TCopyParams copy_params) throws org.apache.thrift.TException { detect_column_types_args args = new detect_column_types_args(); args.setSession(session); args.setFile_name(file_name); args.setCopy_params(copy_params); sendBase("detect_column_types", args); } public TDetectResult recv_detect_column_types() throws TDBException, org.apache.thrift.TException { detect_column_types_result result = new detect_column_types_result(); receiveBase(result, "detect_column_types"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "detect_column_types failed: unknown result"); } public void create_table(java.lang.String session, java.lang.String table_name, java.util.List<TColumnType> row_desc, TCreateParams create_params) throws TDBException, org.apache.thrift.TException { send_create_table(session, table_name, row_desc, create_params); recv_create_table(); } public void send_create_table(java.lang.String session, java.lang.String table_name, java.util.List<TColumnType> row_desc, TCreateParams create_params) throws org.apache.thrift.TException { create_table_args args = new create_table_args(); args.setSession(session); args.setTable_name(table_name); args.setRow_desc(row_desc); args.setCreate_params(create_params); sendBase("create_table", args); } public void recv_create_table() throws TDBException, org.apache.thrift.TException { create_table_result result = new create_table_result(); receiveBase(result, "create_table"); if (result.e != null) { throw result.e; } return; } public void import_table(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params) throws TDBException, org.apache.thrift.TException { send_import_table(session, table_name, file_name, copy_params); recv_import_table(); } public void send_import_table(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params) throws org.apache.thrift.TException { import_table_args args = new import_table_args(); args.setSession(session); args.setTable_name(table_name); args.setFile_name(file_name); args.setCopy_params(copy_params); sendBase("import_table", args); } public void recv_import_table() throws TDBException, org.apache.thrift.TException { import_table_result result = new import_table_result(); receiveBase(result, "import_table"); if (result.e != null) { throw result.e; } return; } public void import_geo_table(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params, java.util.List<TColumnType> row_desc, TCreateParams create_params) throws TDBException, org.apache.thrift.TException { send_import_geo_table(session, table_name, file_name, copy_params, row_desc, create_params); recv_import_geo_table(); } public void send_import_geo_table(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params, java.util.List<TColumnType> row_desc, TCreateParams create_params) throws org.apache.thrift.TException { import_geo_table_args args = new import_geo_table_args(); args.setSession(session); args.setTable_name(table_name); args.setFile_name(file_name); args.setCopy_params(copy_params); args.setRow_desc(row_desc); args.setCreate_params(create_params); sendBase("import_geo_table", args); } public void recv_import_geo_table() throws TDBException, org.apache.thrift.TException { import_geo_table_result result = new import_geo_table_result(); receiveBase(result, "import_geo_table"); if (result.e != null) { throw result.e; } return; } public TImportStatus import_table_status(java.lang.String session, java.lang.String import_id) throws TDBException, org.apache.thrift.TException { send_import_table_status(session, import_id); return recv_import_table_status(); } public void send_import_table_status(java.lang.String session, java.lang.String import_id) throws org.apache.thrift.TException { import_table_status_args args = new import_table_status_args(); args.setSession(session); args.setImport_id(import_id); sendBase("import_table_status", args); } public TImportStatus recv_import_table_status() throws TDBException, org.apache.thrift.TException { import_table_status_result result = new import_table_status_result(); receiveBase(result, "import_table_status"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "import_table_status failed: unknown result"); } public java.lang.String get_first_geo_file_in_archive(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params) throws TDBException, org.apache.thrift.TException { send_get_first_geo_file_in_archive(session, archive_path, copy_params); return recv_get_first_geo_file_in_archive(); } public void send_get_first_geo_file_in_archive(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params) throws org.apache.thrift.TException { get_first_geo_file_in_archive_args args = new get_first_geo_file_in_archive_args(); args.setSession(session); args.setArchive_path(archive_path); args.setCopy_params(copy_params); sendBase("get_first_geo_file_in_archive", args); } public java.lang.String recv_get_first_geo_file_in_archive() throws TDBException, org.apache.thrift.TException { get_first_geo_file_in_archive_result result = new get_first_geo_file_in_archive_result(); receiveBase(result, "get_first_geo_file_in_archive"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_first_geo_file_in_archive failed: unknown result"); } public java.util.List<java.lang.String> get_all_files_in_archive(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params) throws TDBException, org.apache.thrift.TException { send_get_all_files_in_archive(session, archive_path, copy_params); return recv_get_all_files_in_archive(); } public void send_get_all_files_in_archive(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params) throws org.apache.thrift.TException { get_all_files_in_archive_args args = new get_all_files_in_archive_args(); args.setSession(session); args.setArchive_path(archive_path); args.setCopy_params(copy_params); sendBase("get_all_files_in_archive", args); } public java.util.List<java.lang.String> recv_get_all_files_in_archive() throws TDBException, org.apache.thrift.TException { get_all_files_in_archive_result result = new get_all_files_in_archive_result(); receiveBase(result, "get_all_files_in_archive"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_files_in_archive failed: unknown result"); } public java.util.List<TGeoFileLayerInfo> get_layers_in_geo_file(java.lang.String session, java.lang.String file_name, TCopyParams copy_params) throws TDBException, org.apache.thrift.TException { send_get_layers_in_geo_file(session, file_name, copy_params); return recv_get_layers_in_geo_file(); } public void send_get_layers_in_geo_file(java.lang.String session, java.lang.String file_name, TCopyParams copy_params) throws org.apache.thrift.TException { get_layers_in_geo_file_args args = new get_layers_in_geo_file_args(); args.setSession(session); args.setFile_name(file_name); args.setCopy_params(copy_params); sendBase("get_layers_in_geo_file", args); } public java.util.List<TGeoFileLayerInfo> recv_get_layers_in_geo_file() throws TDBException, org.apache.thrift.TException { get_layers_in_geo_file_result result = new get_layers_in_geo_file_result(); receiveBase(result, "get_layers_in_geo_file"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_layers_in_geo_file failed: unknown result"); } public long query_get_outer_fragment_count(java.lang.String session, java.lang.String query) throws TDBException, org.apache.thrift.TException { send_query_get_outer_fragment_count(session, query); return recv_query_get_outer_fragment_count(); } public void send_query_get_outer_fragment_count(java.lang.String session, java.lang.String query) throws org.apache.thrift.TException { query_get_outer_fragment_count_args args = new query_get_outer_fragment_count_args(); args.setSession(session); args.setQuery(query); sendBase("query_get_outer_fragment_count", args); } public long recv_query_get_outer_fragment_count() throws TDBException, org.apache.thrift.TException { query_get_outer_fragment_count_result result = new query_get_outer_fragment_count_result(); receiveBase(result, "query_get_outer_fragment_count"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "query_get_outer_fragment_count failed: unknown result"); } public TTableMeta check_table_consistency(java.lang.String session, int table_id) throws TDBException, org.apache.thrift.TException { send_check_table_consistency(session, table_id); return recv_check_table_consistency(); } public void send_check_table_consistency(java.lang.String session, int table_id) throws org.apache.thrift.TException { check_table_consistency_args args = new check_table_consistency_args(); args.setSession(session); args.setTable_id(table_id); sendBase("check_table_consistency", args); } public TTableMeta recv_check_table_consistency() throws TDBException, org.apache.thrift.TException { check_table_consistency_result result = new check_table_consistency_result(); receiveBase(result, "check_table_consistency"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "check_table_consistency failed: unknown result"); } public TPendingQuery start_query(java.lang.String leaf_session, java.lang.String parent_session, java.lang.String query_ra, java.lang.String start_time_str, boolean just_explain, java.util.List<java.lang.Long> outer_fragment_indices) throws TDBException, org.apache.thrift.TException { send_start_query(leaf_session, parent_session, query_ra, start_time_str, just_explain, outer_fragment_indices); return recv_start_query(); } public void send_start_query(java.lang.String leaf_session, java.lang.String parent_session, java.lang.String query_ra, java.lang.String start_time_str, boolean just_explain, java.util.List<java.lang.Long> outer_fragment_indices) throws org.apache.thrift.TException { start_query_args args = new start_query_args(); args.setLeaf_session(leaf_session); args.setParent_session(parent_session); args.setQuery_ra(query_ra); args.setStart_time_str(start_time_str); args.setJust_explain(just_explain); args.setOuter_fragment_indices(outer_fragment_indices); sendBase("start_query", args); } public TPendingQuery recv_start_query() throws TDBException, org.apache.thrift.TException { start_query_result result = new start_query_result(); receiveBase(result, "start_query"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "start_query failed: unknown result"); } public TStepResult execute_query_step(TPendingQuery pending_query, long subquery_id, java.lang.String start_time_str) throws TDBException, org.apache.thrift.TException { send_execute_query_step(pending_query, subquery_id, start_time_str); return recv_execute_query_step(); } public void send_execute_query_step(TPendingQuery pending_query, long subquery_id, java.lang.String start_time_str) throws org.apache.thrift.TException { execute_query_step_args args = new execute_query_step_args(); args.setPending_query(pending_query); args.setSubquery_id(subquery_id); args.setStart_time_str(start_time_str); sendBase("execute_query_step", args); } public TStepResult recv_execute_query_step() throws TDBException, org.apache.thrift.TException { execute_query_step_result result = new execute_query_step_result(); receiveBase(result, "execute_query_step"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "execute_query_step failed: unknown result"); } public void broadcast_serialized_rows(ai.heavy.thrift.server.TSerializedRows serialized_rows, java.util.List<TColumnType> row_desc, long query_id, long subquery_id, boolean is_final_subquery_result) throws TDBException, org.apache.thrift.TException { send_broadcast_serialized_rows(serialized_rows, row_desc, query_id, subquery_id, is_final_subquery_result); recv_broadcast_serialized_rows(); } public void send_broadcast_serialized_rows(ai.heavy.thrift.server.TSerializedRows serialized_rows, java.util.List<TColumnType> row_desc, long query_id, long subquery_id, boolean is_final_subquery_result) throws org.apache.thrift.TException { broadcast_serialized_rows_args args = new broadcast_serialized_rows_args(); args.setSerialized_rows(serialized_rows); args.setRow_desc(row_desc); args.setQuery_id(query_id); args.setSubquery_id(subquery_id); args.setIs_final_subquery_result(is_final_subquery_result); sendBase("broadcast_serialized_rows", args); } public void recv_broadcast_serialized_rows() throws TDBException, org.apache.thrift.TException { broadcast_serialized_rows_result result = new broadcast_serialized_rows_result(); receiveBase(result, "broadcast_serialized_rows"); if (result.e != null) { throw result.e; } return; } public TPendingRenderQuery start_render_query(java.lang.String session, long widget_id, short node_idx, java.lang.String vega_json) throws TDBException, org.apache.thrift.TException { send_start_render_query(session, widget_id, node_idx, vega_json); return recv_start_render_query(); } public void send_start_render_query(java.lang.String session, long widget_id, short node_idx, java.lang.String vega_json) throws org.apache.thrift.TException { start_render_query_args args = new start_render_query_args(); args.setSession(session); args.setWidget_id(widget_id); args.setNode_idx(node_idx); args.setVega_json(vega_json); sendBase("start_render_query", args); } public TPendingRenderQuery recv_start_render_query() throws TDBException, org.apache.thrift.TException { start_render_query_result result = new start_render_query_result(); receiveBase(result, "start_render_query"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "start_render_query failed: unknown result"); } public TRenderStepResult execute_next_render_step(TPendingRenderQuery pending_render, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> merged_data) throws TDBException, org.apache.thrift.TException { send_execute_next_render_step(pending_render, merged_data); return recv_execute_next_render_step(); } public void send_execute_next_render_step(TPendingRenderQuery pending_render, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> merged_data) throws org.apache.thrift.TException { execute_next_render_step_args args = new execute_next_render_step_args(); args.setPending_render(pending_render); args.setMerged_data(merged_data); sendBase("execute_next_render_step", args); } public TRenderStepResult recv_execute_next_render_step() throws TDBException, org.apache.thrift.TException { execute_next_render_step_result result = new execute_next_render_step_result(); receiveBase(result, "execute_next_render_step"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "execute_next_render_step failed: unknown result"); } public void insert_data(java.lang.String session, TInsertData insert_data) throws TDBException, org.apache.thrift.TException { send_insert_data(session, insert_data); recv_insert_data(); } public void send_insert_data(java.lang.String session, TInsertData insert_data) throws org.apache.thrift.TException { insert_data_args args = new insert_data_args(); args.setSession(session); args.setInsert_data(insert_data); sendBase("insert_data", args); } public void recv_insert_data() throws TDBException, org.apache.thrift.TException { insert_data_result result = new insert_data_result(); receiveBase(result, "insert_data"); if (result.e != null) { throw result.e; } return; } public void insert_chunks(java.lang.String session, TInsertChunks insert_chunks) throws TDBException, org.apache.thrift.TException { send_insert_chunks(session, insert_chunks); recv_insert_chunks(); } public void send_insert_chunks(java.lang.String session, TInsertChunks insert_chunks) throws org.apache.thrift.TException { insert_chunks_args args = new insert_chunks_args(); args.setSession(session); args.setInsert_chunks(insert_chunks); sendBase("insert_chunks", args); } public void recv_insert_chunks() throws TDBException, org.apache.thrift.TException { insert_chunks_result result = new insert_chunks_result(); receiveBase(result, "insert_chunks"); if (result.e != null) { throw result.e; } return; } public void checkpoint(java.lang.String session, int table_id) throws TDBException, org.apache.thrift.TException { send_checkpoint(session, table_id); recv_checkpoint(); } public void send_checkpoint(java.lang.String session, int table_id) throws org.apache.thrift.TException { checkpoint_args args = new checkpoint_args(); args.setSession(session); args.setTable_id(table_id); sendBase("checkpoint", args); } public void recv_checkpoint() throws TDBException, org.apache.thrift.TException { checkpoint_result result = new checkpoint_result(); receiveBase(result, "checkpoint"); if (result.e != null) { throw result.e; } return; } public java.util.List<java.lang.String> get_roles(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_roles(session); return recv_get_roles(); } public void send_get_roles(java.lang.String session) throws org.apache.thrift.TException { get_roles_args args = new get_roles_args(); args.setSession(session); sendBase("get_roles", args); } public java.util.List<java.lang.String> recv_get_roles() throws TDBException, org.apache.thrift.TException { get_roles_result result = new get_roles_result(); receiveBase(result, "get_roles"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_roles failed: unknown result"); } public java.util.List<TDBObject> get_db_objects_for_grantee(java.lang.String session, java.lang.String roleName) throws TDBException, org.apache.thrift.TException { send_get_db_objects_for_grantee(session, roleName); return recv_get_db_objects_for_grantee(); } public void send_get_db_objects_for_grantee(java.lang.String session, java.lang.String roleName) throws org.apache.thrift.TException { get_db_objects_for_grantee_args args = new get_db_objects_for_grantee_args(); args.setSession(session); args.setRoleName(roleName); sendBase("get_db_objects_for_grantee", args); } public java.util.List<TDBObject> recv_get_db_objects_for_grantee() throws TDBException, org.apache.thrift.TException { get_db_objects_for_grantee_result result = new get_db_objects_for_grantee_result(); receiveBase(result, "get_db_objects_for_grantee"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_db_objects_for_grantee failed: unknown result"); } public java.util.List<TDBObject> get_db_object_privs(java.lang.String session, java.lang.String objectName, TDBObjectType type) throws TDBException, org.apache.thrift.TException { send_get_db_object_privs(session, objectName, type); return recv_get_db_object_privs(); } public void send_get_db_object_privs(java.lang.String session, java.lang.String objectName, TDBObjectType type) throws org.apache.thrift.TException { get_db_object_privs_args args = new get_db_object_privs_args(); args.setSession(session); args.setObjectName(objectName); args.setType(type); sendBase("get_db_object_privs", args); } public java.util.List<TDBObject> recv_get_db_object_privs() throws TDBException, org.apache.thrift.TException { get_db_object_privs_result result = new get_db_object_privs_result(); receiveBase(result, "get_db_object_privs"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_db_object_privs failed: unknown result"); } public java.util.List<java.lang.String> get_all_roles_for_user(java.lang.String session, java.lang.String userName) throws TDBException, org.apache.thrift.TException { send_get_all_roles_for_user(session, userName); return recv_get_all_roles_for_user(); } public void send_get_all_roles_for_user(java.lang.String session, java.lang.String userName) throws org.apache.thrift.TException { get_all_roles_for_user_args args = new get_all_roles_for_user_args(); args.setSession(session); args.setUserName(userName); sendBase("get_all_roles_for_user", args); } public java.util.List<java.lang.String> recv_get_all_roles_for_user() throws TDBException, org.apache.thrift.TException { get_all_roles_for_user_result result = new get_all_roles_for_user_result(); receiveBase(result, "get_all_roles_for_user"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_roles_for_user failed: unknown result"); } public java.util.List<java.lang.String> get_all_effective_roles_for_user(java.lang.String session, java.lang.String userName) throws TDBException, org.apache.thrift.TException { send_get_all_effective_roles_for_user(session, userName); return recv_get_all_effective_roles_for_user(); } public void send_get_all_effective_roles_for_user(java.lang.String session, java.lang.String userName) throws org.apache.thrift.TException { get_all_effective_roles_for_user_args args = new get_all_effective_roles_for_user_args(); args.setSession(session); args.setUserName(userName); sendBase("get_all_effective_roles_for_user", args); } public java.util.List<java.lang.String> recv_get_all_effective_roles_for_user() throws TDBException, org.apache.thrift.TException { get_all_effective_roles_for_user_result result = new get_all_effective_roles_for_user_result(); receiveBase(result, "get_all_effective_roles_for_user"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_effective_roles_for_user failed: unknown result"); } public boolean has_role(java.lang.String session, java.lang.String granteeName, java.lang.String roleName) throws TDBException, org.apache.thrift.TException { send_has_role(session, granteeName, roleName); return recv_has_role(); } public void send_has_role(java.lang.String session, java.lang.String granteeName, java.lang.String roleName) throws org.apache.thrift.TException { has_role_args args = new has_role_args(); args.setSession(session); args.setGranteeName(granteeName); args.setRoleName(roleName); sendBase("has_role", args); } public boolean recv_has_role() throws TDBException, org.apache.thrift.TException { has_role_result result = new has_role_result(); receiveBase(result, "has_role"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "has_role failed: unknown result"); } public boolean has_object_privilege(java.lang.String session, java.lang.String granteeName, java.lang.String ObjectName, TDBObjectType objectType, TDBObjectPermissions permissions) throws TDBException, org.apache.thrift.TException { send_has_object_privilege(session, granteeName, ObjectName, objectType, permissions); return recv_has_object_privilege(); } public void send_has_object_privilege(java.lang.String session, java.lang.String granteeName, java.lang.String ObjectName, TDBObjectType objectType, TDBObjectPermissions permissions) throws org.apache.thrift.TException { has_object_privilege_args args = new has_object_privilege_args(); args.setSession(session); args.setGranteeName(granteeName); args.setObjectName(ObjectName); args.setObjectType(objectType); args.setPermissions(permissions); sendBase("has_object_privilege", args); } public boolean recv_has_object_privilege() throws TDBException, org.apache.thrift.TException { has_object_privilege_result result = new has_object_privilege_result(); receiveBase(result, "has_object_privilege"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "has_object_privilege failed: unknown result"); } public TLicenseInfo set_license_key(java.lang.String session, java.lang.String key, java.lang.String nonce) throws TDBException, org.apache.thrift.TException { send_set_license_key(session, key, nonce); return recv_set_license_key(); } public void send_set_license_key(java.lang.String session, java.lang.String key, java.lang.String nonce) throws org.apache.thrift.TException { set_license_key_args args = new set_license_key_args(); args.setSession(session); args.setKey(key); args.setNonce(nonce); sendBase("set_license_key", args); } public TLicenseInfo recv_set_license_key() throws TDBException, org.apache.thrift.TException { set_license_key_result result = new set_license_key_result(); receiveBase(result, "set_license_key"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "set_license_key failed: unknown result"); } public TLicenseInfo get_license_claims(java.lang.String session, java.lang.String nonce) throws TDBException, org.apache.thrift.TException { send_get_license_claims(session, nonce); return recv_get_license_claims(); } public void send_get_license_claims(java.lang.String session, java.lang.String nonce) throws org.apache.thrift.TException { get_license_claims_args args = new get_license_claims_args(); args.setSession(session); args.setNonce(nonce); sendBase("get_license_claims", args); } public TLicenseInfo recv_get_license_claims() throws TDBException, org.apache.thrift.TException { get_license_claims_result result = new get_license_claims_result(); receiveBase(result, "get_license_claims"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_license_claims failed: unknown result"); } public java.util.Map<java.lang.String,java.lang.String> get_device_parameters(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_device_parameters(session); return recv_get_device_parameters(); } public void send_get_device_parameters(java.lang.String session) throws org.apache.thrift.TException { get_device_parameters_args args = new get_device_parameters_args(); args.setSession(session); sendBase("get_device_parameters", args); } public java.util.Map<java.lang.String,java.lang.String> recv_get_device_parameters() throws TDBException, org.apache.thrift.TException { get_device_parameters_result result = new get_device_parameters_result(); receiveBase(result, "get_device_parameters"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_device_parameters failed: unknown result"); } public void register_runtime_extension_functions(java.lang.String session, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, java.util.Map<java.lang.String,java.lang.String> device_ir_map) throws TDBException, org.apache.thrift.TException { send_register_runtime_extension_functions(session, udfs, udtfs, device_ir_map); recv_register_runtime_extension_functions(); } public void send_register_runtime_extension_functions(java.lang.String session, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, java.util.Map<java.lang.String,java.lang.String> device_ir_map) throws org.apache.thrift.TException { register_runtime_extension_functions_args args = new register_runtime_extension_functions_args(); args.setSession(session); args.setUdfs(udfs); args.setUdtfs(udtfs); args.setDevice_ir_map(device_ir_map); sendBase("register_runtime_extension_functions", args); } public void recv_register_runtime_extension_functions() throws TDBException, org.apache.thrift.TException { register_runtime_extension_functions_result result = new register_runtime_extension_functions_result(); receiveBase(result, "register_runtime_extension_functions"); if (result.e != null) { throw result.e; } return; } public java.util.List<java.lang.String> get_table_function_names(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_table_function_names(session); return recv_get_table_function_names(); } public void send_get_table_function_names(java.lang.String session) throws org.apache.thrift.TException { get_table_function_names_args args = new get_table_function_names_args(); args.setSession(session); sendBase("get_table_function_names", args); } public java.util.List<java.lang.String> recv_get_table_function_names() throws TDBException, org.apache.thrift.TException { get_table_function_names_result result = new get_table_function_names_result(); receiveBase(result, "get_table_function_names"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_function_names failed: unknown result"); } public java.util.List<java.lang.String> get_runtime_table_function_names(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_runtime_table_function_names(session); return recv_get_runtime_table_function_names(); } public void send_get_runtime_table_function_names(java.lang.String session) throws org.apache.thrift.TException { get_runtime_table_function_names_args args = new get_runtime_table_function_names_args(); args.setSession(session); sendBase("get_runtime_table_function_names", args); } public java.util.List<java.lang.String> recv_get_runtime_table_function_names() throws TDBException, org.apache.thrift.TException { get_runtime_table_function_names_result result = new get_runtime_table_function_names_result(); receiveBase(result, "get_runtime_table_function_names"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_runtime_table_function_names failed: unknown result"); } public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> get_table_function_details(java.lang.String session, java.util.List<java.lang.String> udtf_names) throws TDBException, org.apache.thrift.TException { send_get_table_function_details(session, udtf_names); return recv_get_table_function_details(); } public void send_get_table_function_details(java.lang.String session, java.util.List<java.lang.String> udtf_names) throws org.apache.thrift.TException { get_table_function_details_args args = new get_table_function_details_args(); args.setSession(session); args.setUdtf_names(udtf_names); sendBase("get_table_function_details", args); } public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> recv_get_table_function_details() throws TDBException, org.apache.thrift.TException { get_table_function_details_result result = new get_table_function_details_result(); receiveBase(result, "get_table_function_details"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_function_details failed: unknown result"); } public java.util.List<java.lang.String> get_function_names(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_function_names(session); return recv_get_function_names(); } public void send_get_function_names(java.lang.String session) throws org.apache.thrift.TException { get_function_names_args args = new get_function_names_args(); args.setSession(session); sendBase("get_function_names", args); } public java.util.List<java.lang.String> recv_get_function_names() throws TDBException, org.apache.thrift.TException { get_function_names_result result = new get_function_names_result(); receiveBase(result, "get_function_names"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_function_names failed: unknown result"); } public java.util.List<java.lang.String> get_runtime_function_names(java.lang.String session) throws TDBException, org.apache.thrift.TException { send_get_runtime_function_names(session); return recv_get_runtime_function_names(); } public void send_get_runtime_function_names(java.lang.String session) throws org.apache.thrift.TException { get_runtime_function_names_args args = new get_runtime_function_names_args(); args.setSession(session); sendBase("get_runtime_function_names", args); } public java.util.List<java.lang.String> recv_get_runtime_function_names() throws TDBException, org.apache.thrift.TException { get_runtime_function_names_result result = new get_runtime_function_names_result(); receiveBase(result, "get_runtime_function_names"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_runtime_function_names failed: unknown result"); } public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> get_function_details(java.lang.String session, java.util.List<java.lang.String> udf_names) throws TDBException, org.apache.thrift.TException { send_get_function_details(session, udf_names); return recv_get_function_details(); } public void send_get_function_details(java.lang.String session, java.util.List<java.lang.String> udf_names) throws org.apache.thrift.TException { get_function_details_args args = new get_function_details_args(); args.setSession(session); args.setUdf_names(udf_names); sendBase("get_function_details", args); } public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> recv_get_function_details() throws TDBException, org.apache.thrift.TException { get_function_details_result result = new get_function_details_result(); receiveBase(result, "get_function_details"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_function_details failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void connect(java.lang.String user, java.lang.String passwd, java.lang.String dbname, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { checkReady(); connect_call method_call = new connect_call(user, passwd, dbname, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class connect_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> { private java.lang.String user; private java.lang.String passwd; private java.lang.String dbname; public connect_call(java.lang.String user, java.lang.String passwd, java.lang.String dbname, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.user = user; this.passwd = passwd; this.dbname = dbname; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("connect", org.apache.thrift.protocol.TMessageType.CALL, 0)); connect_args args = new connect_args(); args.setUser(user); args.setPasswd(passwd); args.setDbname(dbname); args.write(prot); prot.writeMessageEnd(); } public java.lang.String getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_connect(); } } public void krb5_connect(java.lang.String inputToken, java.lang.String dbname, org.apache.thrift.async.AsyncMethodCallback<TKrb5Session> resultHandler) throws org.apache.thrift.TException { checkReady(); krb5_connect_call method_call = new krb5_connect_call(inputToken, dbname, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class krb5_connect_call extends org.apache.thrift.async.TAsyncMethodCall<TKrb5Session> { private java.lang.String inputToken; private java.lang.String dbname; public krb5_connect_call(java.lang.String inputToken, java.lang.String dbname, org.apache.thrift.async.AsyncMethodCallback<TKrb5Session> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.inputToken = inputToken; this.dbname = dbname; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("krb5_connect", org.apache.thrift.protocol.TMessageType.CALL, 0)); krb5_connect_args args = new krb5_connect_args(); args.setInputToken(inputToken); args.setDbname(dbname); args.write(prot); prot.writeMessageEnd(); } public TKrb5Session getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_krb5_connect(); } } public void disconnect(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); disconnect_call method_call = new disconnect_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class disconnect_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; public disconnect_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("disconnect", org.apache.thrift.protocol.TMessageType.CALL, 0)); disconnect_args args = new disconnect_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void switch_database(java.lang.String session, java.lang.String dbname, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); switch_database_call method_call = new switch_database_call(session, dbname, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class switch_database_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.lang.String dbname; public switch_database_call(java.lang.String session, java.lang.String dbname, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dbname = dbname; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("switch_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); switch_database_args args = new switch_database_args(); args.setSession(session); args.setDbname(dbname); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void clone_session(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { checkReady(); clone_session_call method_call = new clone_session_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class clone_session_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> { private java.lang.String session; public clone_session_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("clone_session", org.apache.thrift.protocol.TMessageType.CALL, 0)); clone_session_args args = new clone_session_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.lang.String getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_clone_session(); } } public void get_server_status(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<TServerStatus> resultHandler) throws org.apache.thrift.TException { checkReady(); get_server_status_call method_call = new get_server_status_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_server_status_call extends org.apache.thrift.async.TAsyncMethodCall<TServerStatus> { private java.lang.String session; public get_server_status_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<TServerStatus> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_server_status", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_server_status_args args = new get_server_status_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public TServerStatus getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_server_status(); } } public void get_status(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TServerStatus>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_status_call method_call = new get_status_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_status_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TServerStatus>> { private java.lang.String session; public get_status_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TServerStatus>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_status", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_status_args args = new get_status_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TServerStatus> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_status(); } } public void get_hardware_info(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<TClusterHardwareInfo> resultHandler) throws org.apache.thrift.TException { checkReady(); get_hardware_info_call method_call = new get_hardware_info_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_hardware_info_call extends org.apache.thrift.async.TAsyncMethodCall<TClusterHardwareInfo> { private java.lang.String session; public get_hardware_info_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<TClusterHardwareInfo> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_hardware_info", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_hardware_info_args args = new get_hardware_info_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public TClusterHardwareInfo getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_hardware_info(); } } public void get_tables(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_tables_call method_call = new get_tables_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_tables_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; public get_tables_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_tables", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_tables_args args = new get_tables_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_tables(); } } public void get_tables_for_database(java.lang.String session, java.lang.String database_name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_tables_for_database_call method_call = new get_tables_for_database_call(session, database_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_tables_for_database_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; private java.lang.String database_name; public get_tables_for_database_call(java.lang.String session, java.lang.String database_name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.database_name = database_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_tables_for_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_tables_for_database_args args = new get_tables_for_database_args(); args.setSession(session); args.setDatabase_name(database_name); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_tables_for_database(); } } public void get_physical_tables(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_physical_tables_call method_call = new get_physical_tables_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_physical_tables_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; public get_physical_tables_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_physical_tables", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_physical_tables_args args = new get_physical_tables_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_physical_tables(); } } public void get_views(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_views_call method_call = new get_views_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_views_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; public get_views_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_views", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_views_args args = new get_views_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_views(); } } public void get_tables_meta(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableMeta>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_tables_meta_call method_call = new get_tables_meta_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_tables_meta_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TTableMeta>> { private java.lang.String session; public get_tables_meta_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableMeta>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_tables_meta", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_tables_meta_args args = new get_tables_meta_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TTableMeta> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_tables_meta(); } } public void get_table_details(java.lang.String session, java.lang.String table_name, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_details_call method_call = new get_table_details_call(session, table_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_details_call extends org.apache.thrift.async.TAsyncMethodCall<TTableDetails> { private java.lang.String session; private java.lang.String table_name; public get_table_details_call(java.lang.String session, java.lang.String table_name, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_details", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_details_args args = new get_table_details_args(); args.setSession(session); args.setTable_name(table_name); args.write(prot); prot.writeMessageEnd(); } public TTableDetails getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_details(); } } public void get_table_details_for_database(java.lang.String session, java.lang.String table_name, java.lang.String database_name, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_details_for_database_call method_call = new get_table_details_for_database_call(session, table_name, database_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_details_for_database_call extends org.apache.thrift.async.TAsyncMethodCall<TTableDetails> { private java.lang.String session; private java.lang.String table_name; private java.lang.String database_name; public get_table_details_for_database_call(java.lang.String session, java.lang.String table_name, java.lang.String database_name, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.database_name = database_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_details_for_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_details_for_database_args args = new get_table_details_for_database_args(); args.setSession(session); args.setTable_name(table_name); args.setDatabase_name(database_name); args.write(prot); prot.writeMessageEnd(); } public TTableDetails getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_details_for_database(); } } public void get_internal_table_details(java.lang.String session, java.lang.String table_name, boolean include_system_columns, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException { checkReady(); get_internal_table_details_call method_call = new get_internal_table_details_call(session, table_name, include_system_columns, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_internal_table_details_call extends org.apache.thrift.async.TAsyncMethodCall<TTableDetails> { private java.lang.String session; private java.lang.String table_name; private boolean include_system_columns; public get_internal_table_details_call(java.lang.String session, java.lang.String table_name, boolean include_system_columns, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.include_system_columns = include_system_columns; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_internal_table_details", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_internal_table_details_args args = new get_internal_table_details_args(); args.setSession(session); args.setTable_name(table_name); args.setInclude_system_columns(include_system_columns); args.write(prot); prot.writeMessageEnd(); } public TTableDetails getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_internal_table_details(); } } public void get_internal_table_details_for_database(java.lang.String session, java.lang.String table_name, java.lang.String database_name, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException { checkReady(); get_internal_table_details_for_database_call method_call = new get_internal_table_details_for_database_call(session, table_name, database_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_internal_table_details_for_database_call extends org.apache.thrift.async.TAsyncMethodCall<TTableDetails> { private java.lang.String session; private java.lang.String table_name; private java.lang.String database_name; public get_internal_table_details_for_database_call(java.lang.String session, java.lang.String table_name, java.lang.String database_name, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.database_name = database_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_internal_table_details_for_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_internal_table_details_for_database_args args = new get_internal_table_details_for_database_args(); args.setSession(session); args.setTable_name(table_name); args.setDatabase_name(database_name); args.write(prot); prot.writeMessageEnd(); } public TTableDetails getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_internal_table_details_for_database(); } } public void get_users(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_users_call method_call = new get_users_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_users_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; public get_users_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_users", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_users_args args = new get_users_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_users(); } } public void get_databases(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBInfo>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_databases_call method_call = new get_databases_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_databases_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TDBInfo>> { private java.lang.String session; public get_databases_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBInfo>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_databases", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_databases_args args = new get_databases_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TDBInfo> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_databases(); } } public void get_version(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { checkReady(); get_version_call method_call = new get_version_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_version_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> { public get_version_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_version", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_version_args args = new get_version_args(); args.write(prot); prot.writeMessageEnd(); } public java.lang.String getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_version(); } } public void start_heap_profile(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); start_heap_profile_call method_call = new start_heap_profile_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class start_heap_profile_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; public start_heap_profile_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("start_heap_profile", org.apache.thrift.protocol.TMessageType.CALL, 0)); start_heap_profile_args args = new start_heap_profile_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void stop_heap_profile(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); stop_heap_profile_call method_call = new stop_heap_profile_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class stop_heap_profile_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; public stop_heap_profile_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("stop_heap_profile", org.apache.thrift.protocol.TMessageType.CALL, 0)); stop_heap_profile_args args = new stop_heap_profile_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void get_heap_profile(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { checkReady(); get_heap_profile_call method_call = new get_heap_profile_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_heap_profile_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> { private java.lang.String session; public get_heap_profile_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_heap_profile", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_heap_profile_args args = new get_heap_profile_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.lang.String getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_heap_profile(); } } public void get_memory(java.lang.String session, java.lang.String memory_level, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TNodeMemoryInfo>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_memory_call method_call = new get_memory_call(session, memory_level, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_memory_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TNodeMemoryInfo>> { private java.lang.String session; private java.lang.String memory_level; public get_memory_call(java.lang.String session, java.lang.String memory_level, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TNodeMemoryInfo>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.memory_level = memory_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_memory", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_memory_args args = new get_memory_args(); args.setSession(session); args.setMemory_level(memory_level); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TNodeMemoryInfo> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_memory(); } } public void clear_cpu_memory(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); clear_cpu_memory_call method_call = new clear_cpu_memory_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class clear_cpu_memory_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; public clear_cpu_memory_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("clear_cpu_memory", org.apache.thrift.protocol.TMessageType.CALL, 0)); clear_cpu_memory_args args = new clear_cpu_memory_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void clear_gpu_memory(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); clear_gpu_memory_call method_call = new clear_gpu_memory_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class clear_gpu_memory_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; public clear_gpu_memory_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("clear_gpu_memory", org.apache.thrift.protocol.TMessageType.CALL, 0)); clear_gpu_memory_args args = new clear_gpu_memory_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void set_cur_session(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); set_cur_session_call method_call = new set_cur_session_call(parent_session, leaf_session, start_time_str, label, for_running_query_kernel, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class set_cur_session_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String parent_session; private java.lang.String leaf_session; private java.lang.String start_time_str; private java.lang.String label; private boolean for_running_query_kernel; public set_cur_session_call(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.parent_session = parent_session; this.leaf_session = leaf_session; this.start_time_str = start_time_str; this.label = label; this.for_running_query_kernel = for_running_query_kernel; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_cur_session", org.apache.thrift.protocol.TMessageType.CALL, 0)); set_cur_session_args args = new set_cur_session_args(); args.setParent_session(parent_session); args.setLeaf_session(leaf_session); args.setStart_time_str(start_time_str); args.setLabel(label); args.setFor_running_query_kernel(for_running_query_kernel); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void invalidate_cur_session(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); invalidate_cur_session_call method_call = new invalidate_cur_session_call(parent_session, leaf_session, start_time_str, label, for_running_query_kernel, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class invalidate_cur_session_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String parent_session; private java.lang.String leaf_session; private java.lang.String start_time_str; private java.lang.String label; private boolean for_running_query_kernel; public invalidate_cur_session_call(java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.parent_session = parent_session; this.leaf_session = leaf_session; this.start_time_str = start_time_str; this.label = label; this.for_running_query_kernel = for_running_query_kernel; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("invalidate_cur_session", org.apache.thrift.protocol.TMessageType.CALL, 0)); invalidate_cur_session_args args = new invalidate_cur_session_args(); args.setParent_session(parent_session); args.setLeaf_session(leaf_session); args.setStart_time_str(start_time_str); args.setLabel(label); args.setFor_running_query_kernel(for_running_query_kernel); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void set_table_epoch(java.lang.String session, int db_id, int table_id, int new_epoch, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); set_table_epoch_call method_call = new set_table_epoch_call(session, db_id, table_id, new_epoch, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class set_table_epoch_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private int db_id; private int table_id; private int new_epoch; public set_table_epoch_call(java.lang.String session, int db_id, int table_id, int new_epoch, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.db_id = db_id; this.table_id = table_id; this.new_epoch = new_epoch; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_table_epoch", org.apache.thrift.protocol.TMessageType.CALL, 0)); set_table_epoch_args args = new set_table_epoch_args(); args.setSession(session); args.setDb_id(db_id); args.setTable_id(table_id); args.setNew_epoch(new_epoch); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void set_table_epoch_by_name(java.lang.String session, java.lang.String table_name, int new_epoch, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); set_table_epoch_by_name_call method_call = new set_table_epoch_by_name_call(session, table_name, new_epoch, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class set_table_epoch_by_name_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.lang.String table_name; private int new_epoch; public set_table_epoch_by_name_call(java.lang.String session, java.lang.String table_name, int new_epoch, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.new_epoch = new_epoch; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_table_epoch_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); set_table_epoch_by_name_args args = new set_table_epoch_by_name_args(); args.setSession(session); args.setTable_name(table_name); args.setNew_epoch(new_epoch); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void get_table_epoch(java.lang.String session, int db_id, int table_id, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_epoch_call method_call = new get_table_epoch_call(session, db_id, table_id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_epoch_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Integer> { private java.lang.String session; private int db_id; private int table_id; public get_table_epoch_call(java.lang.String session, int db_id, int table_id, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.db_id = db_id; this.table_id = table_id; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_epoch", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_epoch_args args = new get_table_epoch_args(); args.setSession(session); args.setDb_id(db_id); args.setTable_id(table_id); args.write(prot); prot.writeMessageEnd(); } public java.lang.Integer getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_epoch(); } } public void get_table_epoch_by_name(java.lang.String session, java.lang.String table_name, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_epoch_by_name_call method_call = new get_table_epoch_by_name_call(session, table_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_epoch_by_name_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Integer> { private java.lang.String session; private java.lang.String table_name; public get_table_epoch_by_name_call(java.lang.String session, java.lang.String table_name, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_epoch_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_epoch_by_name_args args = new get_table_epoch_by_name_args(); args.setSession(session); args.setTable_name(table_name); args.write(prot); prot.writeMessageEnd(); } public java.lang.Integer getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_epoch_by_name(); } } public void get_table_epochs(java.lang.String session, int db_id, int table_id, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableEpochInfo>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_epochs_call method_call = new get_table_epochs_call(session, db_id, table_id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_epochs_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TTableEpochInfo>> { private java.lang.String session; private int db_id; private int table_id; public get_table_epochs_call(java.lang.String session, int db_id, int table_id, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableEpochInfo>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.db_id = db_id; this.table_id = table_id; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_epochs", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_epochs_args args = new get_table_epochs_args(); args.setSession(session); args.setDb_id(db_id); args.setTable_id(table_id); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TTableEpochInfo> getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_epochs(); } } public void set_table_epochs(java.lang.String session, int db_id, java.util.List<TTableEpochInfo> table_epochs, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); set_table_epochs_call method_call = new set_table_epochs_call(session, db_id, table_epochs, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class set_table_epochs_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private int db_id; private java.util.List<TTableEpochInfo> table_epochs; public set_table_epochs_call(java.lang.String session, int db_id, java.util.List<TTableEpochInfo> table_epochs, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.db_id = db_id; this.table_epochs = table_epochs; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_table_epochs", org.apache.thrift.protocol.TMessageType.CALL, 0)); set_table_epochs_args args = new set_table_epochs_args(); args.setSession(session); args.setDb_id(db_id); args.setTable_epochs(table_epochs); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void get_session_info(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<TSessionInfo> resultHandler) throws org.apache.thrift.TException { checkReady(); get_session_info_call method_call = new get_session_info_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_session_info_call extends org.apache.thrift.async.TAsyncMethodCall<TSessionInfo> { private java.lang.String session; public get_session_info_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<TSessionInfo> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_session_info", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_session_info_args args = new get_session_info_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public TSessionInfo getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_session_info(); } } public void get_queries_info(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TQueryInfo>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_queries_info_call method_call = new get_queries_info_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_queries_info_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TQueryInfo>> { private java.lang.String session; public get_queries_info_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TQueryInfo>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_queries_info", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_queries_info_args args = new get_queries_info_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TQueryInfo> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_queries_info(); } } public void set_leaf_info(java.lang.String session, TLeafInfo leaf_info, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); set_leaf_info_call method_call = new set_leaf_info_call(session, leaf_info, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class set_leaf_info_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private TLeafInfo leaf_info; public set_leaf_info_call(java.lang.String session, TLeafInfo leaf_info, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.leaf_info = leaf_info; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_leaf_info", org.apache.thrift.protocol.TMessageType.CALL, 0)); set_leaf_info_args args = new set_leaf_info_args(); args.setSession(session); args.setLeaf_info(leaf_info); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void sql_execute(java.lang.String session, java.lang.String query, boolean column_format, java.lang.String nonce, int first_n, int at_most_n, org.apache.thrift.async.AsyncMethodCallback<TQueryResult> resultHandler) throws org.apache.thrift.TException { checkReady(); sql_execute_call method_call = new sql_execute_call(session, query, column_format, nonce, first_n, at_most_n, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class sql_execute_call extends org.apache.thrift.async.TAsyncMethodCall<TQueryResult> { private java.lang.String session; private java.lang.String query; private boolean column_format; private java.lang.String nonce; private int first_n; private int at_most_n; public sql_execute_call(java.lang.String session, java.lang.String query, boolean column_format, java.lang.String nonce, int first_n, int at_most_n, org.apache.thrift.async.AsyncMethodCallback<TQueryResult> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.query = query; this.column_format = column_format; this.nonce = nonce; this.first_n = first_n; this.at_most_n = at_most_n; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sql_execute", org.apache.thrift.protocol.TMessageType.CALL, 0)); sql_execute_args args = new sql_execute_args(); args.setSession(session); args.setQuery(query); args.setColumn_format(column_format); args.setNonce(nonce); args.setFirst_n(first_n); args.setAt_most_n(at_most_n); args.write(prot); prot.writeMessageEnd(); } public TQueryResult getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_sql_execute(); } } public void sql_execute_df(java.lang.String session, java.lang.String query, ai.heavy.thrift.server.TDeviceType device_type, int device_id, int first_n, TArrowTransport transport_method, org.apache.thrift.async.AsyncMethodCallback<TDataFrame> resultHandler) throws org.apache.thrift.TException { checkReady(); sql_execute_df_call method_call = new sql_execute_df_call(session, query, device_type, device_id, first_n, transport_method, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class sql_execute_df_call extends org.apache.thrift.async.TAsyncMethodCall<TDataFrame> { private java.lang.String session; private java.lang.String query; private ai.heavy.thrift.server.TDeviceType device_type; private int device_id; private int first_n; private TArrowTransport transport_method; public sql_execute_df_call(java.lang.String session, java.lang.String query, ai.heavy.thrift.server.TDeviceType device_type, int device_id, int first_n, TArrowTransport transport_method, org.apache.thrift.async.AsyncMethodCallback<TDataFrame> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.query = query; this.device_type = device_type; this.device_id = device_id; this.first_n = first_n; this.transport_method = transport_method; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sql_execute_df", org.apache.thrift.protocol.TMessageType.CALL, 0)); sql_execute_df_args args = new sql_execute_df_args(); args.setSession(session); args.setQuery(query); args.setDevice_type(device_type); args.setDevice_id(device_id); args.setFirst_n(first_n); args.setTransport_method(transport_method); args.write(prot); prot.writeMessageEnd(); } public TDataFrame getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_sql_execute_df(); } } public void sql_execute_gdf(java.lang.String session, java.lang.String query, int device_id, int first_n, org.apache.thrift.async.AsyncMethodCallback<TDataFrame> resultHandler) throws org.apache.thrift.TException { checkReady(); sql_execute_gdf_call method_call = new sql_execute_gdf_call(session, query, device_id, first_n, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class sql_execute_gdf_call extends org.apache.thrift.async.TAsyncMethodCall<TDataFrame> { private java.lang.String session; private java.lang.String query; private int device_id; private int first_n; public sql_execute_gdf_call(java.lang.String session, java.lang.String query, int device_id, int first_n, org.apache.thrift.async.AsyncMethodCallback<TDataFrame> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.query = query; this.device_id = device_id; this.first_n = first_n; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sql_execute_gdf", org.apache.thrift.protocol.TMessageType.CALL, 0)); sql_execute_gdf_args args = new sql_execute_gdf_args(); args.setSession(session); args.setQuery(query); args.setDevice_id(device_id); args.setFirst_n(first_n); args.write(prot); prot.writeMessageEnd(); } public TDataFrame getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_sql_execute_gdf(); } } public void deallocate_df(java.lang.String session, TDataFrame df, ai.heavy.thrift.server.TDeviceType device_type, int device_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); deallocate_df_call method_call = new deallocate_df_call(session, df, device_type, device_id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deallocate_df_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private TDataFrame df; private ai.heavy.thrift.server.TDeviceType device_type; private int device_id; public deallocate_df_call(java.lang.String session, TDataFrame df, ai.heavy.thrift.server.TDeviceType device_type, int device_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.df = df; this.device_type = device_type; this.device_id = device_id; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deallocate_df", org.apache.thrift.protocol.TMessageType.CALL, 0)); deallocate_df_args args = new deallocate_df_args(); args.setSession(session); args.setDf(df); args.setDevice_type(device_type); args.setDevice_id(device_id); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void interrupt(java.lang.String query_session, java.lang.String interrupt_session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); interrupt_call method_call = new interrupt_call(query_session, interrupt_session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class interrupt_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String query_session; private java.lang.String interrupt_session; public interrupt_call(java.lang.String query_session, java.lang.String interrupt_session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.query_session = query_session; this.interrupt_session = interrupt_session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("interrupt", org.apache.thrift.protocol.TMessageType.CALL, 0)); interrupt_args args = new interrupt_args(); args.setQuery_session(query_session); args.setInterrupt_session(interrupt_session); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void sql_validate(java.lang.String session, java.lang.String query, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TColumnType>> resultHandler) throws org.apache.thrift.TException { checkReady(); sql_validate_call method_call = new sql_validate_call(session, query, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class sql_validate_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TColumnType>> { private java.lang.String session; private java.lang.String query; public sql_validate_call(java.lang.String session, java.lang.String query, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TColumnType>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.query = query; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sql_validate", org.apache.thrift.protocol.TMessageType.CALL, 0)); sql_validate_args args = new sql_validate_args(); args.setSession(session); args.setQuery(query); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TColumnType> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_sql_validate(); } } public void get_completion_hints(java.lang.String session, java.lang.String sql, int cursor, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_completion_hints_call method_call = new get_completion_hints_call(session, sql, cursor, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_completion_hints_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> { private java.lang.String session; private java.lang.String sql; private int cursor; public get_completion_hints_call(java.lang.String session, java.lang.String sql, int cursor, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.sql = sql; this.cursor = cursor; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_completion_hints", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_completion_hints_args args = new get_completion_hints_args(); args.setSession(session); args.setSql(sql); args.setCursor(cursor); args.write(prot); prot.writeMessageEnd(); } public java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_completion_hints(); } } public void set_execution_mode(java.lang.String session, TExecuteMode mode, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); set_execution_mode_call method_call = new set_execution_mode_call(session, mode, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class set_execution_mode_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private TExecuteMode mode; public set_execution_mode_call(java.lang.String session, TExecuteMode mode, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.mode = mode; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_execution_mode", org.apache.thrift.protocol.TMessageType.CALL, 0)); set_execution_mode_args args = new set_execution_mode_args(); args.setSession(session); args.setMode(mode); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void render_vega(java.lang.String session, long widget_id, java.lang.String vega_json, int compression_level, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TRenderResult> resultHandler) throws org.apache.thrift.TException { checkReady(); render_vega_call method_call = new render_vega_call(session, widget_id, vega_json, compression_level, nonce, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class render_vega_call extends org.apache.thrift.async.TAsyncMethodCall<TRenderResult> { private java.lang.String session; private long widget_id; private java.lang.String vega_json; private int compression_level; private java.lang.String nonce; public render_vega_call(java.lang.String session, long widget_id, java.lang.String vega_json, int compression_level, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TRenderResult> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.widget_id = widget_id; this.vega_json = vega_json; this.compression_level = compression_level; this.nonce = nonce; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("render_vega", org.apache.thrift.protocol.TMessageType.CALL, 0)); render_vega_args args = new render_vega_args(); args.setSession(session); args.setWidget_id(widget_id); args.setVega_json(vega_json); args.setCompression_level(compression_level); args.setNonce(nonce); args.write(prot); prot.writeMessageEnd(); } public TRenderResult getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_render_vega(); } } public void get_result_row_for_pixel(java.lang.String session, long widget_id, TPixel pixel, java.util.Map<java.lang.String,java.util.List<java.lang.String>> table_col_names, boolean column_format, int pixelRadius, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TPixelTableRowResult> resultHandler) throws org.apache.thrift.TException { checkReady(); get_result_row_for_pixel_call method_call = new get_result_row_for_pixel_call(session, widget_id, pixel, table_col_names, column_format, pixelRadius, nonce, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_result_row_for_pixel_call extends org.apache.thrift.async.TAsyncMethodCall<TPixelTableRowResult> { private java.lang.String session; private long widget_id; private TPixel pixel; private java.util.Map<java.lang.String,java.util.List<java.lang.String>> table_col_names; private boolean column_format; private int pixelRadius; private java.lang.String nonce; public get_result_row_for_pixel_call(java.lang.String session, long widget_id, TPixel pixel, java.util.Map<java.lang.String,java.util.List<java.lang.String>> table_col_names, boolean column_format, int pixelRadius, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TPixelTableRowResult> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.widget_id = widget_id; this.pixel = pixel; this.table_col_names = table_col_names; this.column_format = column_format; this.pixelRadius = pixelRadius; this.nonce = nonce; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_result_row_for_pixel", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_result_row_for_pixel_args args = new get_result_row_for_pixel_args(); args.setSession(session); args.setWidget_id(widget_id); args.setPixel(pixel); args.setTable_col_names(table_col_names); args.setColumn_format(column_format); args.setPixelRadius(pixelRadius); args.setNonce(nonce); args.write(prot); prot.writeMessageEnd(); } public TPixelTableRowResult getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_result_row_for_pixel(); } } public void create_custom_expression(java.lang.String session, TCustomExpression custom_expression, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException { checkReady(); create_custom_expression_call method_call = new create_custom_expression_call(session, custom_expression, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_custom_expression_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Integer> { private java.lang.String session; private TCustomExpression custom_expression; public create_custom_expression_call(java.lang.String session, TCustomExpression custom_expression, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.custom_expression = custom_expression; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_custom_expression", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_custom_expression_args args = new create_custom_expression_args(); args.setSession(session); args.setCustom_expression(custom_expression); args.write(prot); prot.writeMessageEnd(); } public java.lang.Integer getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_create_custom_expression(); } } public void get_custom_expressions(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCustomExpression>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_custom_expressions_call method_call = new get_custom_expressions_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_custom_expressions_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TCustomExpression>> { private java.lang.String session; public get_custom_expressions_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCustomExpression>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_custom_expressions", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_custom_expressions_args args = new get_custom_expressions_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TCustomExpression> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_custom_expressions(); } } public void update_custom_expression(java.lang.String session, int id, java.lang.String expression_json, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); update_custom_expression_call method_call = new update_custom_expression_call(session, id, expression_json, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class update_custom_expression_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private int id; private java.lang.String expression_json; public update_custom_expression_call(java.lang.String session, int id, java.lang.String expression_json, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.id = id; this.expression_json = expression_json; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_custom_expression", org.apache.thrift.protocol.TMessageType.CALL, 0)); update_custom_expression_args args = new update_custom_expression_args(); args.setSession(session); args.setId(id); args.setExpression_json(expression_json); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void delete_custom_expressions(java.lang.String session, java.util.List<java.lang.Integer> custom_expression_ids, boolean do_soft_delete, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); delete_custom_expressions_call method_call = new delete_custom_expressions_call(session, custom_expression_ids, do_soft_delete, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class delete_custom_expressions_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.util.List<java.lang.Integer> custom_expression_ids; private boolean do_soft_delete; public delete_custom_expressions_call(java.lang.String session, java.util.List<java.lang.Integer> custom_expression_ids, boolean do_soft_delete, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.custom_expression_ids = custom_expression_ids; this.do_soft_delete = do_soft_delete; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_custom_expressions", org.apache.thrift.protocol.TMessageType.CALL, 0)); delete_custom_expressions_args args = new delete_custom_expressions_args(); args.setSession(session); args.setCustom_expression_ids(custom_expression_ids); args.setDo_soft_delete(do_soft_delete); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void get_dashboard(java.lang.String session, int dashboard_id, org.apache.thrift.async.AsyncMethodCallback<TDashboard> resultHandler) throws org.apache.thrift.TException { checkReady(); get_dashboard_call method_call = new get_dashboard_call(session, dashboard_id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_dashboard_call extends org.apache.thrift.async.TAsyncMethodCall<TDashboard> { private java.lang.String session; private int dashboard_id; public get_dashboard_call(java.lang.String session, int dashboard_id, org.apache.thrift.async.AsyncMethodCallback<TDashboard> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dashboard_id = dashboard_id; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_dashboard", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_dashboard_args args = new get_dashboard_args(); args.setSession(session); args.setDashboard_id(dashboard_id); args.write(prot); prot.writeMessageEnd(); } public TDashboard getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_dashboard(); } } public void get_dashboards(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboard>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_dashboards_call method_call = new get_dashboards_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_dashboards_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TDashboard>> { private java.lang.String session; public get_dashboards_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboard>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_dashboards", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_dashboards_args args = new get_dashboards_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TDashboard> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_dashboards(); } } public void create_dashboard(java.lang.String session, java.lang.String dashboard_name, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException { checkReady(); create_dashboard_call method_call = new create_dashboard_call(session, dashboard_name, dashboard_state, image_hash, dashboard_metadata, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_dashboard_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Integer> { private java.lang.String session; private java.lang.String dashboard_name; private java.lang.String dashboard_state; private java.lang.String image_hash; private java.lang.String dashboard_metadata; public create_dashboard_call(java.lang.String session, java.lang.String dashboard_name, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dashboard_name = dashboard_name; this.dashboard_state = dashboard_state; this.image_hash = image_hash; this.dashboard_metadata = dashboard_metadata; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_dashboard", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_dashboard_args args = new create_dashboard_args(); args.setSession(session); args.setDashboard_name(dashboard_name); args.setDashboard_state(dashboard_state); args.setImage_hash(image_hash); args.setDashboard_metadata(dashboard_metadata); args.write(prot); prot.writeMessageEnd(); } public java.lang.Integer getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_create_dashboard(); } } public void replace_dashboard(java.lang.String session, int dashboard_id, java.lang.String dashboard_name, java.lang.String dashboard_owner, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); replace_dashboard_call method_call = new replace_dashboard_call(session, dashboard_id, dashboard_name, dashboard_owner, dashboard_state, image_hash, dashboard_metadata, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class replace_dashboard_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private int dashboard_id; private java.lang.String dashboard_name; private java.lang.String dashboard_owner; private java.lang.String dashboard_state; private java.lang.String image_hash; private java.lang.String dashboard_metadata; public replace_dashboard_call(java.lang.String session, int dashboard_id, java.lang.String dashboard_name, java.lang.String dashboard_owner, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dashboard_id = dashboard_id; this.dashboard_name = dashboard_name; this.dashboard_owner = dashboard_owner; this.dashboard_state = dashboard_state; this.image_hash = image_hash; this.dashboard_metadata = dashboard_metadata; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("replace_dashboard", org.apache.thrift.protocol.TMessageType.CALL, 0)); replace_dashboard_args args = new replace_dashboard_args(); args.setSession(session); args.setDashboard_id(dashboard_id); args.setDashboard_name(dashboard_name); args.setDashboard_owner(dashboard_owner); args.setDashboard_state(dashboard_state); args.setImage_hash(image_hash); args.setDashboard_metadata(dashboard_metadata); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void delete_dashboard(java.lang.String session, int dashboard_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); delete_dashboard_call method_call = new delete_dashboard_call(session, dashboard_id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class delete_dashboard_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private int dashboard_id; public delete_dashboard_call(java.lang.String session, int dashboard_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dashboard_id = dashboard_id; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_dashboard", org.apache.thrift.protocol.TMessageType.CALL, 0)); delete_dashboard_args args = new delete_dashboard_args(); args.setSession(session); args.setDashboard_id(dashboard_id); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void share_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); share_dashboards_call method_call = new share_dashboards_call(session, dashboard_ids, groups, permissions, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class share_dashboards_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.util.List<java.lang.Integer> dashboard_ids; private java.util.List<java.lang.String> groups; private TDashboardPermissions permissions; public share_dashboards_call(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dashboard_ids = dashboard_ids; this.groups = groups; this.permissions = permissions; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("share_dashboards", org.apache.thrift.protocol.TMessageType.CALL, 0)); share_dashboards_args args = new share_dashboards_args(); args.setSession(session); args.setDashboard_ids(dashboard_ids); args.setGroups(groups); args.setPermissions(permissions); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void delete_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); delete_dashboards_call method_call = new delete_dashboards_call(session, dashboard_ids, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class delete_dashboards_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.util.List<java.lang.Integer> dashboard_ids; public delete_dashboards_call(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dashboard_ids = dashboard_ids; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_dashboards", org.apache.thrift.protocol.TMessageType.CALL, 0)); delete_dashboards_args args = new delete_dashboards_args(); args.setSession(session); args.setDashboard_ids(dashboard_ids); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void share_dashboard(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions, boolean grant_role, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); share_dashboard_call method_call = new share_dashboard_call(session, dashboard_id, groups, objects, permissions, grant_role, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class share_dashboard_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private int dashboard_id; private java.util.List<java.lang.String> groups; private java.util.List<java.lang.String> objects; private TDashboardPermissions permissions; private boolean grant_role; public share_dashboard_call(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions, boolean grant_role, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dashboard_id = dashboard_id; this.groups = groups; this.objects = objects; this.permissions = permissions; this.grant_role = grant_role; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("share_dashboard", org.apache.thrift.protocol.TMessageType.CALL, 0)); share_dashboard_args args = new share_dashboard_args(); args.setSession(session); args.setDashboard_id(dashboard_id); args.setGroups(groups); args.setObjects(objects); args.setPermissions(permissions); args.setGrant_role(grant_role); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void unshare_dashboard(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); unshare_dashboard_call method_call = new unshare_dashboard_call(session, dashboard_id, groups, objects, permissions, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class unshare_dashboard_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private int dashboard_id; private java.util.List<java.lang.String> groups; private java.util.List<java.lang.String> objects; private TDashboardPermissions permissions; public unshare_dashboard_call(java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dashboard_id = dashboard_id; this.groups = groups; this.objects = objects; this.permissions = permissions; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unshare_dashboard", org.apache.thrift.protocol.TMessageType.CALL, 0)); unshare_dashboard_args args = new unshare_dashboard_args(); args.setSession(session); args.setDashboard_id(dashboard_id); args.setGroups(groups); args.setObjects(objects); args.setPermissions(permissions); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void unshare_dashboards(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); unshare_dashboards_call method_call = new unshare_dashboards_call(session, dashboard_ids, groups, permissions, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class unshare_dashboards_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.util.List<java.lang.Integer> dashboard_ids; private java.util.List<java.lang.String> groups; private TDashboardPermissions permissions; public unshare_dashboards_call(java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dashboard_ids = dashboard_ids; this.groups = groups; this.permissions = permissions; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unshare_dashboards", org.apache.thrift.protocol.TMessageType.CALL, 0)); unshare_dashboards_args args = new unshare_dashboards_args(); args.setSession(session); args.setDashboard_ids(dashboard_ids); args.setGroups(groups); args.setPermissions(permissions); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void get_dashboard_grantees(java.lang.String session, int dashboard_id, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboardGrantees>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_dashboard_grantees_call method_call = new get_dashboard_grantees_call(session, dashboard_id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_dashboard_grantees_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TDashboardGrantees>> { private java.lang.String session; private int dashboard_id; public get_dashboard_grantees_call(java.lang.String session, int dashboard_id, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboardGrantees>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.dashboard_id = dashboard_id; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_dashboard_grantees", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_dashboard_grantees_args args = new get_dashboard_grantees_args(); args.setSession(session); args.setDashboard_id(dashboard_id); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TDashboardGrantees> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_dashboard_grantees(); } } public void get_link_view(java.lang.String session, java.lang.String link, org.apache.thrift.async.AsyncMethodCallback<TFrontendView> resultHandler) throws org.apache.thrift.TException { checkReady(); get_link_view_call method_call = new get_link_view_call(session, link, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_link_view_call extends org.apache.thrift.async.TAsyncMethodCall<TFrontendView> { private java.lang.String session; private java.lang.String link; public get_link_view_call(java.lang.String session, java.lang.String link, org.apache.thrift.async.AsyncMethodCallback<TFrontendView> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.link = link; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_link_view", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_link_view_args args = new get_link_view_args(); args.setSession(session); args.setLink(link); args.write(prot); prot.writeMessageEnd(); } public TFrontendView getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_link_view(); } } public void create_link(java.lang.String session, java.lang.String view_state, java.lang.String view_metadata, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { checkReady(); create_link_call method_call = new create_link_call(session, view_state, view_metadata, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_link_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> { private java.lang.String session; private java.lang.String view_state; private java.lang.String view_metadata; public create_link_call(java.lang.String session, java.lang.String view_state, java.lang.String view_metadata, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.view_state = view_state; this.view_metadata = view_metadata; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_link", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_link_args args = new create_link_args(); args.setSession(session); args.setView_state(view_state); args.setView_metadata(view_metadata); args.write(prot); prot.writeMessageEnd(); } public java.lang.String getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_create_link(); } } public void load_table_binary(java.lang.String session, java.lang.String table_name, java.util.List<TRow> rows, java.util.List<java.lang.String> column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); load_table_binary_call method_call = new load_table_binary_call(session, table_name, rows, column_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class load_table_binary_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.lang.String table_name; private java.util.List<TRow> rows; private java.util.List<java.lang.String> column_names; public load_table_binary_call(java.lang.String session, java.lang.String table_name, java.util.List<TRow> rows, java.util.List<java.lang.String> column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.rows = rows; this.column_names = column_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("load_table_binary", org.apache.thrift.protocol.TMessageType.CALL, 0)); load_table_binary_args args = new load_table_binary_args(); args.setSession(session); args.setTable_name(table_name); args.setRows(rows); args.setColumn_names(column_names); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void load_table_binary_columnar(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); load_table_binary_columnar_call method_call = new load_table_binary_columnar_call(session, table_name, cols, column_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class load_table_binary_columnar_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.lang.String table_name; private java.util.List<TColumn> cols; private java.util.List<java.lang.String> column_names; public load_table_binary_columnar_call(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.cols = cols; this.column_names = column_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("load_table_binary_columnar", org.apache.thrift.protocol.TMessageType.CALL, 0)); load_table_binary_columnar_args args = new load_table_binary_columnar_args(); args.setSession(session); args.setTable_name(table_name); args.setCols(cols); args.setColumn_names(column_names); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void load_table_binary_columnar_polys(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names, boolean assign_render_groups, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); load_table_binary_columnar_polys_call method_call = new load_table_binary_columnar_polys_call(session, table_name, cols, column_names, assign_render_groups, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class load_table_binary_columnar_polys_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.lang.String table_name; private java.util.List<TColumn> cols; private java.util.List<java.lang.String> column_names; private boolean assign_render_groups; public load_table_binary_columnar_polys_call(java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names, boolean assign_render_groups, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.cols = cols; this.column_names = column_names; this.assign_render_groups = assign_render_groups; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("load_table_binary_columnar_polys", org.apache.thrift.protocol.TMessageType.CALL, 0)); load_table_binary_columnar_polys_args args = new load_table_binary_columnar_polys_args(); args.setSession(session); args.setTable_name(table_name); args.setCols(cols); args.setColumn_names(column_names); args.setAssign_render_groups(assign_render_groups); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void load_table_binary_arrow(java.lang.String session, java.lang.String table_name, java.nio.ByteBuffer arrow_stream, boolean use_column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); load_table_binary_arrow_call method_call = new load_table_binary_arrow_call(session, table_name, arrow_stream, use_column_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class load_table_binary_arrow_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.lang.String table_name; private java.nio.ByteBuffer arrow_stream; private boolean use_column_names; public load_table_binary_arrow_call(java.lang.String session, java.lang.String table_name, java.nio.ByteBuffer arrow_stream, boolean use_column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.arrow_stream = arrow_stream; this.use_column_names = use_column_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("load_table_binary_arrow", org.apache.thrift.protocol.TMessageType.CALL, 0)); load_table_binary_arrow_args args = new load_table_binary_arrow_args(); args.setSession(session); args.setTable_name(table_name); args.setArrow_stream(arrow_stream); args.setUse_column_names(use_column_names); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void load_table(java.lang.String session, java.lang.String table_name, java.util.List<TStringRow> rows, java.util.List<java.lang.String> column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); load_table_call method_call = new load_table_call(session, table_name, rows, column_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class load_table_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.lang.String table_name; private java.util.List<TStringRow> rows; private java.util.List<java.lang.String> column_names; public load_table_call(java.lang.String session, java.lang.String table_name, java.util.List<TStringRow> rows, java.util.List<java.lang.String> column_names, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.rows = rows; this.column_names = column_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("load_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); load_table_args args = new load_table_args(); args.setSession(session); args.setTable_name(table_name); args.setRows(rows); args.setColumn_names(column_names); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void detect_column_types(java.lang.String session, java.lang.String file_name, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<TDetectResult> resultHandler) throws org.apache.thrift.TException { checkReady(); detect_column_types_call method_call = new detect_column_types_call(session, file_name, copy_params, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class detect_column_types_call extends org.apache.thrift.async.TAsyncMethodCall<TDetectResult> { private java.lang.String session; private java.lang.String file_name; private TCopyParams copy_params; public detect_column_types_call(java.lang.String session, java.lang.String file_name, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<TDetectResult> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.file_name = file_name; this.copy_params = copy_params; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("detect_column_types", org.apache.thrift.protocol.TMessageType.CALL, 0)); detect_column_types_args args = new detect_column_types_args(); args.setSession(session); args.setFile_name(file_name); args.setCopy_params(copy_params); args.write(prot); prot.writeMessageEnd(); } public TDetectResult getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_detect_column_types(); } } public void create_table(java.lang.String session, java.lang.String table_name, java.util.List<TColumnType> row_desc, TCreateParams create_params, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); create_table_call method_call = new create_table_call(session, table_name, row_desc, create_params, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_table_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.lang.String table_name; private java.util.List<TColumnType> row_desc; private TCreateParams create_params; public create_table_call(java.lang.String session, java.lang.String table_name, java.util.List<TColumnType> row_desc, TCreateParams create_params, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.row_desc = row_desc; this.create_params = create_params; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_table_args args = new create_table_args(); args.setSession(session); args.setTable_name(table_name); args.setRow_desc(row_desc); args.setCreate_params(create_params); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void import_table(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); import_table_call method_call = new import_table_call(session, table_name, file_name, copy_params, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class import_table_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.lang.String table_name; private java.lang.String file_name; private TCopyParams copy_params; public import_table_call(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.file_name = file_name; this.copy_params = copy_params; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("import_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); import_table_args args = new import_table_args(); args.setSession(session); args.setTable_name(table_name); args.setFile_name(file_name); args.setCopy_params(copy_params); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void import_geo_table(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params, java.util.List<TColumnType> row_desc, TCreateParams create_params, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); import_geo_table_call method_call = new import_geo_table_call(session, table_name, file_name, copy_params, row_desc, create_params, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class import_geo_table_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.lang.String table_name; private java.lang.String file_name; private TCopyParams copy_params; private java.util.List<TColumnType> row_desc; private TCreateParams create_params; public import_geo_table_call(java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params, java.util.List<TColumnType> row_desc, TCreateParams create_params, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_name = table_name; this.file_name = file_name; this.copy_params = copy_params; this.row_desc = row_desc; this.create_params = create_params; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("import_geo_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); import_geo_table_args args = new import_geo_table_args(); args.setSession(session); args.setTable_name(table_name); args.setFile_name(file_name); args.setCopy_params(copy_params); args.setRow_desc(row_desc); args.setCreate_params(create_params); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void import_table_status(java.lang.String session, java.lang.String import_id, org.apache.thrift.async.AsyncMethodCallback<TImportStatus> resultHandler) throws org.apache.thrift.TException { checkReady(); import_table_status_call method_call = new import_table_status_call(session, import_id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class import_table_status_call extends org.apache.thrift.async.TAsyncMethodCall<TImportStatus> { private java.lang.String session; private java.lang.String import_id; public import_table_status_call(java.lang.String session, java.lang.String import_id, org.apache.thrift.async.AsyncMethodCallback<TImportStatus> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.import_id = import_id; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("import_table_status", org.apache.thrift.protocol.TMessageType.CALL, 0)); import_table_status_args args = new import_table_status_args(); args.setSession(session); args.setImport_id(import_id); args.write(prot); prot.writeMessageEnd(); } public TImportStatus getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_import_table_status(); } } public void get_first_geo_file_in_archive(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { checkReady(); get_first_geo_file_in_archive_call method_call = new get_first_geo_file_in_archive_call(session, archive_path, copy_params, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_first_geo_file_in_archive_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> { private java.lang.String session; private java.lang.String archive_path; private TCopyParams copy_params; public get_first_geo_file_in_archive_call(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.archive_path = archive_path; this.copy_params = copy_params; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_first_geo_file_in_archive", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_first_geo_file_in_archive_args args = new get_first_geo_file_in_archive_args(); args.setSession(session); args.setArchive_path(archive_path); args.setCopy_params(copy_params); args.write(prot); prot.writeMessageEnd(); } public java.lang.String getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_first_geo_file_in_archive(); } } public void get_all_files_in_archive(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_all_files_in_archive_call method_call = new get_all_files_in_archive_call(session, archive_path, copy_params, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_all_files_in_archive_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; private java.lang.String archive_path; private TCopyParams copy_params; public get_all_files_in_archive_call(java.lang.String session, java.lang.String archive_path, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.archive_path = archive_path; this.copy_params = copy_params; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_files_in_archive", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_all_files_in_archive_args args = new get_all_files_in_archive_args(); args.setSession(session); args.setArchive_path(archive_path); args.setCopy_params(copy_params); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_all_files_in_archive(); } } public void get_layers_in_geo_file(java.lang.String session, java.lang.String file_name, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TGeoFileLayerInfo>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_layers_in_geo_file_call method_call = new get_layers_in_geo_file_call(session, file_name, copy_params, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_layers_in_geo_file_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TGeoFileLayerInfo>> { private java.lang.String session; private java.lang.String file_name; private TCopyParams copy_params; public get_layers_in_geo_file_call(java.lang.String session, java.lang.String file_name, TCopyParams copy_params, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TGeoFileLayerInfo>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.file_name = file_name; this.copy_params = copy_params; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_layers_in_geo_file", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_layers_in_geo_file_args args = new get_layers_in_geo_file_args(); args.setSession(session); args.setFile_name(file_name); args.setCopy_params(copy_params); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TGeoFileLayerInfo> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_layers_in_geo_file(); } } public void query_get_outer_fragment_count(java.lang.String session, java.lang.String query, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException { checkReady(); query_get_outer_fragment_count_call method_call = new query_get_outer_fragment_count_call(session, query, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class query_get_outer_fragment_count_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> { private java.lang.String session; private java.lang.String query; public query_get_outer_fragment_count_call(java.lang.String session, java.lang.String query, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.query = query; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("query_get_outer_fragment_count", org.apache.thrift.protocol.TMessageType.CALL, 0)); query_get_outer_fragment_count_args args = new query_get_outer_fragment_count_args(); args.setSession(session); args.setQuery(query); args.write(prot); prot.writeMessageEnd(); } public java.lang.Long getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_query_get_outer_fragment_count(); } } public void check_table_consistency(java.lang.String session, int table_id, org.apache.thrift.async.AsyncMethodCallback<TTableMeta> resultHandler) throws org.apache.thrift.TException { checkReady(); check_table_consistency_call method_call = new check_table_consistency_call(session, table_id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class check_table_consistency_call extends org.apache.thrift.async.TAsyncMethodCall<TTableMeta> { private java.lang.String session; private int table_id; public check_table_consistency_call(java.lang.String session, int table_id, org.apache.thrift.async.AsyncMethodCallback<TTableMeta> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_id = table_id; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("check_table_consistency", org.apache.thrift.protocol.TMessageType.CALL, 0)); check_table_consistency_args args = new check_table_consistency_args(); args.setSession(session); args.setTable_id(table_id); args.write(prot); prot.writeMessageEnd(); } public TTableMeta getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_check_table_consistency(); } } public void start_query(java.lang.String leaf_session, java.lang.String parent_session, java.lang.String query_ra, java.lang.String start_time_str, boolean just_explain, java.util.List<java.lang.Long> outer_fragment_indices, org.apache.thrift.async.AsyncMethodCallback<TPendingQuery> resultHandler) throws org.apache.thrift.TException { checkReady(); start_query_call method_call = new start_query_call(leaf_session, parent_session, query_ra, start_time_str, just_explain, outer_fragment_indices, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class start_query_call extends org.apache.thrift.async.TAsyncMethodCall<TPendingQuery> { private java.lang.String leaf_session; private java.lang.String parent_session; private java.lang.String query_ra; private java.lang.String start_time_str; private boolean just_explain; private java.util.List<java.lang.Long> outer_fragment_indices; public start_query_call(java.lang.String leaf_session, java.lang.String parent_session, java.lang.String query_ra, java.lang.String start_time_str, boolean just_explain, java.util.List<java.lang.Long> outer_fragment_indices, org.apache.thrift.async.AsyncMethodCallback<TPendingQuery> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.leaf_session = leaf_session; this.parent_session = parent_session; this.query_ra = query_ra; this.start_time_str = start_time_str; this.just_explain = just_explain; this.outer_fragment_indices = outer_fragment_indices; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("start_query", org.apache.thrift.protocol.TMessageType.CALL, 0)); start_query_args args = new start_query_args(); args.setLeaf_session(leaf_session); args.setParent_session(parent_session); args.setQuery_ra(query_ra); args.setStart_time_str(start_time_str); args.setJust_explain(just_explain); args.setOuter_fragment_indices(outer_fragment_indices); args.write(prot); prot.writeMessageEnd(); } public TPendingQuery getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_start_query(); } } public void execute_query_step(TPendingQuery pending_query, long subquery_id, java.lang.String start_time_str, org.apache.thrift.async.AsyncMethodCallback<TStepResult> resultHandler) throws org.apache.thrift.TException { checkReady(); execute_query_step_call method_call = new execute_query_step_call(pending_query, subquery_id, start_time_str, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class execute_query_step_call extends org.apache.thrift.async.TAsyncMethodCall<TStepResult> { private TPendingQuery pending_query; private long subquery_id; private java.lang.String start_time_str; public execute_query_step_call(TPendingQuery pending_query, long subquery_id, java.lang.String start_time_str, org.apache.thrift.async.AsyncMethodCallback<TStepResult> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.pending_query = pending_query; this.subquery_id = subquery_id; this.start_time_str = start_time_str; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("execute_query_step", org.apache.thrift.protocol.TMessageType.CALL, 0)); execute_query_step_args args = new execute_query_step_args(); args.setPending_query(pending_query); args.setSubquery_id(subquery_id); args.setStart_time_str(start_time_str); args.write(prot); prot.writeMessageEnd(); } public TStepResult getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_execute_query_step(); } } public void broadcast_serialized_rows(ai.heavy.thrift.server.TSerializedRows serialized_rows, java.util.List<TColumnType> row_desc, long query_id, long subquery_id, boolean is_final_subquery_result, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); broadcast_serialized_rows_call method_call = new broadcast_serialized_rows_call(serialized_rows, row_desc, query_id, subquery_id, is_final_subquery_result, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class broadcast_serialized_rows_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private ai.heavy.thrift.server.TSerializedRows serialized_rows; private java.util.List<TColumnType> row_desc; private long query_id; private long subquery_id; private boolean is_final_subquery_result; public broadcast_serialized_rows_call(ai.heavy.thrift.server.TSerializedRows serialized_rows, java.util.List<TColumnType> row_desc, long query_id, long subquery_id, boolean is_final_subquery_result, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.serialized_rows = serialized_rows; this.row_desc = row_desc; this.query_id = query_id; this.subquery_id = subquery_id; this.is_final_subquery_result = is_final_subquery_result; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("broadcast_serialized_rows", org.apache.thrift.protocol.TMessageType.CALL, 0)); broadcast_serialized_rows_args args = new broadcast_serialized_rows_args(); args.setSerialized_rows(serialized_rows); args.setRow_desc(row_desc); args.setQuery_id(query_id); args.setSubquery_id(subquery_id); args.setIs_final_subquery_result(is_final_subquery_result); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void start_render_query(java.lang.String session, long widget_id, short node_idx, java.lang.String vega_json, org.apache.thrift.async.AsyncMethodCallback<TPendingRenderQuery> resultHandler) throws org.apache.thrift.TException { checkReady(); start_render_query_call method_call = new start_render_query_call(session, widget_id, node_idx, vega_json, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class start_render_query_call extends org.apache.thrift.async.TAsyncMethodCall<TPendingRenderQuery> { private java.lang.String session; private long widget_id; private short node_idx; private java.lang.String vega_json; public start_render_query_call(java.lang.String session, long widget_id, short node_idx, java.lang.String vega_json, org.apache.thrift.async.AsyncMethodCallback<TPendingRenderQuery> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.widget_id = widget_id; this.node_idx = node_idx; this.vega_json = vega_json; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("start_render_query", org.apache.thrift.protocol.TMessageType.CALL, 0)); start_render_query_args args = new start_render_query_args(); args.setSession(session); args.setWidget_id(widget_id); args.setNode_idx(node_idx); args.setVega_json(vega_json); args.write(prot); prot.writeMessageEnd(); } public TPendingRenderQuery getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_start_render_query(); } } public void execute_next_render_step(TPendingRenderQuery pending_render, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> merged_data, org.apache.thrift.async.AsyncMethodCallback<TRenderStepResult> resultHandler) throws org.apache.thrift.TException { checkReady(); execute_next_render_step_call method_call = new execute_next_render_step_call(pending_render, merged_data, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class execute_next_render_step_call extends org.apache.thrift.async.TAsyncMethodCall<TRenderStepResult> { private TPendingRenderQuery pending_render; private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> merged_data; public execute_next_render_step_call(TPendingRenderQuery pending_render, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> merged_data, org.apache.thrift.async.AsyncMethodCallback<TRenderStepResult> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.pending_render = pending_render; this.merged_data = merged_data; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("execute_next_render_step", org.apache.thrift.protocol.TMessageType.CALL, 0)); execute_next_render_step_args args = new execute_next_render_step_args(); args.setPending_render(pending_render); args.setMerged_data(merged_data); args.write(prot); prot.writeMessageEnd(); } public TRenderStepResult getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_execute_next_render_step(); } } public void insert_data(java.lang.String session, TInsertData insert_data, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); insert_data_call method_call = new insert_data_call(session, insert_data, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class insert_data_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private TInsertData insert_data; public insert_data_call(java.lang.String session, TInsertData insert_data, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.insert_data = insert_data; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insert_data", org.apache.thrift.protocol.TMessageType.CALL, 0)); insert_data_args args = new insert_data_args(); args.setSession(session); args.setInsert_data(insert_data); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void insert_chunks(java.lang.String session, TInsertChunks insert_chunks, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); insert_chunks_call method_call = new insert_chunks_call(session, insert_chunks, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class insert_chunks_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private TInsertChunks insert_chunks; public insert_chunks_call(java.lang.String session, TInsertChunks insert_chunks, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.insert_chunks = insert_chunks; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insert_chunks", org.apache.thrift.protocol.TMessageType.CALL, 0)); insert_chunks_args args = new insert_chunks_args(); args.setSession(session); args.setInsert_chunks(insert_chunks); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void checkpoint(java.lang.String session, int table_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); checkpoint_call method_call = new checkpoint_call(session, table_id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class checkpoint_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private int table_id; public checkpoint_call(java.lang.String session, int table_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.table_id = table_id; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("checkpoint", org.apache.thrift.protocol.TMessageType.CALL, 0)); checkpoint_args args = new checkpoint_args(); args.setSession(session); args.setTable_id(table_id); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void get_roles(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_roles_call method_call = new get_roles_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_roles_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; public get_roles_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_roles", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_roles_args args = new get_roles_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_roles(); } } public void get_db_objects_for_grantee(java.lang.String session, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_db_objects_for_grantee_call method_call = new get_db_objects_for_grantee_call(session, roleName, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_db_objects_for_grantee_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TDBObject>> { private java.lang.String session; private java.lang.String roleName; public get_db_objects_for_grantee_call(java.lang.String session, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.roleName = roleName; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_db_objects_for_grantee", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_db_objects_for_grantee_args args = new get_db_objects_for_grantee_args(); args.setSession(session); args.setRoleName(roleName); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TDBObject> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_db_objects_for_grantee(); } } public void get_db_object_privs(java.lang.String session, java.lang.String objectName, TDBObjectType type, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_db_object_privs_call method_call = new get_db_object_privs_call(session, objectName, type, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_db_object_privs_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TDBObject>> { private java.lang.String session; private java.lang.String objectName; private TDBObjectType type; public get_db_object_privs_call(java.lang.String session, java.lang.String objectName, TDBObjectType type, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.objectName = objectName; this.type = type; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_db_object_privs", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_db_object_privs_args args = new get_db_object_privs_args(); args.setSession(session); args.setObjectName(objectName); args.setType(type); args.write(prot); prot.writeMessageEnd(); } public java.util.List<TDBObject> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_db_object_privs(); } } public void get_all_roles_for_user(java.lang.String session, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_all_roles_for_user_call method_call = new get_all_roles_for_user_call(session, userName, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_all_roles_for_user_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; private java.lang.String userName; public get_all_roles_for_user_call(java.lang.String session, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.userName = userName; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_roles_for_user", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_all_roles_for_user_args args = new get_all_roles_for_user_args(); args.setSession(session); args.setUserName(userName); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_all_roles_for_user(); } } public void get_all_effective_roles_for_user(java.lang.String session, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_all_effective_roles_for_user_call method_call = new get_all_effective_roles_for_user_call(session, userName, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_all_effective_roles_for_user_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; private java.lang.String userName; public get_all_effective_roles_for_user_call(java.lang.String session, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.userName = userName; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_effective_roles_for_user", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_all_effective_roles_for_user_args args = new get_all_effective_roles_for_user_args(); args.setSession(session); args.setUserName(userName); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_all_effective_roles_for_user(); } } public void has_role(java.lang.String session, java.lang.String granteeName, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException { checkReady(); has_role_call method_call = new has_role_call(session, granteeName, roleName, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class has_role_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> { private java.lang.String session; private java.lang.String granteeName; private java.lang.String roleName; public has_role_call(java.lang.String session, java.lang.String granteeName, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.granteeName = granteeName; this.roleName = roleName; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("has_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); has_role_args args = new has_role_args(); args.setSession(session); args.setGranteeName(granteeName); args.setRoleName(roleName); args.write(prot); prot.writeMessageEnd(); } public java.lang.Boolean getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_has_role(); } } public void has_object_privilege(java.lang.String session, java.lang.String granteeName, java.lang.String ObjectName, TDBObjectType objectType, TDBObjectPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException { checkReady(); has_object_privilege_call method_call = new has_object_privilege_call(session, granteeName, ObjectName, objectType, permissions, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class has_object_privilege_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> { private java.lang.String session; private java.lang.String granteeName; private java.lang.String ObjectName; private TDBObjectType objectType; private TDBObjectPermissions permissions; public has_object_privilege_call(java.lang.String session, java.lang.String granteeName, java.lang.String ObjectName, TDBObjectType objectType, TDBObjectPermissions permissions, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.granteeName = granteeName; this.ObjectName = ObjectName; this.objectType = objectType; this.permissions = permissions; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("has_object_privilege", org.apache.thrift.protocol.TMessageType.CALL, 0)); has_object_privilege_args args = new has_object_privilege_args(); args.setSession(session); args.setGranteeName(granteeName); args.setObjectName(ObjectName); args.setObjectType(objectType); args.setPermissions(permissions); args.write(prot); prot.writeMessageEnd(); } public java.lang.Boolean getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_has_object_privilege(); } } public void set_license_key(java.lang.String session, java.lang.String key, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo> resultHandler) throws org.apache.thrift.TException { checkReady(); set_license_key_call method_call = new set_license_key_call(session, key, nonce, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class set_license_key_call extends org.apache.thrift.async.TAsyncMethodCall<TLicenseInfo> { private java.lang.String session; private java.lang.String key; private java.lang.String nonce; public set_license_key_call(java.lang.String session, java.lang.String key, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.key = key; this.nonce = nonce; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_license_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); set_license_key_args args = new set_license_key_args(); args.setSession(session); args.setKey(key); args.setNonce(nonce); args.write(prot); prot.writeMessageEnd(); } public TLicenseInfo getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_set_license_key(); } } public void get_license_claims(java.lang.String session, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo> resultHandler) throws org.apache.thrift.TException { checkReady(); get_license_claims_call method_call = new get_license_claims_call(session, nonce, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_license_claims_call extends org.apache.thrift.async.TAsyncMethodCall<TLicenseInfo> { private java.lang.String session; private java.lang.String nonce; public get_license_claims_call(java.lang.String session, java.lang.String nonce, org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.nonce = nonce; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_license_claims", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_license_claims_args args = new get_license_claims_args(); args.setSession(session); args.setNonce(nonce); args.write(prot); prot.writeMessageEnd(); } public TLicenseInfo getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_license_claims(); } } public void get_device_parameters(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_device_parameters_call method_call = new get_device_parameters_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_device_parameters_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.Map<java.lang.String,java.lang.String>> { private java.lang.String session; public get_device_parameters_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_device_parameters", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_device_parameters_args args = new get_device_parameters_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.Map<java.lang.String,java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_device_parameters(); } } public void register_runtime_extension_functions(java.lang.String session, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, java.util.Map<java.lang.String,java.lang.String> device_ir_map, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); register_runtime_extension_functions_call method_call = new register_runtime_extension_functions_call(session, udfs, udtfs, device_ir_map, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class register_runtime_extension_functions_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { private java.lang.String session; private java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs; private java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs; private java.util.Map<java.lang.String,java.lang.String> device_ir_map; public register_runtime_extension_functions_call(java.lang.String session, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, java.util.Map<java.lang.String,java.lang.String> device_ir_map, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.udfs = udfs; this.udtfs = udtfs; this.device_ir_map = device_ir_map; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("register_runtime_extension_functions", org.apache.thrift.protocol.TMessageType.CALL, 0)); register_runtime_extension_functions_args args = new register_runtime_extension_functions_args(); args.setSession(session); args.setUdfs(udfs); args.setUdtfs(udtfs); args.setDevice_ir_map(device_ir_map); args.write(prot); prot.writeMessageEnd(); } public Void getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return null; } } public void get_table_function_names(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_function_names_call method_call = new get_table_function_names_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_function_names_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; public get_table_function_names_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_function_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_function_names_args args = new get_table_function_names_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_function_names(); } } public void get_runtime_table_function_names(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_runtime_table_function_names_call method_call = new get_runtime_table_function_names_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_runtime_table_function_names_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; public get_runtime_table_function_names_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_runtime_table_function_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_runtime_table_function_names_args args = new get_runtime_table_function_names_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_runtime_table_function_names(); } } public void get_table_function_details(java.lang.String session, java.util.List<java.lang.String> udtf_names, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_function_details_call method_call = new get_table_function_details_call(session, udtf_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_function_details_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>> { private java.lang.String session; private java.util.List<java.lang.String> udtf_names; public get_table_function_details_call(java.lang.String session, java.util.List<java.lang.String> udtf_names, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.udtf_names = udtf_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_function_details", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_function_details_args args = new get_table_function_details_args(); args.setSession(session); args.setUdtf_names(udtf_names); args.write(prot); prot.writeMessageEnd(); } public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_function_details(); } } public void get_function_names(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_function_names_call method_call = new get_function_names_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_function_names_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; public get_function_names_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_function_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_function_names_args args = new get_function_names_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_function_names(); } } public void get_runtime_function_names(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_runtime_function_names_call method_call = new get_runtime_function_names_call(session, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_runtime_function_names_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> { private java.lang.String session; public get_runtime_function_names_call(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_runtime_function_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_runtime_function_names_args args = new get_runtime_function_names_args(); args.setSession(session); args.write(prot); prot.writeMessageEnd(); } public java.util.List<java.lang.String> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_runtime_function_names(); } } public void get_function_details(java.lang.String session, java.util.List<java.lang.String> udf_names, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>> resultHandler) throws org.apache.thrift.TException { checkReady(); get_function_details_call method_call = new get_function_details_call(session, udf_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_function_details_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>> { private java.lang.String session; private java.util.List<java.lang.String> udf_names; public get_function_details_call(java.lang.String session, java.util.List<java.lang.String> udf_names, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.session = session; this.udf_names = udf_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_function_details", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_function_details_args args = new get_function_details_args(); args.setSession(session); args.setUdf_names(udf_names); args.write(prot); prot.writeMessageEnd(); } public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> getResult() throws TDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_function_details(); } } } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); } protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { processMap.put("connect", new connect()); processMap.put("krb5_connect", new krb5_connect()); processMap.put("disconnect", new disconnect()); processMap.put("switch_database", new switch_database()); processMap.put("clone_session", new clone_session()); processMap.put("get_server_status", new get_server_status()); processMap.put("get_status", new get_status()); processMap.put("get_hardware_info", new get_hardware_info()); processMap.put("get_tables", new get_tables()); processMap.put("get_tables_for_database", new get_tables_for_database()); processMap.put("get_physical_tables", new get_physical_tables()); processMap.put("get_views", new get_views()); processMap.put("get_tables_meta", new get_tables_meta()); processMap.put("get_table_details", new get_table_details()); processMap.put("get_table_details_for_database", new get_table_details_for_database()); processMap.put("get_internal_table_details", new get_internal_table_details()); processMap.put("get_internal_table_details_for_database", new get_internal_table_details_for_database()); processMap.put("get_users", new get_users()); processMap.put("get_databases", new get_databases()); processMap.put("get_version", new get_version()); processMap.put("start_heap_profile", new start_heap_profile()); processMap.put("stop_heap_profile", new stop_heap_profile()); processMap.put("get_heap_profile", new get_heap_profile()); processMap.put("get_memory", new get_memory()); processMap.put("clear_cpu_memory", new clear_cpu_memory()); processMap.put("clear_gpu_memory", new clear_gpu_memory()); processMap.put("set_cur_session", new set_cur_session()); processMap.put("invalidate_cur_session", new invalidate_cur_session()); processMap.put("set_table_epoch", new set_table_epoch()); processMap.put("set_table_epoch_by_name", new set_table_epoch_by_name()); processMap.put("get_table_epoch", new get_table_epoch()); processMap.put("get_table_epoch_by_name", new get_table_epoch_by_name()); processMap.put("get_table_epochs", new get_table_epochs()); processMap.put("set_table_epochs", new set_table_epochs()); processMap.put("get_session_info", new get_session_info()); processMap.put("get_queries_info", new get_queries_info()); processMap.put("set_leaf_info", new set_leaf_info()); processMap.put("sql_execute", new sql_execute()); processMap.put("sql_execute_df", new sql_execute_df()); processMap.put("sql_execute_gdf", new sql_execute_gdf()); processMap.put("deallocate_df", new deallocate_df()); processMap.put("interrupt", new interrupt()); processMap.put("sql_validate", new sql_validate()); processMap.put("get_completion_hints", new get_completion_hints()); processMap.put("set_execution_mode", new set_execution_mode()); processMap.put("render_vega", new render_vega()); processMap.put("get_result_row_for_pixel", new get_result_row_for_pixel()); processMap.put("create_custom_expression", new create_custom_expression()); processMap.put("get_custom_expressions", new get_custom_expressions()); processMap.put("update_custom_expression", new update_custom_expression()); processMap.put("delete_custom_expressions", new delete_custom_expressions()); processMap.put("get_dashboard", new get_dashboard()); processMap.put("get_dashboards", new get_dashboards()); processMap.put("create_dashboard", new create_dashboard()); processMap.put("replace_dashboard", new replace_dashboard()); processMap.put("delete_dashboard", new delete_dashboard()); processMap.put("share_dashboards", new share_dashboards()); processMap.put("delete_dashboards", new delete_dashboards()); processMap.put("share_dashboard", new share_dashboard()); processMap.put("unshare_dashboard", new unshare_dashboard()); processMap.put("unshare_dashboards", new unshare_dashboards()); processMap.put("get_dashboard_grantees", new get_dashboard_grantees()); processMap.put("get_link_view", new get_link_view()); processMap.put("create_link", new create_link()); processMap.put("load_table_binary", new load_table_binary()); processMap.put("load_table_binary_columnar", new load_table_binary_columnar()); processMap.put("load_table_binary_columnar_polys", new load_table_binary_columnar_polys()); processMap.put("load_table_binary_arrow", new load_table_binary_arrow()); processMap.put("load_table", new load_table()); processMap.put("detect_column_types", new detect_column_types()); processMap.put("create_table", new create_table()); processMap.put("import_table", new import_table()); processMap.put("import_geo_table", new import_geo_table()); processMap.put("import_table_status", new import_table_status()); processMap.put("get_first_geo_file_in_archive", new get_first_geo_file_in_archive()); processMap.put("get_all_files_in_archive", new get_all_files_in_archive()); processMap.put("get_layers_in_geo_file", new get_layers_in_geo_file()); processMap.put("query_get_outer_fragment_count", new query_get_outer_fragment_count()); processMap.put("check_table_consistency", new check_table_consistency()); processMap.put("start_query", new start_query()); processMap.put("execute_query_step", new execute_query_step()); processMap.put("broadcast_serialized_rows", new broadcast_serialized_rows()); processMap.put("start_render_query", new start_render_query()); processMap.put("execute_next_render_step", new execute_next_render_step()); processMap.put("insert_data", new insert_data()); processMap.put("insert_chunks", new insert_chunks()); processMap.put("checkpoint", new checkpoint()); processMap.put("get_roles", new get_roles()); processMap.put("get_db_objects_for_grantee", new get_db_objects_for_grantee()); processMap.put("get_db_object_privs", new get_db_object_privs()); processMap.put("get_all_roles_for_user", new get_all_roles_for_user()); processMap.put("get_all_effective_roles_for_user", new get_all_effective_roles_for_user()); processMap.put("has_role", new has_role()); processMap.put("has_object_privilege", new has_object_privilege()); processMap.put("set_license_key", new set_license_key()); processMap.put("get_license_claims", new get_license_claims()); processMap.put("get_device_parameters", new get_device_parameters()); processMap.put("register_runtime_extension_functions", new register_runtime_extension_functions()); processMap.put("get_table_function_names", new get_table_function_names()); processMap.put("get_runtime_table_function_names", new get_runtime_table_function_names()); processMap.put("get_table_function_details", new get_table_function_details()); processMap.put("get_function_names", new get_function_names()); processMap.put("get_runtime_function_names", new get_runtime_function_names()); processMap.put("get_function_details", new get_function_details()); return processMap; } public static class connect<I extends Iface> extends org.apache.thrift.ProcessFunction<I, connect_args> { public connect() { super("connect"); } public connect_args getEmptyArgsInstance() { return new connect_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public connect_result getResult(I iface, connect_args args) throws org.apache.thrift.TException { connect_result result = new connect_result(); try { result.success = iface.connect(args.user, args.passwd, args.dbname); } catch (TDBException e) { result.e = e; } return result; } } public static class krb5_connect<I extends Iface> extends org.apache.thrift.ProcessFunction<I, krb5_connect_args> { public krb5_connect() { super("krb5_connect"); } public krb5_connect_args getEmptyArgsInstance() { return new krb5_connect_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public krb5_connect_result getResult(I iface, krb5_connect_args args) throws org.apache.thrift.TException { krb5_connect_result result = new krb5_connect_result(); try { result.success = iface.krb5_connect(args.inputToken, args.dbname); } catch (TDBException e) { result.e = e; } return result; } } public static class disconnect<I extends Iface> extends org.apache.thrift.ProcessFunction<I, disconnect_args> { public disconnect() { super("disconnect"); } public disconnect_args getEmptyArgsInstance() { return new disconnect_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public disconnect_result getResult(I iface, disconnect_args args) throws org.apache.thrift.TException { disconnect_result result = new disconnect_result(); try { iface.disconnect(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class switch_database<I extends Iface> extends org.apache.thrift.ProcessFunction<I, switch_database_args> { public switch_database() { super("switch_database"); } public switch_database_args getEmptyArgsInstance() { return new switch_database_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public switch_database_result getResult(I iface, switch_database_args args) throws org.apache.thrift.TException { switch_database_result result = new switch_database_result(); try { iface.switch_database(args.session, args.dbname); } catch (TDBException e) { result.e = e; } return result; } } public static class clone_session<I extends Iface> extends org.apache.thrift.ProcessFunction<I, clone_session_args> { public clone_session() { super("clone_session"); } public clone_session_args getEmptyArgsInstance() { return new clone_session_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public clone_session_result getResult(I iface, clone_session_args args) throws org.apache.thrift.TException { clone_session_result result = new clone_session_result(); try { result.success = iface.clone_session(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_server_status<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_server_status_args> { public get_server_status() { super("get_server_status"); } public get_server_status_args getEmptyArgsInstance() { return new get_server_status_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_server_status_result getResult(I iface, get_server_status_args args) throws org.apache.thrift.TException { get_server_status_result result = new get_server_status_result(); try { result.success = iface.get_server_status(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_status<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_status_args> { public get_status() { super("get_status"); } public get_status_args getEmptyArgsInstance() { return new get_status_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_status_result getResult(I iface, get_status_args args) throws org.apache.thrift.TException { get_status_result result = new get_status_result(); try { result.success = iface.get_status(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_hardware_info<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_hardware_info_args> { public get_hardware_info() { super("get_hardware_info"); } public get_hardware_info_args getEmptyArgsInstance() { return new get_hardware_info_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_hardware_info_result getResult(I iface, get_hardware_info_args args) throws org.apache.thrift.TException { get_hardware_info_result result = new get_hardware_info_result(); try { result.success = iface.get_hardware_info(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_tables<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_tables_args> { public get_tables() { super("get_tables"); } public get_tables_args getEmptyArgsInstance() { return new get_tables_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_tables_result getResult(I iface, get_tables_args args) throws org.apache.thrift.TException { get_tables_result result = new get_tables_result(); try { result.success = iface.get_tables(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_tables_for_database<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_tables_for_database_args> { public get_tables_for_database() { super("get_tables_for_database"); } public get_tables_for_database_args getEmptyArgsInstance() { return new get_tables_for_database_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_tables_for_database_result getResult(I iface, get_tables_for_database_args args) throws org.apache.thrift.TException { get_tables_for_database_result result = new get_tables_for_database_result(); try { result.success = iface.get_tables_for_database(args.session, args.database_name); } catch (TDBException e) { result.e = e; } return result; } } public static class get_physical_tables<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_physical_tables_args> { public get_physical_tables() { super("get_physical_tables"); } public get_physical_tables_args getEmptyArgsInstance() { return new get_physical_tables_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_physical_tables_result getResult(I iface, get_physical_tables_args args) throws org.apache.thrift.TException { get_physical_tables_result result = new get_physical_tables_result(); try { result.success = iface.get_physical_tables(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_views<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_views_args> { public get_views() { super("get_views"); } public get_views_args getEmptyArgsInstance() { return new get_views_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_views_result getResult(I iface, get_views_args args) throws org.apache.thrift.TException { get_views_result result = new get_views_result(); try { result.success = iface.get_views(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_tables_meta<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_tables_meta_args> { public get_tables_meta() { super("get_tables_meta"); } public get_tables_meta_args getEmptyArgsInstance() { return new get_tables_meta_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_tables_meta_result getResult(I iface, get_tables_meta_args args) throws org.apache.thrift.TException { get_tables_meta_result result = new get_tables_meta_result(); try { result.success = iface.get_tables_meta(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_table_details<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_details_args> { public get_table_details() { super("get_table_details"); } public get_table_details_args getEmptyArgsInstance() { return new get_table_details_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_table_details_result getResult(I iface, get_table_details_args args) throws org.apache.thrift.TException { get_table_details_result result = new get_table_details_result(); try { result.success = iface.get_table_details(args.session, args.table_name); } catch (TDBException e) { result.e = e; } return result; } } public static class get_table_details_for_database<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_details_for_database_args> { public get_table_details_for_database() { super("get_table_details_for_database"); } public get_table_details_for_database_args getEmptyArgsInstance() { return new get_table_details_for_database_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_table_details_for_database_result getResult(I iface, get_table_details_for_database_args args) throws org.apache.thrift.TException { get_table_details_for_database_result result = new get_table_details_for_database_result(); try { result.success = iface.get_table_details_for_database(args.session, args.table_name, args.database_name); } catch (TDBException e) { result.e = e; } return result; } } public static class get_internal_table_details<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_internal_table_details_args> { public get_internal_table_details() { super("get_internal_table_details"); } public get_internal_table_details_args getEmptyArgsInstance() { return new get_internal_table_details_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_internal_table_details_result getResult(I iface, get_internal_table_details_args args) throws org.apache.thrift.TException { get_internal_table_details_result result = new get_internal_table_details_result(); try { result.success = iface.get_internal_table_details(args.session, args.table_name, args.include_system_columns); } catch (TDBException e) { result.e = e; } return result; } } public static class get_internal_table_details_for_database<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_internal_table_details_for_database_args> { public get_internal_table_details_for_database() { super("get_internal_table_details_for_database"); } public get_internal_table_details_for_database_args getEmptyArgsInstance() { return new get_internal_table_details_for_database_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_internal_table_details_for_database_result getResult(I iface, get_internal_table_details_for_database_args args) throws org.apache.thrift.TException { get_internal_table_details_for_database_result result = new get_internal_table_details_for_database_result(); try { result.success = iface.get_internal_table_details_for_database(args.session, args.table_name, args.database_name); } catch (TDBException e) { result.e = e; } return result; } } public static class get_users<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_users_args> { public get_users() { super("get_users"); } public get_users_args getEmptyArgsInstance() { return new get_users_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_users_result getResult(I iface, get_users_args args) throws org.apache.thrift.TException { get_users_result result = new get_users_result(); try { result.success = iface.get_users(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_databases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_databases_args> { public get_databases() { super("get_databases"); } public get_databases_args getEmptyArgsInstance() { return new get_databases_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_databases_result getResult(I iface, get_databases_args args) throws org.apache.thrift.TException { get_databases_result result = new get_databases_result(); try { result.success = iface.get_databases(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_version<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_version_args> { public get_version() { super("get_version"); } public get_version_args getEmptyArgsInstance() { return new get_version_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_version_result getResult(I iface, get_version_args args) throws org.apache.thrift.TException { get_version_result result = new get_version_result(); try { result.success = iface.get_version(); } catch (TDBException e) { result.e = e; } return result; } } public static class start_heap_profile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, start_heap_profile_args> { public start_heap_profile() { super("start_heap_profile"); } public start_heap_profile_args getEmptyArgsInstance() { return new start_heap_profile_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public start_heap_profile_result getResult(I iface, start_heap_profile_args args) throws org.apache.thrift.TException { start_heap_profile_result result = new start_heap_profile_result(); try { iface.start_heap_profile(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class stop_heap_profile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, stop_heap_profile_args> { public stop_heap_profile() { super("stop_heap_profile"); } public stop_heap_profile_args getEmptyArgsInstance() { return new stop_heap_profile_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public stop_heap_profile_result getResult(I iface, stop_heap_profile_args args) throws org.apache.thrift.TException { stop_heap_profile_result result = new stop_heap_profile_result(); try { iface.stop_heap_profile(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_heap_profile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_heap_profile_args> { public get_heap_profile() { super("get_heap_profile"); } public get_heap_profile_args getEmptyArgsInstance() { return new get_heap_profile_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_heap_profile_result getResult(I iface, get_heap_profile_args args) throws org.apache.thrift.TException { get_heap_profile_result result = new get_heap_profile_result(); try { result.success = iface.get_heap_profile(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_memory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_memory_args> { public get_memory() { super("get_memory"); } public get_memory_args getEmptyArgsInstance() { return new get_memory_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_memory_result getResult(I iface, get_memory_args args) throws org.apache.thrift.TException { get_memory_result result = new get_memory_result(); try { result.success = iface.get_memory(args.session, args.memory_level); } catch (TDBException e) { result.e = e; } return result; } } public static class clear_cpu_memory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, clear_cpu_memory_args> { public clear_cpu_memory() { super("clear_cpu_memory"); } public clear_cpu_memory_args getEmptyArgsInstance() { return new clear_cpu_memory_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public clear_cpu_memory_result getResult(I iface, clear_cpu_memory_args args) throws org.apache.thrift.TException { clear_cpu_memory_result result = new clear_cpu_memory_result(); try { iface.clear_cpu_memory(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class clear_gpu_memory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, clear_gpu_memory_args> { public clear_gpu_memory() { super("clear_gpu_memory"); } public clear_gpu_memory_args getEmptyArgsInstance() { return new clear_gpu_memory_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public clear_gpu_memory_result getResult(I iface, clear_gpu_memory_args args) throws org.apache.thrift.TException { clear_gpu_memory_result result = new clear_gpu_memory_result(); try { iface.clear_gpu_memory(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class set_cur_session<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_cur_session_args> { public set_cur_session() { super("set_cur_session"); } public set_cur_session_args getEmptyArgsInstance() { return new set_cur_session_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public set_cur_session_result getResult(I iface, set_cur_session_args args) throws org.apache.thrift.TException { set_cur_session_result result = new set_cur_session_result(); try { iface.set_cur_session(args.parent_session, args.leaf_session, args.start_time_str, args.label, args.for_running_query_kernel); } catch (TDBException e) { result.e = e; } return result; } } public static class invalidate_cur_session<I extends Iface> extends org.apache.thrift.ProcessFunction<I, invalidate_cur_session_args> { public invalidate_cur_session() { super("invalidate_cur_session"); } public invalidate_cur_session_args getEmptyArgsInstance() { return new invalidate_cur_session_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public invalidate_cur_session_result getResult(I iface, invalidate_cur_session_args args) throws org.apache.thrift.TException { invalidate_cur_session_result result = new invalidate_cur_session_result(); try { iface.invalidate_cur_session(args.parent_session, args.leaf_session, args.start_time_str, args.label, args.for_running_query_kernel); } catch (TDBException e) { result.e = e; } return result; } } public static class set_table_epoch<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_table_epoch_args> { public set_table_epoch() { super("set_table_epoch"); } public set_table_epoch_args getEmptyArgsInstance() { return new set_table_epoch_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public set_table_epoch_result getResult(I iface, set_table_epoch_args args) throws org.apache.thrift.TException { set_table_epoch_result result = new set_table_epoch_result(); try { iface.set_table_epoch(args.session, args.db_id, args.table_id, args.new_epoch); } catch (TDBException e) { result.e = e; } return result; } } public static class set_table_epoch_by_name<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_table_epoch_by_name_args> { public set_table_epoch_by_name() { super("set_table_epoch_by_name"); } public set_table_epoch_by_name_args getEmptyArgsInstance() { return new set_table_epoch_by_name_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public set_table_epoch_by_name_result getResult(I iface, set_table_epoch_by_name_args args) throws org.apache.thrift.TException { set_table_epoch_by_name_result result = new set_table_epoch_by_name_result(); try { iface.set_table_epoch_by_name(args.session, args.table_name, args.new_epoch); } catch (TDBException e) { result.e = e; } return result; } } public static class get_table_epoch<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_epoch_args> { public get_table_epoch() { super("get_table_epoch"); } public get_table_epoch_args getEmptyArgsInstance() { return new get_table_epoch_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_table_epoch_result getResult(I iface, get_table_epoch_args args) throws org.apache.thrift.TException { get_table_epoch_result result = new get_table_epoch_result(); result.success = iface.get_table_epoch(args.session, args.db_id, args.table_id); result.setSuccessIsSet(true); return result; } } public static class get_table_epoch_by_name<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_epoch_by_name_args> { public get_table_epoch_by_name() { super("get_table_epoch_by_name"); } public get_table_epoch_by_name_args getEmptyArgsInstance() { return new get_table_epoch_by_name_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_table_epoch_by_name_result getResult(I iface, get_table_epoch_by_name_args args) throws org.apache.thrift.TException { get_table_epoch_by_name_result result = new get_table_epoch_by_name_result(); result.success = iface.get_table_epoch_by_name(args.session, args.table_name); result.setSuccessIsSet(true); return result; } } public static class get_table_epochs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_epochs_args> { public get_table_epochs() { super("get_table_epochs"); } public get_table_epochs_args getEmptyArgsInstance() { return new get_table_epochs_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_table_epochs_result getResult(I iface, get_table_epochs_args args) throws org.apache.thrift.TException { get_table_epochs_result result = new get_table_epochs_result(); result.success = iface.get_table_epochs(args.session, args.db_id, args.table_id); return result; } } public static class set_table_epochs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_table_epochs_args> { public set_table_epochs() { super("set_table_epochs"); } public set_table_epochs_args getEmptyArgsInstance() { return new set_table_epochs_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public set_table_epochs_result getResult(I iface, set_table_epochs_args args) throws org.apache.thrift.TException { set_table_epochs_result result = new set_table_epochs_result(); iface.set_table_epochs(args.session, args.db_id, args.table_epochs); return result; } } public static class get_session_info<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_session_info_args> { public get_session_info() { super("get_session_info"); } public get_session_info_args getEmptyArgsInstance() { return new get_session_info_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_session_info_result getResult(I iface, get_session_info_args args) throws org.apache.thrift.TException { get_session_info_result result = new get_session_info_result(); try { result.success = iface.get_session_info(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_queries_info<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_queries_info_args> { public get_queries_info() { super("get_queries_info"); } public get_queries_info_args getEmptyArgsInstance() { return new get_queries_info_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_queries_info_result getResult(I iface, get_queries_info_args args) throws org.apache.thrift.TException { get_queries_info_result result = new get_queries_info_result(); try { result.success = iface.get_queries_info(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class set_leaf_info<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_leaf_info_args> { public set_leaf_info() { super("set_leaf_info"); } public set_leaf_info_args getEmptyArgsInstance() { return new set_leaf_info_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public set_leaf_info_result getResult(I iface, set_leaf_info_args args) throws org.apache.thrift.TException { set_leaf_info_result result = new set_leaf_info_result(); try { iface.set_leaf_info(args.session, args.leaf_info); } catch (TDBException e) { result.e = e; } return result; } } public static class sql_execute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sql_execute_args> { public sql_execute() { super("sql_execute"); } public sql_execute_args getEmptyArgsInstance() { return new sql_execute_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public sql_execute_result getResult(I iface, sql_execute_args args) throws org.apache.thrift.TException { sql_execute_result result = new sql_execute_result(); try { result.success = iface.sql_execute(args.session, args.query, args.column_format, args.nonce, args.first_n, args.at_most_n); } catch (TDBException e) { result.e = e; } return result; } } public static class sql_execute_df<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sql_execute_df_args> { public sql_execute_df() { super("sql_execute_df"); } public sql_execute_df_args getEmptyArgsInstance() { return new sql_execute_df_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public sql_execute_df_result getResult(I iface, sql_execute_df_args args) throws org.apache.thrift.TException { sql_execute_df_result result = new sql_execute_df_result(); try { result.success = iface.sql_execute_df(args.session, args.query, args.device_type, args.device_id, args.first_n, args.transport_method); } catch (TDBException e) { result.e = e; } return result; } } public static class sql_execute_gdf<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sql_execute_gdf_args> { public sql_execute_gdf() { super("sql_execute_gdf"); } public sql_execute_gdf_args getEmptyArgsInstance() { return new sql_execute_gdf_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public sql_execute_gdf_result getResult(I iface, sql_execute_gdf_args args) throws org.apache.thrift.TException { sql_execute_gdf_result result = new sql_execute_gdf_result(); try { result.success = iface.sql_execute_gdf(args.session, args.query, args.device_id, args.first_n); } catch (TDBException e) { result.e = e; } return result; } } public static class deallocate_df<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deallocate_df_args> { public deallocate_df() { super("deallocate_df"); } public deallocate_df_args getEmptyArgsInstance() { return new deallocate_df_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public deallocate_df_result getResult(I iface, deallocate_df_args args) throws org.apache.thrift.TException { deallocate_df_result result = new deallocate_df_result(); try { iface.deallocate_df(args.session, args.df, args.device_type, args.device_id); } catch (TDBException e) { result.e = e; } return result; } } public static class interrupt<I extends Iface> extends org.apache.thrift.ProcessFunction<I, interrupt_args> { public interrupt() { super("interrupt"); } public interrupt_args getEmptyArgsInstance() { return new interrupt_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public interrupt_result getResult(I iface, interrupt_args args) throws org.apache.thrift.TException { interrupt_result result = new interrupt_result(); try { iface.interrupt(args.query_session, args.interrupt_session); } catch (TDBException e) { result.e = e; } return result; } } public static class sql_validate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sql_validate_args> { public sql_validate() { super("sql_validate"); } public sql_validate_args getEmptyArgsInstance() { return new sql_validate_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public sql_validate_result getResult(I iface, sql_validate_args args) throws org.apache.thrift.TException { sql_validate_result result = new sql_validate_result(); try { result.success = iface.sql_validate(args.session, args.query); } catch (TDBException e) { result.e = e; } return result; } } public static class get_completion_hints<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_completion_hints_args> { public get_completion_hints() { super("get_completion_hints"); } public get_completion_hints_args getEmptyArgsInstance() { return new get_completion_hints_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_completion_hints_result getResult(I iface, get_completion_hints_args args) throws org.apache.thrift.TException { get_completion_hints_result result = new get_completion_hints_result(); try { result.success = iface.get_completion_hints(args.session, args.sql, args.cursor); } catch (TDBException e) { result.e = e; } return result; } } public static class set_execution_mode<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_execution_mode_args> { public set_execution_mode() { super("set_execution_mode"); } public set_execution_mode_args getEmptyArgsInstance() { return new set_execution_mode_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public set_execution_mode_result getResult(I iface, set_execution_mode_args args) throws org.apache.thrift.TException { set_execution_mode_result result = new set_execution_mode_result(); try { iface.set_execution_mode(args.session, args.mode); } catch (TDBException e) { result.e = e; } return result; } } public static class render_vega<I extends Iface> extends org.apache.thrift.ProcessFunction<I, render_vega_args> { public render_vega() { super("render_vega"); } public render_vega_args getEmptyArgsInstance() { return new render_vega_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public render_vega_result getResult(I iface, render_vega_args args) throws org.apache.thrift.TException { render_vega_result result = new render_vega_result(); try { result.success = iface.render_vega(args.session, args.widget_id, args.vega_json, args.compression_level, args.nonce); } catch (TDBException e) { result.e = e; } return result; } } public static class get_result_row_for_pixel<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_result_row_for_pixel_args> { public get_result_row_for_pixel() { super("get_result_row_for_pixel"); } public get_result_row_for_pixel_args getEmptyArgsInstance() { return new get_result_row_for_pixel_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_result_row_for_pixel_result getResult(I iface, get_result_row_for_pixel_args args) throws org.apache.thrift.TException { get_result_row_for_pixel_result result = new get_result_row_for_pixel_result(); try { result.success = iface.get_result_row_for_pixel(args.session, args.widget_id, args.pixel, args.table_col_names, args.column_format, args.pixelRadius, args.nonce); } catch (TDBException e) { result.e = e; } return result; } } public static class create_custom_expression<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_custom_expression_args> { public create_custom_expression() { super("create_custom_expression"); } public create_custom_expression_args getEmptyArgsInstance() { return new create_custom_expression_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public create_custom_expression_result getResult(I iface, create_custom_expression_args args) throws org.apache.thrift.TException { create_custom_expression_result result = new create_custom_expression_result(); try { result.success = iface.create_custom_expression(args.session, args.custom_expression); result.setSuccessIsSet(true); } catch (TDBException e) { result.e = e; } return result; } } public static class get_custom_expressions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_custom_expressions_args> { public get_custom_expressions() { super("get_custom_expressions"); } public get_custom_expressions_args getEmptyArgsInstance() { return new get_custom_expressions_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_custom_expressions_result getResult(I iface, get_custom_expressions_args args) throws org.apache.thrift.TException { get_custom_expressions_result result = new get_custom_expressions_result(); try { result.success = iface.get_custom_expressions(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class update_custom_expression<I extends Iface> extends org.apache.thrift.ProcessFunction<I, update_custom_expression_args> { public update_custom_expression() { super("update_custom_expression"); } public update_custom_expression_args getEmptyArgsInstance() { return new update_custom_expression_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public update_custom_expression_result getResult(I iface, update_custom_expression_args args) throws org.apache.thrift.TException { update_custom_expression_result result = new update_custom_expression_result(); try { iface.update_custom_expression(args.session, args.id, args.expression_json); } catch (TDBException e) { result.e = e; } return result; } } public static class delete_custom_expressions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, delete_custom_expressions_args> { public delete_custom_expressions() { super("delete_custom_expressions"); } public delete_custom_expressions_args getEmptyArgsInstance() { return new delete_custom_expressions_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public delete_custom_expressions_result getResult(I iface, delete_custom_expressions_args args) throws org.apache.thrift.TException { delete_custom_expressions_result result = new delete_custom_expressions_result(); try { iface.delete_custom_expressions(args.session, args.custom_expression_ids, args.do_soft_delete); } catch (TDBException e) { result.e = e; } return result; } } public static class get_dashboard<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_dashboard_args> { public get_dashboard() { super("get_dashboard"); } public get_dashboard_args getEmptyArgsInstance() { return new get_dashboard_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_dashboard_result getResult(I iface, get_dashboard_args args) throws org.apache.thrift.TException { get_dashboard_result result = new get_dashboard_result(); try { result.success = iface.get_dashboard(args.session, args.dashboard_id); } catch (TDBException e) { result.e = e; } return result; } } public static class get_dashboards<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_dashboards_args> { public get_dashboards() { super("get_dashboards"); } public get_dashboards_args getEmptyArgsInstance() { return new get_dashboards_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_dashboards_result getResult(I iface, get_dashboards_args args) throws org.apache.thrift.TException { get_dashboards_result result = new get_dashboards_result(); try { result.success = iface.get_dashboards(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class create_dashboard<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_dashboard_args> { public create_dashboard() { super("create_dashboard"); } public create_dashboard_args getEmptyArgsInstance() { return new create_dashboard_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public create_dashboard_result getResult(I iface, create_dashboard_args args) throws org.apache.thrift.TException { create_dashboard_result result = new create_dashboard_result(); try { result.success = iface.create_dashboard(args.session, args.dashboard_name, args.dashboard_state, args.image_hash, args.dashboard_metadata); result.setSuccessIsSet(true); } catch (TDBException e) { result.e = e; } return result; } } public static class replace_dashboard<I extends Iface> extends org.apache.thrift.ProcessFunction<I, replace_dashboard_args> { public replace_dashboard() { super("replace_dashboard"); } public replace_dashboard_args getEmptyArgsInstance() { return new replace_dashboard_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public replace_dashboard_result getResult(I iface, replace_dashboard_args args) throws org.apache.thrift.TException { replace_dashboard_result result = new replace_dashboard_result(); try { iface.replace_dashboard(args.session, args.dashboard_id, args.dashboard_name, args.dashboard_owner, args.dashboard_state, args.image_hash, args.dashboard_metadata); } catch (TDBException e) { result.e = e; } return result; } } public static class delete_dashboard<I extends Iface> extends org.apache.thrift.ProcessFunction<I, delete_dashboard_args> { public delete_dashboard() { super("delete_dashboard"); } public delete_dashboard_args getEmptyArgsInstance() { return new delete_dashboard_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public delete_dashboard_result getResult(I iface, delete_dashboard_args args) throws org.apache.thrift.TException { delete_dashboard_result result = new delete_dashboard_result(); try { iface.delete_dashboard(args.session, args.dashboard_id); } catch (TDBException e) { result.e = e; } return result; } } public static class share_dashboards<I extends Iface> extends org.apache.thrift.ProcessFunction<I, share_dashboards_args> { public share_dashboards() { super("share_dashboards"); } public share_dashboards_args getEmptyArgsInstance() { return new share_dashboards_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public share_dashboards_result getResult(I iface, share_dashboards_args args) throws org.apache.thrift.TException { share_dashboards_result result = new share_dashboards_result(); try { iface.share_dashboards(args.session, args.dashboard_ids, args.groups, args.permissions); } catch (TDBException e) { result.e = e; } return result; } } public static class delete_dashboards<I extends Iface> extends org.apache.thrift.ProcessFunction<I, delete_dashboards_args> { public delete_dashboards() { super("delete_dashboards"); } public delete_dashboards_args getEmptyArgsInstance() { return new delete_dashboards_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public delete_dashboards_result getResult(I iface, delete_dashboards_args args) throws org.apache.thrift.TException { delete_dashboards_result result = new delete_dashboards_result(); try { iface.delete_dashboards(args.session, args.dashboard_ids); } catch (TDBException e) { result.e = e; } return result; } } public static class share_dashboard<I extends Iface> extends org.apache.thrift.ProcessFunction<I, share_dashboard_args> { public share_dashboard() { super("share_dashboard"); } public share_dashboard_args getEmptyArgsInstance() { return new share_dashboard_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public share_dashboard_result getResult(I iface, share_dashboard_args args) throws org.apache.thrift.TException { share_dashboard_result result = new share_dashboard_result(); try { iface.share_dashboard(args.session, args.dashboard_id, args.groups, args.objects, args.permissions, args.grant_role); } catch (TDBException e) { result.e = e; } return result; } } public static class unshare_dashboard<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unshare_dashboard_args> { public unshare_dashboard() { super("unshare_dashboard"); } public unshare_dashboard_args getEmptyArgsInstance() { return new unshare_dashboard_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public unshare_dashboard_result getResult(I iface, unshare_dashboard_args args) throws org.apache.thrift.TException { unshare_dashboard_result result = new unshare_dashboard_result(); try { iface.unshare_dashboard(args.session, args.dashboard_id, args.groups, args.objects, args.permissions); } catch (TDBException e) { result.e = e; } return result; } } public static class unshare_dashboards<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unshare_dashboards_args> { public unshare_dashboards() { super("unshare_dashboards"); } public unshare_dashboards_args getEmptyArgsInstance() { return new unshare_dashboards_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public unshare_dashboards_result getResult(I iface, unshare_dashboards_args args) throws org.apache.thrift.TException { unshare_dashboards_result result = new unshare_dashboards_result(); try { iface.unshare_dashboards(args.session, args.dashboard_ids, args.groups, args.permissions); } catch (TDBException e) { result.e = e; } return result; } } public static class get_dashboard_grantees<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_dashboard_grantees_args> { public get_dashboard_grantees() { super("get_dashboard_grantees"); } public get_dashboard_grantees_args getEmptyArgsInstance() { return new get_dashboard_grantees_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_dashboard_grantees_result getResult(I iface, get_dashboard_grantees_args args) throws org.apache.thrift.TException { get_dashboard_grantees_result result = new get_dashboard_grantees_result(); try { result.success = iface.get_dashboard_grantees(args.session, args.dashboard_id); } catch (TDBException e) { result.e = e; } return result; } } public static class get_link_view<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_link_view_args> { public get_link_view() { super("get_link_view"); } public get_link_view_args getEmptyArgsInstance() { return new get_link_view_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_link_view_result getResult(I iface, get_link_view_args args) throws org.apache.thrift.TException { get_link_view_result result = new get_link_view_result(); try { result.success = iface.get_link_view(args.session, args.link); } catch (TDBException e) { result.e = e; } return result; } } public static class create_link<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_link_args> { public create_link() { super("create_link"); } public create_link_args getEmptyArgsInstance() { return new create_link_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public create_link_result getResult(I iface, create_link_args args) throws org.apache.thrift.TException { create_link_result result = new create_link_result(); try { result.success = iface.create_link(args.session, args.view_state, args.view_metadata); } catch (TDBException e) { result.e = e; } return result; } } public static class load_table_binary<I extends Iface> extends org.apache.thrift.ProcessFunction<I, load_table_binary_args> { public load_table_binary() { super("load_table_binary"); } public load_table_binary_args getEmptyArgsInstance() { return new load_table_binary_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public load_table_binary_result getResult(I iface, load_table_binary_args args) throws org.apache.thrift.TException { load_table_binary_result result = new load_table_binary_result(); try { iface.load_table_binary(args.session, args.table_name, args.rows, args.column_names); } catch (TDBException e) { result.e = e; } return result; } } public static class load_table_binary_columnar<I extends Iface> extends org.apache.thrift.ProcessFunction<I, load_table_binary_columnar_args> { public load_table_binary_columnar() { super("load_table_binary_columnar"); } public load_table_binary_columnar_args getEmptyArgsInstance() { return new load_table_binary_columnar_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public load_table_binary_columnar_result getResult(I iface, load_table_binary_columnar_args args) throws org.apache.thrift.TException { load_table_binary_columnar_result result = new load_table_binary_columnar_result(); try { iface.load_table_binary_columnar(args.session, args.table_name, args.cols, args.column_names); } catch (TDBException e) { result.e = e; } return result; } } public static class load_table_binary_columnar_polys<I extends Iface> extends org.apache.thrift.ProcessFunction<I, load_table_binary_columnar_polys_args> { public load_table_binary_columnar_polys() { super("load_table_binary_columnar_polys"); } public load_table_binary_columnar_polys_args getEmptyArgsInstance() { return new load_table_binary_columnar_polys_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public load_table_binary_columnar_polys_result getResult(I iface, load_table_binary_columnar_polys_args args) throws org.apache.thrift.TException { load_table_binary_columnar_polys_result result = new load_table_binary_columnar_polys_result(); try { iface.load_table_binary_columnar_polys(args.session, args.table_name, args.cols, args.column_names, args.assign_render_groups); } catch (TDBException e) { result.e = e; } return result; } } public static class load_table_binary_arrow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, load_table_binary_arrow_args> { public load_table_binary_arrow() { super("load_table_binary_arrow"); } public load_table_binary_arrow_args getEmptyArgsInstance() { return new load_table_binary_arrow_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public load_table_binary_arrow_result getResult(I iface, load_table_binary_arrow_args args) throws org.apache.thrift.TException { load_table_binary_arrow_result result = new load_table_binary_arrow_result(); try { iface.load_table_binary_arrow(args.session, args.table_name, args.arrow_stream, args.use_column_names); } catch (TDBException e) { result.e = e; } return result; } } public static class load_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, load_table_args> { public load_table() { super("load_table"); } public load_table_args getEmptyArgsInstance() { return new load_table_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public load_table_result getResult(I iface, load_table_args args) throws org.apache.thrift.TException { load_table_result result = new load_table_result(); try { iface.load_table(args.session, args.table_name, args.rows, args.column_names); } catch (TDBException e) { result.e = e; } return result; } } public static class detect_column_types<I extends Iface> extends org.apache.thrift.ProcessFunction<I, detect_column_types_args> { public detect_column_types() { super("detect_column_types"); } public detect_column_types_args getEmptyArgsInstance() { return new detect_column_types_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public detect_column_types_result getResult(I iface, detect_column_types_args args) throws org.apache.thrift.TException { detect_column_types_result result = new detect_column_types_result(); try { result.success = iface.detect_column_types(args.session, args.file_name, args.copy_params); } catch (TDBException e) { result.e = e; } return result; } } public static class create_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_table_args> { public create_table() { super("create_table"); } public create_table_args getEmptyArgsInstance() { return new create_table_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public create_table_result getResult(I iface, create_table_args args) throws org.apache.thrift.TException { create_table_result result = new create_table_result(); try { iface.create_table(args.session, args.table_name, args.row_desc, args.create_params); } catch (TDBException e) { result.e = e; } return result; } } public static class import_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, import_table_args> { public import_table() { super("import_table"); } public import_table_args getEmptyArgsInstance() { return new import_table_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public import_table_result getResult(I iface, import_table_args args) throws org.apache.thrift.TException { import_table_result result = new import_table_result(); try { iface.import_table(args.session, args.table_name, args.file_name, args.copy_params); } catch (TDBException e) { result.e = e; } return result; } } public static class import_geo_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, import_geo_table_args> { public import_geo_table() { super("import_geo_table"); } public import_geo_table_args getEmptyArgsInstance() { return new import_geo_table_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public import_geo_table_result getResult(I iface, import_geo_table_args args) throws org.apache.thrift.TException { import_geo_table_result result = new import_geo_table_result(); try { iface.import_geo_table(args.session, args.table_name, args.file_name, args.copy_params, args.row_desc, args.create_params); } catch (TDBException e) { result.e = e; } return result; } } public static class import_table_status<I extends Iface> extends org.apache.thrift.ProcessFunction<I, import_table_status_args> { public import_table_status() { super("import_table_status"); } public import_table_status_args getEmptyArgsInstance() { return new import_table_status_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public import_table_status_result getResult(I iface, import_table_status_args args) throws org.apache.thrift.TException { import_table_status_result result = new import_table_status_result(); try { result.success = iface.import_table_status(args.session, args.import_id); } catch (TDBException e) { result.e = e; } return result; } } public static class get_first_geo_file_in_archive<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_first_geo_file_in_archive_args> { public get_first_geo_file_in_archive() { super("get_first_geo_file_in_archive"); } public get_first_geo_file_in_archive_args getEmptyArgsInstance() { return new get_first_geo_file_in_archive_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_first_geo_file_in_archive_result getResult(I iface, get_first_geo_file_in_archive_args args) throws org.apache.thrift.TException { get_first_geo_file_in_archive_result result = new get_first_geo_file_in_archive_result(); try { result.success = iface.get_first_geo_file_in_archive(args.session, args.archive_path, args.copy_params); } catch (TDBException e) { result.e = e; } return result; } } public static class get_all_files_in_archive<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_all_files_in_archive_args> { public get_all_files_in_archive() { super("get_all_files_in_archive"); } public get_all_files_in_archive_args getEmptyArgsInstance() { return new get_all_files_in_archive_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_all_files_in_archive_result getResult(I iface, get_all_files_in_archive_args args) throws org.apache.thrift.TException { get_all_files_in_archive_result result = new get_all_files_in_archive_result(); try { result.success = iface.get_all_files_in_archive(args.session, args.archive_path, args.copy_params); } catch (TDBException e) { result.e = e; } return result; } } public static class get_layers_in_geo_file<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_layers_in_geo_file_args> { public get_layers_in_geo_file() { super("get_layers_in_geo_file"); } public get_layers_in_geo_file_args getEmptyArgsInstance() { return new get_layers_in_geo_file_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_layers_in_geo_file_result getResult(I iface, get_layers_in_geo_file_args args) throws org.apache.thrift.TException { get_layers_in_geo_file_result result = new get_layers_in_geo_file_result(); try { result.success = iface.get_layers_in_geo_file(args.session, args.file_name, args.copy_params); } catch (TDBException e) { result.e = e; } return result; } } public static class query_get_outer_fragment_count<I extends Iface> extends org.apache.thrift.ProcessFunction<I, query_get_outer_fragment_count_args> { public query_get_outer_fragment_count() { super("query_get_outer_fragment_count"); } public query_get_outer_fragment_count_args getEmptyArgsInstance() { return new query_get_outer_fragment_count_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public query_get_outer_fragment_count_result getResult(I iface, query_get_outer_fragment_count_args args) throws org.apache.thrift.TException { query_get_outer_fragment_count_result result = new query_get_outer_fragment_count_result(); try { result.success = iface.query_get_outer_fragment_count(args.session, args.query); result.setSuccessIsSet(true); } catch (TDBException e) { result.e = e; } return result; } } public static class check_table_consistency<I extends Iface> extends org.apache.thrift.ProcessFunction<I, check_table_consistency_args> { public check_table_consistency() { super("check_table_consistency"); } public check_table_consistency_args getEmptyArgsInstance() { return new check_table_consistency_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public check_table_consistency_result getResult(I iface, check_table_consistency_args args) throws org.apache.thrift.TException { check_table_consistency_result result = new check_table_consistency_result(); try { result.success = iface.check_table_consistency(args.session, args.table_id); } catch (TDBException e) { result.e = e; } return result; } } public static class start_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, start_query_args> { public start_query() { super("start_query"); } public start_query_args getEmptyArgsInstance() { return new start_query_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public start_query_result getResult(I iface, start_query_args args) throws org.apache.thrift.TException { start_query_result result = new start_query_result(); try { result.success = iface.start_query(args.leaf_session, args.parent_session, args.query_ra, args.start_time_str, args.just_explain, args.outer_fragment_indices); } catch (TDBException e) { result.e = e; } return result; } } public static class execute_query_step<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_query_step_args> { public execute_query_step() { super("execute_query_step"); } public execute_query_step_args getEmptyArgsInstance() { return new execute_query_step_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public execute_query_step_result getResult(I iface, execute_query_step_args args) throws org.apache.thrift.TException { execute_query_step_result result = new execute_query_step_result(); try { result.success = iface.execute_query_step(args.pending_query, args.subquery_id, args.start_time_str); } catch (TDBException e) { result.e = e; } return result; } } public static class broadcast_serialized_rows<I extends Iface> extends org.apache.thrift.ProcessFunction<I, broadcast_serialized_rows_args> { public broadcast_serialized_rows() { super("broadcast_serialized_rows"); } public broadcast_serialized_rows_args getEmptyArgsInstance() { return new broadcast_serialized_rows_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public broadcast_serialized_rows_result getResult(I iface, broadcast_serialized_rows_args args) throws org.apache.thrift.TException { broadcast_serialized_rows_result result = new broadcast_serialized_rows_result(); try { iface.broadcast_serialized_rows(args.serialized_rows, args.row_desc, args.query_id, args.subquery_id, args.is_final_subquery_result); } catch (TDBException e) { result.e = e; } return result; } } public static class start_render_query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, start_render_query_args> { public start_render_query() { super("start_render_query"); } public start_render_query_args getEmptyArgsInstance() { return new start_render_query_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public start_render_query_result getResult(I iface, start_render_query_args args) throws org.apache.thrift.TException { start_render_query_result result = new start_render_query_result(); try { result.success = iface.start_render_query(args.session, args.widget_id, args.node_idx, args.vega_json); } catch (TDBException e) { result.e = e; } return result; } } public static class execute_next_render_step<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_next_render_step_args> { public execute_next_render_step() { super("execute_next_render_step"); } public execute_next_render_step_args getEmptyArgsInstance() { return new execute_next_render_step_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public execute_next_render_step_result getResult(I iface, execute_next_render_step_args args) throws org.apache.thrift.TException { execute_next_render_step_result result = new execute_next_render_step_result(); try { result.success = iface.execute_next_render_step(args.pending_render, args.merged_data); } catch (TDBException e) { result.e = e; } return result; } } public static class insert_data<I extends Iface> extends org.apache.thrift.ProcessFunction<I, insert_data_args> { public insert_data() { super("insert_data"); } public insert_data_args getEmptyArgsInstance() { return new insert_data_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public insert_data_result getResult(I iface, insert_data_args args) throws org.apache.thrift.TException { insert_data_result result = new insert_data_result(); try { iface.insert_data(args.session, args.insert_data); } catch (TDBException e) { result.e = e; } return result; } } public static class insert_chunks<I extends Iface> extends org.apache.thrift.ProcessFunction<I, insert_chunks_args> { public insert_chunks() { super("insert_chunks"); } public insert_chunks_args getEmptyArgsInstance() { return new insert_chunks_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public insert_chunks_result getResult(I iface, insert_chunks_args args) throws org.apache.thrift.TException { insert_chunks_result result = new insert_chunks_result(); try { iface.insert_chunks(args.session, args.insert_chunks); } catch (TDBException e) { result.e = e; } return result; } } public static class checkpoint<I extends Iface> extends org.apache.thrift.ProcessFunction<I, checkpoint_args> { public checkpoint() { super("checkpoint"); } public checkpoint_args getEmptyArgsInstance() { return new checkpoint_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public checkpoint_result getResult(I iface, checkpoint_args args) throws org.apache.thrift.TException { checkpoint_result result = new checkpoint_result(); try { iface.checkpoint(args.session, args.table_id); } catch (TDBException e) { result.e = e; } return result; } } public static class get_roles<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_roles_args> { public get_roles() { super("get_roles"); } public get_roles_args getEmptyArgsInstance() { return new get_roles_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_roles_result getResult(I iface, get_roles_args args) throws org.apache.thrift.TException { get_roles_result result = new get_roles_result(); try { result.success = iface.get_roles(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_db_objects_for_grantee<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_db_objects_for_grantee_args> { public get_db_objects_for_grantee() { super("get_db_objects_for_grantee"); } public get_db_objects_for_grantee_args getEmptyArgsInstance() { return new get_db_objects_for_grantee_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_db_objects_for_grantee_result getResult(I iface, get_db_objects_for_grantee_args args) throws org.apache.thrift.TException { get_db_objects_for_grantee_result result = new get_db_objects_for_grantee_result(); try { result.success = iface.get_db_objects_for_grantee(args.session, args.roleName); } catch (TDBException e) { result.e = e; } return result; } } public static class get_db_object_privs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_db_object_privs_args> { public get_db_object_privs() { super("get_db_object_privs"); } public get_db_object_privs_args getEmptyArgsInstance() { return new get_db_object_privs_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_db_object_privs_result getResult(I iface, get_db_object_privs_args args) throws org.apache.thrift.TException { get_db_object_privs_result result = new get_db_object_privs_result(); try { result.success = iface.get_db_object_privs(args.session, args.objectName, args.type); } catch (TDBException e) { result.e = e; } return result; } } public static class get_all_roles_for_user<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_all_roles_for_user_args> { public get_all_roles_for_user() { super("get_all_roles_for_user"); } public get_all_roles_for_user_args getEmptyArgsInstance() { return new get_all_roles_for_user_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_all_roles_for_user_result getResult(I iface, get_all_roles_for_user_args args) throws org.apache.thrift.TException { get_all_roles_for_user_result result = new get_all_roles_for_user_result(); try { result.success = iface.get_all_roles_for_user(args.session, args.userName); } catch (TDBException e) { result.e = e; } return result; } } public static class get_all_effective_roles_for_user<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_all_effective_roles_for_user_args> { public get_all_effective_roles_for_user() { super("get_all_effective_roles_for_user"); } public get_all_effective_roles_for_user_args getEmptyArgsInstance() { return new get_all_effective_roles_for_user_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_all_effective_roles_for_user_result getResult(I iface, get_all_effective_roles_for_user_args args) throws org.apache.thrift.TException { get_all_effective_roles_for_user_result result = new get_all_effective_roles_for_user_result(); try { result.success = iface.get_all_effective_roles_for_user(args.session, args.userName); } catch (TDBException e) { result.e = e; } return result; } } public static class has_role<I extends Iface> extends org.apache.thrift.ProcessFunction<I, has_role_args> { public has_role() { super("has_role"); } public has_role_args getEmptyArgsInstance() { return new has_role_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public has_role_result getResult(I iface, has_role_args args) throws org.apache.thrift.TException { has_role_result result = new has_role_result(); try { result.success = iface.has_role(args.session, args.granteeName, args.roleName); result.setSuccessIsSet(true); } catch (TDBException e) { result.e = e; } return result; } } public static class has_object_privilege<I extends Iface> extends org.apache.thrift.ProcessFunction<I, has_object_privilege_args> { public has_object_privilege() { super("has_object_privilege"); } public has_object_privilege_args getEmptyArgsInstance() { return new has_object_privilege_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public has_object_privilege_result getResult(I iface, has_object_privilege_args args) throws org.apache.thrift.TException { has_object_privilege_result result = new has_object_privilege_result(); try { result.success = iface.has_object_privilege(args.session, args.granteeName, args.ObjectName, args.objectType, args.permissions); result.setSuccessIsSet(true); } catch (TDBException e) { result.e = e; } return result; } } public static class set_license_key<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_license_key_args> { public set_license_key() { super("set_license_key"); } public set_license_key_args getEmptyArgsInstance() { return new set_license_key_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public set_license_key_result getResult(I iface, set_license_key_args args) throws org.apache.thrift.TException { set_license_key_result result = new set_license_key_result(); try { result.success = iface.set_license_key(args.session, args.key, args.nonce); } catch (TDBException e) { result.e = e; } return result; } } public static class get_license_claims<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_license_claims_args> { public get_license_claims() { super("get_license_claims"); } public get_license_claims_args getEmptyArgsInstance() { return new get_license_claims_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_license_claims_result getResult(I iface, get_license_claims_args args) throws org.apache.thrift.TException { get_license_claims_result result = new get_license_claims_result(); try { result.success = iface.get_license_claims(args.session, args.nonce); } catch (TDBException e) { result.e = e; } return result; } } public static class get_device_parameters<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_device_parameters_args> { public get_device_parameters() { super("get_device_parameters"); } public get_device_parameters_args getEmptyArgsInstance() { return new get_device_parameters_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_device_parameters_result getResult(I iface, get_device_parameters_args args) throws org.apache.thrift.TException { get_device_parameters_result result = new get_device_parameters_result(); try { result.success = iface.get_device_parameters(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class register_runtime_extension_functions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, register_runtime_extension_functions_args> { public register_runtime_extension_functions() { super("register_runtime_extension_functions"); } public register_runtime_extension_functions_args getEmptyArgsInstance() { return new register_runtime_extension_functions_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public register_runtime_extension_functions_result getResult(I iface, register_runtime_extension_functions_args args) throws org.apache.thrift.TException { register_runtime_extension_functions_result result = new register_runtime_extension_functions_result(); try { iface.register_runtime_extension_functions(args.session, args.udfs, args.udtfs, args.device_ir_map); } catch (TDBException e) { result.e = e; } return result; } } public static class get_table_function_names<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_function_names_args> { public get_table_function_names() { super("get_table_function_names"); } public get_table_function_names_args getEmptyArgsInstance() { return new get_table_function_names_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_table_function_names_result getResult(I iface, get_table_function_names_args args) throws org.apache.thrift.TException { get_table_function_names_result result = new get_table_function_names_result(); try { result.success = iface.get_table_function_names(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_runtime_table_function_names<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_runtime_table_function_names_args> { public get_runtime_table_function_names() { super("get_runtime_table_function_names"); } public get_runtime_table_function_names_args getEmptyArgsInstance() { return new get_runtime_table_function_names_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_runtime_table_function_names_result getResult(I iface, get_runtime_table_function_names_args args) throws org.apache.thrift.TException { get_runtime_table_function_names_result result = new get_runtime_table_function_names_result(); try { result.success = iface.get_runtime_table_function_names(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_table_function_details<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_function_details_args> { public get_table_function_details() { super("get_table_function_details"); } public get_table_function_details_args getEmptyArgsInstance() { return new get_table_function_details_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_table_function_details_result getResult(I iface, get_table_function_details_args args) throws org.apache.thrift.TException { get_table_function_details_result result = new get_table_function_details_result(); try { result.success = iface.get_table_function_details(args.session, args.udtf_names); } catch (TDBException e) { result.e = e; } return result; } } public static class get_function_names<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_function_names_args> { public get_function_names() { super("get_function_names"); } public get_function_names_args getEmptyArgsInstance() { return new get_function_names_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_function_names_result getResult(I iface, get_function_names_args args) throws org.apache.thrift.TException { get_function_names_result result = new get_function_names_result(); try { result.success = iface.get_function_names(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_runtime_function_names<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_runtime_function_names_args> { public get_runtime_function_names() { super("get_runtime_function_names"); } public get_runtime_function_names_args getEmptyArgsInstance() { return new get_runtime_function_names_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_runtime_function_names_result getResult(I iface, get_runtime_function_names_args args) throws org.apache.thrift.TException { get_runtime_function_names_result result = new get_runtime_function_names_result(); try { result.success = iface.get_runtime_function_names(args.session); } catch (TDBException e) { result.e = e; } return result; } } public static class get_function_details<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_function_details_args> { public get_function_details() { super("get_function_details"); } public get_function_details_args getEmptyArgsInstance() { return new get_function_details_args(); } protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } public get_function_details_result getResult(I iface, get_function_details_args args) throws org.apache.thrift.TException { get_function_details_result result = new get_function_details_result(); try { result.success = iface.get_function_details(args.session, args.udf_names); } catch (TDBException e) { result.e = e; } return result; } } } public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); } protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { processMap.put("connect", new connect()); processMap.put("krb5_connect", new krb5_connect()); processMap.put("disconnect", new disconnect()); processMap.put("switch_database", new switch_database()); processMap.put("clone_session", new clone_session()); processMap.put("get_server_status", new get_server_status()); processMap.put("get_status", new get_status()); processMap.put("get_hardware_info", new get_hardware_info()); processMap.put("get_tables", new get_tables()); processMap.put("get_tables_for_database", new get_tables_for_database()); processMap.put("get_physical_tables", new get_physical_tables()); processMap.put("get_views", new get_views()); processMap.put("get_tables_meta", new get_tables_meta()); processMap.put("get_table_details", new get_table_details()); processMap.put("get_table_details_for_database", new get_table_details_for_database()); processMap.put("get_internal_table_details", new get_internal_table_details()); processMap.put("get_internal_table_details_for_database", new get_internal_table_details_for_database()); processMap.put("get_users", new get_users()); processMap.put("get_databases", new get_databases()); processMap.put("get_version", new get_version()); processMap.put("start_heap_profile", new start_heap_profile()); processMap.put("stop_heap_profile", new stop_heap_profile()); processMap.put("get_heap_profile", new get_heap_profile()); processMap.put("get_memory", new get_memory()); processMap.put("clear_cpu_memory", new clear_cpu_memory()); processMap.put("clear_gpu_memory", new clear_gpu_memory()); processMap.put("set_cur_session", new set_cur_session()); processMap.put("invalidate_cur_session", new invalidate_cur_session()); processMap.put("set_table_epoch", new set_table_epoch()); processMap.put("set_table_epoch_by_name", new set_table_epoch_by_name()); processMap.put("get_table_epoch", new get_table_epoch()); processMap.put("get_table_epoch_by_name", new get_table_epoch_by_name()); processMap.put("get_table_epochs", new get_table_epochs()); processMap.put("set_table_epochs", new set_table_epochs()); processMap.put("get_session_info", new get_session_info()); processMap.put("get_queries_info", new get_queries_info()); processMap.put("set_leaf_info", new set_leaf_info()); processMap.put("sql_execute", new sql_execute()); processMap.put("sql_execute_df", new sql_execute_df()); processMap.put("sql_execute_gdf", new sql_execute_gdf()); processMap.put("deallocate_df", new deallocate_df()); processMap.put("interrupt", new interrupt()); processMap.put("sql_validate", new sql_validate()); processMap.put("get_completion_hints", new get_completion_hints()); processMap.put("set_execution_mode", new set_execution_mode()); processMap.put("render_vega", new render_vega()); processMap.put("get_result_row_for_pixel", new get_result_row_for_pixel()); processMap.put("create_custom_expression", new create_custom_expression()); processMap.put("get_custom_expressions", new get_custom_expressions()); processMap.put("update_custom_expression", new update_custom_expression()); processMap.put("delete_custom_expressions", new delete_custom_expressions()); processMap.put("get_dashboard", new get_dashboard()); processMap.put("get_dashboards", new get_dashboards()); processMap.put("create_dashboard", new create_dashboard()); processMap.put("replace_dashboard", new replace_dashboard()); processMap.put("delete_dashboard", new delete_dashboard()); processMap.put("share_dashboards", new share_dashboards()); processMap.put("delete_dashboards", new delete_dashboards()); processMap.put("share_dashboard", new share_dashboard()); processMap.put("unshare_dashboard", new unshare_dashboard()); processMap.put("unshare_dashboards", new unshare_dashboards()); processMap.put("get_dashboard_grantees", new get_dashboard_grantees()); processMap.put("get_link_view", new get_link_view()); processMap.put("create_link", new create_link()); processMap.put("load_table_binary", new load_table_binary()); processMap.put("load_table_binary_columnar", new load_table_binary_columnar()); processMap.put("load_table_binary_columnar_polys", new load_table_binary_columnar_polys()); processMap.put("load_table_binary_arrow", new load_table_binary_arrow()); processMap.put("load_table", new load_table()); processMap.put("detect_column_types", new detect_column_types()); processMap.put("create_table", new create_table()); processMap.put("import_table", new import_table()); processMap.put("import_geo_table", new import_geo_table()); processMap.put("import_table_status", new import_table_status()); processMap.put("get_first_geo_file_in_archive", new get_first_geo_file_in_archive()); processMap.put("get_all_files_in_archive", new get_all_files_in_archive()); processMap.put("get_layers_in_geo_file", new get_layers_in_geo_file()); processMap.put("query_get_outer_fragment_count", new query_get_outer_fragment_count()); processMap.put("check_table_consistency", new check_table_consistency()); processMap.put("start_query", new start_query()); processMap.put("execute_query_step", new execute_query_step()); processMap.put("broadcast_serialized_rows", new broadcast_serialized_rows()); processMap.put("start_render_query", new start_render_query()); processMap.put("execute_next_render_step", new execute_next_render_step()); processMap.put("insert_data", new insert_data()); processMap.put("insert_chunks", new insert_chunks()); processMap.put("checkpoint", new checkpoint()); processMap.put("get_roles", new get_roles()); processMap.put("get_db_objects_for_grantee", new get_db_objects_for_grantee()); processMap.put("get_db_object_privs", new get_db_object_privs()); processMap.put("get_all_roles_for_user", new get_all_roles_for_user()); processMap.put("get_all_effective_roles_for_user", new get_all_effective_roles_for_user()); processMap.put("has_role", new has_role()); processMap.put("has_object_privilege", new has_object_privilege()); processMap.put("set_license_key", new set_license_key()); processMap.put("get_license_claims", new get_license_claims()); processMap.put("get_device_parameters", new get_device_parameters()); processMap.put("register_runtime_extension_functions", new register_runtime_extension_functions()); processMap.put("get_table_function_names", new get_table_function_names()); processMap.put("get_runtime_table_function_names", new get_runtime_table_function_names()); processMap.put("get_table_function_details", new get_table_function_details()); processMap.put("get_function_names", new get_function_names()); processMap.put("get_runtime_function_names", new get_runtime_function_names()); processMap.put("get_function_details", new get_function_details()); return processMap; } public static class connect<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, connect_args, java.lang.String> { public connect() { super("connect"); } public connect_args getEmptyArgsInstance() { return new connect_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { public void onComplete(java.lang.String o) { connect_result result = new connect_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; connect_result result = new connect_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, connect_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { iface.connect(args.user, args.passwd, args.dbname,resultHandler); } } public static class krb5_connect<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, krb5_connect_args, TKrb5Session> { public krb5_connect() { super("krb5_connect"); } public krb5_connect_args getEmptyArgsInstance() { return new krb5_connect_args(); } public org.apache.thrift.async.AsyncMethodCallback<TKrb5Session> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TKrb5Session>() { public void onComplete(TKrb5Session o) { krb5_connect_result result = new krb5_connect_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; krb5_connect_result result = new krb5_connect_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, krb5_connect_args args, org.apache.thrift.async.AsyncMethodCallback<TKrb5Session> resultHandler) throws org.apache.thrift.TException { iface.krb5_connect(args.inputToken, args.dbname,resultHandler); } } public static class disconnect<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, disconnect_args, Void> { public disconnect() { super("disconnect"); } public disconnect_args getEmptyArgsInstance() { return new disconnect_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { disconnect_result result = new disconnect_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; disconnect_result result = new disconnect_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, disconnect_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.disconnect(args.session,resultHandler); } } public static class switch_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, switch_database_args, Void> { public switch_database() { super("switch_database"); } public switch_database_args getEmptyArgsInstance() { return new switch_database_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { switch_database_result result = new switch_database_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; switch_database_result result = new switch_database_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, switch_database_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.switch_database(args.session, args.dbname,resultHandler); } } public static class clone_session<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, clone_session_args, java.lang.String> { public clone_session() { super("clone_session"); } public clone_session_args getEmptyArgsInstance() { return new clone_session_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { public void onComplete(java.lang.String o) { clone_session_result result = new clone_session_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; clone_session_result result = new clone_session_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, clone_session_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { iface.clone_session(args.session,resultHandler); } } public static class get_server_status<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_server_status_args, TServerStatus> { public get_server_status() { super("get_server_status"); } public get_server_status_args getEmptyArgsInstance() { return new get_server_status_args(); } public org.apache.thrift.async.AsyncMethodCallback<TServerStatus> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TServerStatus>() { public void onComplete(TServerStatus o) { get_server_status_result result = new get_server_status_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_server_status_result result = new get_server_status_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_server_status_args args, org.apache.thrift.async.AsyncMethodCallback<TServerStatus> resultHandler) throws org.apache.thrift.TException { iface.get_server_status(args.session,resultHandler); } } public static class get_status<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_status_args, java.util.List<TServerStatus>> { public get_status() { super("get_status"); } public get_status_args getEmptyArgsInstance() { return new get_status_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TServerStatus>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TServerStatus>>() { public void onComplete(java.util.List<TServerStatus> o) { get_status_result result = new get_status_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_status_result result = new get_status_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_status_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TServerStatus>> resultHandler) throws org.apache.thrift.TException { iface.get_status(args.session,resultHandler); } } public static class get_hardware_info<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_hardware_info_args, TClusterHardwareInfo> { public get_hardware_info() { super("get_hardware_info"); } public get_hardware_info_args getEmptyArgsInstance() { return new get_hardware_info_args(); } public org.apache.thrift.async.AsyncMethodCallback<TClusterHardwareInfo> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TClusterHardwareInfo>() { public void onComplete(TClusterHardwareInfo o) { get_hardware_info_result result = new get_hardware_info_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_hardware_info_result result = new get_hardware_info_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_hardware_info_args args, org.apache.thrift.async.AsyncMethodCallback<TClusterHardwareInfo> resultHandler) throws org.apache.thrift.TException { iface.get_hardware_info(args.session,resultHandler); } } public static class get_tables<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_tables_args, java.util.List<java.lang.String>> { public get_tables() { super("get_tables"); } public get_tables_args getEmptyArgsInstance() { return new get_tables_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_tables_result result = new get_tables_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_tables_result result = new get_tables_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_tables_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_tables(args.session,resultHandler); } } public static class get_tables_for_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_tables_for_database_args, java.util.List<java.lang.String>> { public get_tables_for_database() { super("get_tables_for_database"); } public get_tables_for_database_args getEmptyArgsInstance() { return new get_tables_for_database_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_tables_for_database_result result = new get_tables_for_database_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_tables_for_database_result result = new get_tables_for_database_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_tables_for_database_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_tables_for_database(args.session, args.database_name,resultHandler); } } public static class get_physical_tables<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_physical_tables_args, java.util.List<java.lang.String>> { public get_physical_tables() { super("get_physical_tables"); } public get_physical_tables_args getEmptyArgsInstance() { return new get_physical_tables_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_physical_tables_result result = new get_physical_tables_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_physical_tables_result result = new get_physical_tables_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_physical_tables_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_physical_tables(args.session,resultHandler); } } public static class get_views<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_views_args, java.util.List<java.lang.String>> { public get_views() { super("get_views"); } public get_views_args getEmptyArgsInstance() { return new get_views_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_views_result result = new get_views_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_views_result result = new get_views_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_views_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_views(args.session,resultHandler); } } public static class get_tables_meta<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_tables_meta_args, java.util.List<TTableMeta>> { public get_tables_meta() { super("get_tables_meta"); } public get_tables_meta_args getEmptyArgsInstance() { return new get_tables_meta_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableMeta>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableMeta>>() { public void onComplete(java.util.List<TTableMeta> o) { get_tables_meta_result result = new get_tables_meta_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_tables_meta_result result = new get_tables_meta_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_tables_meta_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableMeta>> resultHandler) throws org.apache.thrift.TException { iface.get_tables_meta(args.session,resultHandler); } } public static class get_table_details<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_details_args, TTableDetails> { public get_table_details() { super("get_table_details"); } public get_table_details_args getEmptyArgsInstance() { return new get_table_details_args(); } public org.apache.thrift.async.AsyncMethodCallback<TTableDetails> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TTableDetails>() { public void onComplete(TTableDetails o) { get_table_details_result result = new get_table_details_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_table_details_result result = new get_table_details_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_details_args args, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException { iface.get_table_details(args.session, args.table_name,resultHandler); } } public static class get_table_details_for_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_details_for_database_args, TTableDetails> { public get_table_details_for_database() { super("get_table_details_for_database"); } public get_table_details_for_database_args getEmptyArgsInstance() { return new get_table_details_for_database_args(); } public org.apache.thrift.async.AsyncMethodCallback<TTableDetails> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TTableDetails>() { public void onComplete(TTableDetails o) { get_table_details_for_database_result result = new get_table_details_for_database_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_table_details_for_database_result result = new get_table_details_for_database_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_details_for_database_args args, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException { iface.get_table_details_for_database(args.session, args.table_name, args.database_name,resultHandler); } } public static class get_internal_table_details<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_internal_table_details_args, TTableDetails> { public get_internal_table_details() { super("get_internal_table_details"); } public get_internal_table_details_args getEmptyArgsInstance() { return new get_internal_table_details_args(); } public org.apache.thrift.async.AsyncMethodCallback<TTableDetails> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TTableDetails>() { public void onComplete(TTableDetails o) { get_internal_table_details_result result = new get_internal_table_details_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_internal_table_details_result result = new get_internal_table_details_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_internal_table_details_args args, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException { iface.get_internal_table_details(args.session, args.table_name, args.include_system_columns,resultHandler); } } public static class get_internal_table_details_for_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_internal_table_details_for_database_args, TTableDetails> { public get_internal_table_details_for_database() { super("get_internal_table_details_for_database"); } public get_internal_table_details_for_database_args getEmptyArgsInstance() { return new get_internal_table_details_for_database_args(); } public org.apache.thrift.async.AsyncMethodCallback<TTableDetails> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TTableDetails>() { public void onComplete(TTableDetails o) { get_internal_table_details_for_database_result result = new get_internal_table_details_for_database_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_internal_table_details_for_database_result result = new get_internal_table_details_for_database_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_internal_table_details_for_database_args args, org.apache.thrift.async.AsyncMethodCallback<TTableDetails> resultHandler) throws org.apache.thrift.TException { iface.get_internal_table_details_for_database(args.session, args.table_name, args.database_name,resultHandler); } } public static class get_users<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_users_args, java.util.List<java.lang.String>> { public get_users() { super("get_users"); } public get_users_args getEmptyArgsInstance() { return new get_users_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_users_result result = new get_users_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_users_result result = new get_users_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_users_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_users(args.session,resultHandler); } } public static class get_databases<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_databases_args, java.util.List<TDBInfo>> { public get_databases() { super("get_databases"); } public get_databases_args getEmptyArgsInstance() { return new get_databases_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBInfo>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBInfo>>() { public void onComplete(java.util.List<TDBInfo> o) { get_databases_result result = new get_databases_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_databases_result result = new get_databases_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_databases_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBInfo>> resultHandler) throws org.apache.thrift.TException { iface.get_databases(args.session,resultHandler); } } public static class get_version<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_version_args, java.lang.String> { public get_version() { super("get_version"); } public get_version_args getEmptyArgsInstance() { return new get_version_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { public void onComplete(java.lang.String o) { get_version_result result = new get_version_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_version_result result = new get_version_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_version_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { iface.get_version(resultHandler); } } public static class start_heap_profile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, start_heap_profile_args, Void> { public start_heap_profile() { super("start_heap_profile"); } public start_heap_profile_args getEmptyArgsInstance() { return new start_heap_profile_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { start_heap_profile_result result = new start_heap_profile_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; start_heap_profile_result result = new start_heap_profile_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, start_heap_profile_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.start_heap_profile(args.session,resultHandler); } } public static class stop_heap_profile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, stop_heap_profile_args, Void> { public stop_heap_profile() { super("stop_heap_profile"); } public stop_heap_profile_args getEmptyArgsInstance() { return new stop_heap_profile_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { stop_heap_profile_result result = new stop_heap_profile_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; stop_heap_profile_result result = new stop_heap_profile_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, stop_heap_profile_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.stop_heap_profile(args.session,resultHandler); } } public static class get_heap_profile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_heap_profile_args, java.lang.String> { public get_heap_profile() { super("get_heap_profile"); } public get_heap_profile_args getEmptyArgsInstance() { return new get_heap_profile_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { public void onComplete(java.lang.String o) { get_heap_profile_result result = new get_heap_profile_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_heap_profile_result result = new get_heap_profile_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_heap_profile_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { iface.get_heap_profile(args.session,resultHandler); } } public static class get_memory<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_memory_args, java.util.List<TNodeMemoryInfo>> { public get_memory() { super("get_memory"); } public get_memory_args getEmptyArgsInstance() { return new get_memory_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TNodeMemoryInfo>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TNodeMemoryInfo>>() { public void onComplete(java.util.List<TNodeMemoryInfo> o) { get_memory_result result = new get_memory_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_memory_result result = new get_memory_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_memory_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TNodeMemoryInfo>> resultHandler) throws org.apache.thrift.TException { iface.get_memory(args.session, args.memory_level,resultHandler); } } public static class clear_cpu_memory<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, clear_cpu_memory_args, Void> { public clear_cpu_memory() { super("clear_cpu_memory"); } public clear_cpu_memory_args getEmptyArgsInstance() { return new clear_cpu_memory_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { clear_cpu_memory_result result = new clear_cpu_memory_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; clear_cpu_memory_result result = new clear_cpu_memory_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, clear_cpu_memory_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.clear_cpu_memory(args.session,resultHandler); } } public static class clear_gpu_memory<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, clear_gpu_memory_args, Void> { public clear_gpu_memory() { super("clear_gpu_memory"); } public clear_gpu_memory_args getEmptyArgsInstance() { return new clear_gpu_memory_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { clear_gpu_memory_result result = new clear_gpu_memory_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; clear_gpu_memory_result result = new clear_gpu_memory_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, clear_gpu_memory_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.clear_gpu_memory(args.session,resultHandler); } } public static class set_cur_session<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, set_cur_session_args, Void> { public set_cur_session() { super("set_cur_session"); } public set_cur_session_args getEmptyArgsInstance() { return new set_cur_session_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { set_cur_session_result result = new set_cur_session_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; set_cur_session_result result = new set_cur_session_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, set_cur_session_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.set_cur_session(args.parent_session, args.leaf_session, args.start_time_str, args.label, args.for_running_query_kernel,resultHandler); } } public static class invalidate_cur_session<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, invalidate_cur_session_args, Void> { public invalidate_cur_session() { super("invalidate_cur_session"); } public invalidate_cur_session_args getEmptyArgsInstance() { return new invalidate_cur_session_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { invalidate_cur_session_result result = new invalidate_cur_session_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; invalidate_cur_session_result result = new invalidate_cur_session_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, invalidate_cur_session_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.invalidate_cur_session(args.parent_session, args.leaf_session, args.start_time_str, args.label, args.for_running_query_kernel,resultHandler); } } public static class set_table_epoch<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, set_table_epoch_args, Void> { public set_table_epoch() { super("set_table_epoch"); } public set_table_epoch_args getEmptyArgsInstance() { return new set_table_epoch_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { set_table_epoch_result result = new set_table_epoch_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; set_table_epoch_result result = new set_table_epoch_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, set_table_epoch_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.set_table_epoch(args.session, args.db_id, args.table_id, args.new_epoch,resultHandler); } } public static class set_table_epoch_by_name<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, set_table_epoch_by_name_args, Void> { public set_table_epoch_by_name() { super("set_table_epoch_by_name"); } public set_table_epoch_by_name_args getEmptyArgsInstance() { return new set_table_epoch_by_name_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { set_table_epoch_by_name_result result = new set_table_epoch_by_name_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; set_table_epoch_by_name_result result = new set_table_epoch_by_name_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, set_table_epoch_by_name_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.set_table_epoch_by_name(args.session, args.table_name, args.new_epoch,resultHandler); } } public static class get_table_epoch<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_epoch_args, java.lang.Integer> { public get_table_epoch() { super("get_table_epoch"); } public get_table_epoch_args getEmptyArgsInstance() { return new get_table_epoch_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer>() { public void onComplete(java.lang.Integer o) { get_table_epoch_result result = new get_table_epoch_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_table_epoch_result result = new get_table_epoch_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_epoch_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException { iface.get_table_epoch(args.session, args.db_id, args.table_id,resultHandler); } } public static class get_table_epoch_by_name<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_epoch_by_name_args, java.lang.Integer> { public get_table_epoch_by_name() { super("get_table_epoch_by_name"); } public get_table_epoch_by_name_args getEmptyArgsInstance() { return new get_table_epoch_by_name_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer>() { public void onComplete(java.lang.Integer o) { get_table_epoch_by_name_result result = new get_table_epoch_by_name_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_table_epoch_by_name_result result = new get_table_epoch_by_name_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_epoch_by_name_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException { iface.get_table_epoch_by_name(args.session, args.table_name,resultHandler); } } public static class get_table_epochs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_epochs_args, java.util.List<TTableEpochInfo>> { public get_table_epochs() { super("get_table_epochs"); } public get_table_epochs_args getEmptyArgsInstance() { return new get_table_epochs_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableEpochInfo>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableEpochInfo>>() { public void onComplete(java.util.List<TTableEpochInfo> o) { get_table_epochs_result result = new get_table_epochs_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_table_epochs_result result = new get_table_epochs_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_epochs_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TTableEpochInfo>> resultHandler) throws org.apache.thrift.TException { iface.get_table_epochs(args.session, args.db_id, args.table_id,resultHandler); } } public static class set_table_epochs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, set_table_epochs_args, Void> { public set_table_epochs() { super("set_table_epochs"); } public set_table_epochs_args getEmptyArgsInstance() { return new set_table_epochs_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { set_table_epochs_result result = new set_table_epochs_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; set_table_epochs_result result = new set_table_epochs_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, set_table_epochs_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.set_table_epochs(args.session, args.db_id, args.table_epochs,resultHandler); } } public static class get_session_info<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_session_info_args, TSessionInfo> { public get_session_info() { super("get_session_info"); } public get_session_info_args getEmptyArgsInstance() { return new get_session_info_args(); } public org.apache.thrift.async.AsyncMethodCallback<TSessionInfo> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TSessionInfo>() { public void onComplete(TSessionInfo o) { get_session_info_result result = new get_session_info_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_session_info_result result = new get_session_info_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_session_info_args args, org.apache.thrift.async.AsyncMethodCallback<TSessionInfo> resultHandler) throws org.apache.thrift.TException { iface.get_session_info(args.session,resultHandler); } } public static class get_queries_info<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_queries_info_args, java.util.List<TQueryInfo>> { public get_queries_info() { super("get_queries_info"); } public get_queries_info_args getEmptyArgsInstance() { return new get_queries_info_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TQueryInfo>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TQueryInfo>>() { public void onComplete(java.util.List<TQueryInfo> o) { get_queries_info_result result = new get_queries_info_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_queries_info_result result = new get_queries_info_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_queries_info_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TQueryInfo>> resultHandler) throws org.apache.thrift.TException { iface.get_queries_info(args.session,resultHandler); } } public static class set_leaf_info<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, set_leaf_info_args, Void> { public set_leaf_info() { super("set_leaf_info"); } public set_leaf_info_args getEmptyArgsInstance() { return new set_leaf_info_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { set_leaf_info_result result = new set_leaf_info_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; set_leaf_info_result result = new set_leaf_info_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, set_leaf_info_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.set_leaf_info(args.session, args.leaf_info,resultHandler); } } public static class sql_execute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, sql_execute_args, TQueryResult> { public sql_execute() { super("sql_execute"); } public sql_execute_args getEmptyArgsInstance() { return new sql_execute_args(); } public org.apache.thrift.async.AsyncMethodCallback<TQueryResult> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TQueryResult>() { public void onComplete(TQueryResult o) { sql_execute_result result = new sql_execute_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; sql_execute_result result = new sql_execute_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, sql_execute_args args, org.apache.thrift.async.AsyncMethodCallback<TQueryResult> resultHandler) throws org.apache.thrift.TException { iface.sql_execute(args.session, args.query, args.column_format, args.nonce, args.first_n, args.at_most_n,resultHandler); } } public static class sql_execute_df<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, sql_execute_df_args, TDataFrame> { public sql_execute_df() { super("sql_execute_df"); } public sql_execute_df_args getEmptyArgsInstance() { return new sql_execute_df_args(); } public org.apache.thrift.async.AsyncMethodCallback<TDataFrame> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TDataFrame>() { public void onComplete(TDataFrame o) { sql_execute_df_result result = new sql_execute_df_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; sql_execute_df_result result = new sql_execute_df_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, sql_execute_df_args args, org.apache.thrift.async.AsyncMethodCallback<TDataFrame> resultHandler) throws org.apache.thrift.TException { iface.sql_execute_df(args.session, args.query, args.device_type, args.device_id, args.first_n, args.transport_method,resultHandler); } } public static class sql_execute_gdf<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, sql_execute_gdf_args, TDataFrame> { public sql_execute_gdf() { super("sql_execute_gdf"); } public sql_execute_gdf_args getEmptyArgsInstance() { return new sql_execute_gdf_args(); } public org.apache.thrift.async.AsyncMethodCallback<TDataFrame> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TDataFrame>() { public void onComplete(TDataFrame o) { sql_execute_gdf_result result = new sql_execute_gdf_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; sql_execute_gdf_result result = new sql_execute_gdf_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, sql_execute_gdf_args args, org.apache.thrift.async.AsyncMethodCallback<TDataFrame> resultHandler) throws org.apache.thrift.TException { iface.sql_execute_gdf(args.session, args.query, args.device_id, args.first_n,resultHandler); } } public static class deallocate_df<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deallocate_df_args, Void> { public deallocate_df() { super("deallocate_df"); } public deallocate_df_args getEmptyArgsInstance() { return new deallocate_df_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { deallocate_df_result result = new deallocate_df_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; deallocate_df_result result = new deallocate_df_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, deallocate_df_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.deallocate_df(args.session, args.df, args.device_type, args.device_id,resultHandler); } } public static class interrupt<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, interrupt_args, Void> { public interrupt() { super("interrupt"); } public interrupt_args getEmptyArgsInstance() { return new interrupt_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { interrupt_result result = new interrupt_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; interrupt_result result = new interrupt_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, interrupt_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.interrupt(args.query_session, args.interrupt_session,resultHandler); } } public static class sql_validate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, sql_validate_args, java.util.List<TColumnType>> { public sql_validate() { super("sql_validate"); } public sql_validate_args getEmptyArgsInstance() { return new sql_validate_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TColumnType>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TColumnType>>() { public void onComplete(java.util.List<TColumnType> o) { sql_validate_result result = new sql_validate_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; sql_validate_result result = new sql_validate_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, sql_validate_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TColumnType>> resultHandler) throws org.apache.thrift.TException { iface.sql_validate(args.session, args.query,resultHandler); } } public static class get_completion_hints<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_completion_hints_args, java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> { public get_completion_hints() { super("get_completion_hints"); } public get_completion_hints_args getEmptyArgsInstance() { return new get_completion_hints_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>>() { public void onComplete(java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> o) { get_completion_hints_result result = new get_completion_hints_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_completion_hints_result result = new get_completion_hints_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_completion_hints_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>> resultHandler) throws org.apache.thrift.TException { iface.get_completion_hints(args.session, args.sql, args.cursor,resultHandler); } } public static class set_execution_mode<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, set_execution_mode_args, Void> { public set_execution_mode() { super("set_execution_mode"); } public set_execution_mode_args getEmptyArgsInstance() { return new set_execution_mode_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { set_execution_mode_result result = new set_execution_mode_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; set_execution_mode_result result = new set_execution_mode_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, set_execution_mode_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.set_execution_mode(args.session, args.mode,resultHandler); } } public static class render_vega<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, render_vega_args, TRenderResult> { public render_vega() { super("render_vega"); } public render_vega_args getEmptyArgsInstance() { return new render_vega_args(); } public org.apache.thrift.async.AsyncMethodCallback<TRenderResult> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TRenderResult>() { public void onComplete(TRenderResult o) { render_vega_result result = new render_vega_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; render_vega_result result = new render_vega_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, render_vega_args args, org.apache.thrift.async.AsyncMethodCallback<TRenderResult> resultHandler) throws org.apache.thrift.TException { iface.render_vega(args.session, args.widget_id, args.vega_json, args.compression_level, args.nonce,resultHandler); } } public static class get_result_row_for_pixel<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_result_row_for_pixel_args, TPixelTableRowResult> { public get_result_row_for_pixel() { super("get_result_row_for_pixel"); } public get_result_row_for_pixel_args getEmptyArgsInstance() { return new get_result_row_for_pixel_args(); } public org.apache.thrift.async.AsyncMethodCallback<TPixelTableRowResult> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TPixelTableRowResult>() { public void onComplete(TPixelTableRowResult o) { get_result_row_for_pixel_result result = new get_result_row_for_pixel_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_result_row_for_pixel_result result = new get_result_row_for_pixel_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_result_row_for_pixel_args args, org.apache.thrift.async.AsyncMethodCallback<TPixelTableRowResult> resultHandler) throws org.apache.thrift.TException { iface.get_result_row_for_pixel(args.session, args.widget_id, args.pixel, args.table_col_names, args.column_format, args.pixelRadius, args.nonce,resultHandler); } } public static class create_custom_expression<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_custom_expression_args, java.lang.Integer> { public create_custom_expression() { super("create_custom_expression"); } public create_custom_expression_args getEmptyArgsInstance() { return new create_custom_expression_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer>() { public void onComplete(java.lang.Integer o) { create_custom_expression_result result = new create_custom_expression_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; create_custom_expression_result result = new create_custom_expression_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, create_custom_expression_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException { iface.create_custom_expression(args.session, args.custom_expression,resultHandler); } } public static class get_custom_expressions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_custom_expressions_args, java.util.List<TCustomExpression>> { public get_custom_expressions() { super("get_custom_expressions"); } public get_custom_expressions_args getEmptyArgsInstance() { return new get_custom_expressions_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCustomExpression>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCustomExpression>>() { public void onComplete(java.util.List<TCustomExpression> o) { get_custom_expressions_result result = new get_custom_expressions_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_custom_expressions_result result = new get_custom_expressions_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_custom_expressions_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCustomExpression>> resultHandler) throws org.apache.thrift.TException { iface.get_custom_expressions(args.session,resultHandler); } } public static class update_custom_expression<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, update_custom_expression_args, Void> { public update_custom_expression() { super("update_custom_expression"); } public update_custom_expression_args getEmptyArgsInstance() { return new update_custom_expression_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { update_custom_expression_result result = new update_custom_expression_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; update_custom_expression_result result = new update_custom_expression_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, update_custom_expression_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.update_custom_expression(args.session, args.id, args.expression_json,resultHandler); } } public static class delete_custom_expressions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, delete_custom_expressions_args, Void> { public delete_custom_expressions() { super("delete_custom_expressions"); } public delete_custom_expressions_args getEmptyArgsInstance() { return new delete_custom_expressions_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { delete_custom_expressions_result result = new delete_custom_expressions_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; delete_custom_expressions_result result = new delete_custom_expressions_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, delete_custom_expressions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.delete_custom_expressions(args.session, args.custom_expression_ids, args.do_soft_delete,resultHandler); } } public static class get_dashboard<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_dashboard_args, TDashboard> { public get_dashboard() { super("get_dashboard"); } public get_dashboard_args getEmptyArgsInstance() { return new get_dashboard_args(); } public org.apache.thrift.async.AsyncMethodCallback<TDashboard> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TDashboard>() { public void onComplete(TDashboard o) { get_dashboard_result result = new get_dashboard_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_dashboard_result result = new get_dashboard_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_dashboard_args args, org.apache.thrift.async.AsyncMethodCallback<TDashboard> resultHandler) throws org.apache.thrift.TException { iface.get_dashboard(args.session, args.dashboard_id,resultHandler); } } public static class get_dashboards<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_dashboards_args, java.util.List<TDashboard>> { public get_dashboards() { super("get_dashboards"); } public get_dashboards_args getEmptyArgsInstance() { return new get_dashboards_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboard>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboard>>() { public void onComplete(java.util.List<TDashboard> o) { get_dashboards_result result = new get_dashboards_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_dashboards_result result = new get_dashboards_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_dashboards_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboard>> resultHandler) throws org.apache.thrift.TException { iface.get_dashboards(args.session,resultHandler); } } public static class create_dashboard<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_dashboard_args, java.lang.Integer> { public create_dashboard() { super("create_dashboard"); } public create_dashboard_args getEmptyArgsInstance() { return new create_dashboard_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer>() { public void onComplete(java.lang.Integer o) { create_dashboard_result result = new create_dashboard_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; create_dashboard_result result = new create_dashboard_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, create_dashboard_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException { iface.create_dashboard(args.session, args.dashboard_name, args.dashboard_state, args.image_hash, args.dashboard_metadata,resultHandler); } } public static class replace_dashboard<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, replace_dashboard_args, Void> { public replace_dashboard() { super("replace_dashboard"); } public replace_dashboard_args getEmptyArgsInstance() { return new replace_dashboard_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { replace_dashboard_result result = new replace_dashboard_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; replace_dashboard_result result = new replace_dashboard_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, replace_dashboard_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.replace_dashboard(args.session, args.dashboard_id, args.dashboard_name, args.dashboard_owner, args.dashboard_state, args.image_hash, args.dashboard_metadata,resultHandler); } } public static class delete_dashboard<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, delete_dashboard_args, Void> { public delete_dashboard() { super("delete_dashboard"); } public delete_dashboard_args getEmptyArgsInstance() { return new delete_dashboard_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { delete_dashboard_result result = new delete_dashboard_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; delete_dashboard_result result = new delete_dashboard_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, delete_dashboard_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.delete_dashboard(args.session, args.dashboard_id,resultHandler); } } public static class share_dashboards<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, share_dashboards_args, Void> { public share_dashboards() { super("share_dashboards"); } public share_dashboards_args getEmptyArgsInstance() { return new share_dashboards_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { share_dashboards_result result = new share_dashboards_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; share_dashboards_result result = new share_dashboards_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, share_dashboards_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.share_dashboards(args.session, args.dashboard_ids, args.groups, args.permissions,resultHandler); } } public static class delete_dashboards<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, delete_dashboards_args, Void> { public delete_dashboards() { super("delete_dashboards"); } public delete_dashboards_args getEmptyArgsInstance() { return new delete_dashboards_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { delete_dashboards_result result = new delete_dashboards_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; delete_dashboards_result result = new delete_dashboards_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, delete_dashboards_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.delete_dashboards(args.session, args.dashboard_ids,resultHandler); } } public static class share_dashboard<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, share_dashboard_args, Void> { public share_dashboard() { super("share_dashboard"); } public share_dashboard_args getEmptyArgsInstance() { return new share_dashboard_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { share_dashboard_result result = new share_dashboard_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; share_dashboard_result result = new share_dashboard_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, share_dashboard_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.share_dashboard(args.session, args.dashboard_id, args.groups, args.objects, args.permissions, args.grant_role,resultHandler); } } public static class unshare_dashboard<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unshare_dashboard_args, Void> { public unshare_dashboard() { super("unshare_dashboard"); } public unshare_dashboard_args getEmptyArgsInstance() { return new unshare_dashboard_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { unshare_dashboard_result result = new unshare_dashboard_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; unshare_dashboard_result result = new unshare_dashboard_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, unshare_dashboard_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.unshare_dashboard(args.session, args.dashboard_id, args.groups, args.objects, args.permissions,resultHandler); } } public static class unshare_dashboards<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unshare_dashboards_args, Void> { public unshare_dashboards() { super("unshare_dashboards"); } public unshare_dashboards_args getEmptyArgsInstance() { return new unshare_dashboards_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { unshare_dashboards_result result = new unshare_dashboards_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; unshare_dashboards_result result = new unshare_dashboards_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, unshare_dashboards_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.unshare_dashboards(args.session, args.dashboard_ids, args.groups, args.permissions,resultHandler); } } public static class get_dashboard_grantees<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_dashboard_grantees_args, java.util.List<TDashboardGrantees>> { public get_dashboard_grantees() { super("get_dashboard_grantees"); } public get_dashboard_grantees_args getEmptyArgsInstance() { return new get_dashboard_grantees_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboardGrantees>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboardGrantees>>() { public void onComplete(java.util.List<TDashboardGrantees> o) { get_dashboard_grantees_result result = new get_dashboard_grantees_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_dashboard_grantees_result result = new get_dashboard_grantees_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_dashboard_grantees_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDashboardGrantees>> resultHandler) throws org.apache.thrift.TException { iface.get_dashboard_grantees(args.session, args.dashboard_id,resultHandler); } } public static class get_link_view<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_link_view_args, TFrontendView> { public get_link_view() { super("get_link_view"); } public get_link_view_args getEmptyArgsInstance() { return new get_link_view_args(); } public org.apache.thrift.async.AsyncMethodCallback<TFrontendView> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TFrontendView>() { public void onComplete(TFrontendView o) { get_link_view_result result = new get_link_view_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_link_view_result result = new get_link_view_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_link_view_args args, org.apache.thrift.async.AsyncMethodCallback<TFrontendView> resultHandler) throws org.apache.thrift.TException { iface.get_link_view(args.session, args.link,resultHandler); } } public static class create_link<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_link_args, java.lang.String> { public create_link() { super("create_link"); } public create_link_args getEmptyArgsInstance() { return new create_link_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { public void onComplete(java.lang.String o) { create_link_result result = new create_link_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; create_link_result result = new create_link_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, create_link_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { iface.create_link(args.session, args.view_state, args.view_metadata,resultHandler); } } public static class load_table_binary<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, load_table_binary_args, Void> { public load_table_binary() { super("load_table_binary"); } public load_table_binary_args getEmptyArgsInstance() { return new load_table_binary_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { load_table_binary_result result = new load_table_binary_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; load_table_binary_result result = new load_table_binary_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, load_table_binary_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.load_table_binary(args.session, args.table_name, args.rows, args.column_names,resultHandler); } } public static class load_table_binary_columnar<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, load_table_binary_columnar_args, Void> { public load_table_binary_columnar() { super("load_table_binary_columnar"); } public load_table_binary_columnar_args getEmptyArgsInstance() { return new load_table_binary_columnar_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { load_table_binary_columnar_result result = new load_table_binary_columnar_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; load_table_binary_columnar_result result = new load_table_binary_columnar_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, load_table_binary_columnar_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.load_table_binary_columnar(args.session, args.table_name, args.cols, args.column_names,resultHandler); } } public static class load_table_binary_columnar_polys<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, load_table_binary_columnar_polys_args, Void> { public load_table_binary_columnar_polys() { super("load_table_binary_columnar_polys"); } public load_table_binary_columnar_polys_args getEmptyArgsInstance() { return new load_table_binary_columnar_polys_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { load_table_binary_columnar_polys_result result = new load_table_binary_columnar_polys_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; load_table_binary_columnar_polys_result result = new load_table_binary_columnar_polys_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, load_table_binary_columnar_polys_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.load_table_binary_columnar_polys(args.session, args.table_name, args.cols, args.column_names, args.assign_render_groups,resultHandler); } } public static class load_table_binary_arrow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, load_table_binary_arrow_args, Void> { public load_table_binary_arrow() { super("load_table_binary_arrow"); } public load_table_binary_arrow_args getEmptyArgsInstance() { return new load_table_binary_arrow_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { load_table_binary_arrow_result result = new load_table_binary_arrow_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; load_table_binary_arrow_result result = new load_table_binary_arrow_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, load_table_binary_arrow_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.load_table_binary_arrow(args.session, args.table_name, args.arrow_stream, args.use_column_names,resultHandler); } } public static class load_table<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, load_table_args, Void> { public load_table() { super("load_table"); } public load_table_args getEmptyArgsInstance() { return new load_table_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { load_table_result result = new load_table_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; load_table_result result = new load_table_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, load_table_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.load_table(args.session, args.table_name, args.rows, args.column_names,resultHandler); } } public static class detect_column_types<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, detect_column_types_args, TDetectResult> { public detect_column_types() { super("detect_column_types"); } public detect_column_types_args getEmptyArgsInstance() { return new detect_column_types_args(); } public org.apache.thrift.async.AsyncMethodCallback<TDetectResult> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TDetectResult>() { public void onComplete(TDetectResult o) { detect_column_types_result result = new detect_column_types_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; detect_column_types_result result = new detect_column_types_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, detect_column_types_args args, org.apache.thrift.async.AsyncMethodCallback<TDetectResult> resultHandler) throws org.apache.thrift.TException { iface.detect_column_types(args.session, args.file_name, args.copy_params,resultHandler); } } public static class create_table<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_table_args, Void> { public create_table() { super("create_table"); } public create_table_args getEmptyArgsInstance() { return new create_table_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { create_table_result result = new create_table_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; create_table_result result = new create_table_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, create_table_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.create_table(args.session, args.table_name, args.row_desc, args.create_params,resultHandler); } } public static class import_table<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, import_table_args, Void> { public import_table() { super("import_table"); } public import_table_args getEmptyArgsInstance() { return new import_table_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { import_table_result result = new import_table_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; import_table_result result = new import_table_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, import_table_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.import_table(args.session, args.table_name, args.file_name, args.copy_params,resultHandler); } } public static class import_geo_table<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, import_geo_table_args, Void> { public import_geo_table() { super("import_geo_table"); } public import_geo_table_args getEmptyArgsInstance() { return new import_geo_table_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { import_geo_table_result result = new import_geo_table_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; import_geo_table_result result = new import_geo_table_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, import_geo_table_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.import_geo_table(args.session, args.table_name, args.file_name, args.copy_params, args.row_desc, args.create_params,resultHandler); } } public static class import_table_status<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, import_table_status_args, TImportStatus> { public import_table_status() { super("import_table_status"); } public import_table_status_args getEmptyArgsInstance() { return new import_table_status_args(); } public org.apache.thrift.async.AsyncMethodCallback<TImportStatus> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TImportStatus>() { public void onComplete(TImportStatus o) { import_table_status_result result = new import_table_status_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; import_table_status_result result = new import_table_status_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, import_table_status_args args, org.apache.thrift.async.AsyncMethodCallback<TImportStatus> resultHandler) throws org.apache.thrift.TException { iface.import_table_status(args.session, args.import_id,resultHandler); } } public static class get_first_geo_file_in_archive<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_first_geo_file_in_archive_args, java.lang.String> { public get_first_geo_file_in_archive() { super("get_first_geo_file_in_archive"); } public get_first_geo_file_in_archive_args getEmptyArgsInstance() { return new get_first_geo_file_in_archive_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { public void onComplete(java.lang.String o) { get_first_geo_file_in_archive_result result = new get_first_geo_file_in_archive_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_first_geo_file_in_archive_result result = new get_first_geo_file_in_archive_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_first_geo_file_in_archive_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException { iface.get_first_geo_file_in_archive(args.session, args.archive_path, args.copy_params,resultHandler); } } public static class get_all_files_in_archive<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_all_files_in_archive_args, java.util.List<java.lang.String>> { public get_all_files_in_archive() { super("get_all_files_in_archive"); } public get_all_files_in_archive_args getEmptyArgsInstance() { return new get_all_files_in_archive_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_all_files_in_archive_result result = new get_all_files_in_archive_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_all_files_in_archive_result result = new get_all_files_in_archive_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_all_files_in_archive_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_all_files_in_archive(args.session, args.archive_path, args.copy_params,resultHandler); } } public static class get_layers_in_geo_file<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_layers_in_geo_file_args, java.util.List<TGeoFileLayerInfo>> { public get_layers_in_geo_file() { super("get_layers_in_geo_file"); } public get_layers_in_geo_file_args getEmptyArgsInstance() { return new get_layers_in_geo_file_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TGeoFileLayerInfo>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TGeoFileLayerInfo>>() { public void onComplete(java.util.List<TGeoFileLayerInfo> o) { get_layers_in_geo_file_result result = new get_layers_in_geo_file_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_layers_in_geo_file_result result = new get_layers_in_geo_file_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_layers_in_geo_file_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TGeoFileLayerInfo>> resultHandler) throws org.apache.thrift.TException { iface.get_layers_in_geo_file(args.session, args.file_name, args.copy_params,resultHandler); } } public static class query_get_outer_fragment_count<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, query_get_outer_fragment_count_args, java.lang.Long> { public query_get_outer_fragment_count() { super("query_get_outer_fragment_count"); } public query_get_outer_fragment_count_args getEmptyArgsInstance() { return new query_get_outer_fragment_count_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() { public void onComplete(java.lang.Long o) { query_get_outer_fragment_count_result result = new query_get_outer_fragment_count_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; query_get_outer_fragment_count_result result = new query_get_outer_fragment_count_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, query_get_outer_fragment_count_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException { iface.query_get_outer_fragment_count(args.session, args.query,resultHandler); } } public static class check_table_consistency<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, check_table_consistency_args, TTableMeta> { public check_table_consistency() { super("check_table_consistency"); } public check_table_consistency_args getEmptyArgsInstance() { return new check_table_consistency_args(); } public org.apache.thrift.async.AsyncMethodCallback<TTableMeta> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TTableMeta>() { public void onComplete(TTableMeta o) { check_table_consistency_result result = new check_table_consistency_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; check_table_consistency_result result = new check_table_consistency_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, check_table_consistency_args args, org.apache.thrift.async.AsyncMethodCallback<TTableMeta> resultHandler) throws org.apache.thrift.TException { iface.check_table_consistency(args.session, args.table_id,resultHandler); } } public static class start_query<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, start_query_args, TPendingQuery> { public start_query() { super("start_query"); } public start_query_args getEmptyArgsInstance() { return new start_query_args(); } public org.apache.thrift.async.AsyncMethodCallback<TPendingQuery> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TPendingQuery>() { public void onComplete(TPendingQuery o) { start_query_result result = new start_query_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; start_query_result result = new start_query_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, start_query_args args, org.apache.thrift.async.AsyncMethodCallback<TPendingQuery> resultHandler) throws org.apache.thrift.TException { iface.start_query(args.leaf_session, args.parent_session, args.query_ra, args.start_time_str, args.just_explain, args.outer_fragment_indices,resultHandler); } } public static class execute_query_step<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, execute_query_step_args, TStepResult> { public execute_query_step() { super("execute_query_step"); } public execute_query_step_args getEmptyArgsInstance() { return new execute_query_step_args(); } public org.apache.thrift.async.AsyncMethodCallback<TStepResult> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TStepResult>() { public void onComplete(TStepResult o) { execute_query_step_result result = new execute_query_step_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; execute_query_step_result result = new execute_query_step_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, execute_query_step_args args, org.apache.thrift.async.AsyncMethodCallback<TStepResult> resultHandler) throws org.apache.thrift.TException { iface.execute_query_step(args.pending_query, args.subquery_id, args.start_time_str,resultHandler); } } public static class broadcast_serialized_rows<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, broadcast_serialized_rows_args, Void> { public broadcast_serialized_rows() { super("broadcast_serialized_rows"); } public broadcast_serialized_rows_args getEmptyArgsInstance() { return new broadcast_serialized_rows_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { broadcast_serialized_rows_result result = new broadcast_serialized_rows_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; broadcast_serialized_rows_result result = new broadcast_serialized_rows_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, broadcast_serialized_rows_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.broadcast_serialized_rows(args.serialized_rows, args.row_desc, args.query_id, args.subquery_id, args.is_final_subquery_result,resultHandler); } } public static class start_render_query<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, start_render_query_args, TPendingRenderQuery> { public start_render_query() { super("start_render_query"); } public start_render_query_args getEmptyArgsInstance() { return new start_render_query_args(); } public org.apache.thrift.async.AsyncMethodCallback<TPendingRenderQuery> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TPendingRenderQuery>() { public void onComplete(TPendingRenderQuery o) { start_render_query_result result = new start_render_query_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; start_render_query_result result = new start_render_query_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, start_render_query_args args, org.apache.thrift.async.AsyncMethodCallback<TPendingRenderQuery> resultHandler) throws org.apache.thrift.TException { iface.start_render_query(args.session, args.widget_id, args.node_idx, args.vega_json,resultHandler); } } public static class execute_next_render_step<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, execute_next_render_step_args, TRenderStepResult> { public execute_next_render_step() { super("execute_next_render_step"); } public execute_next_render_step_args getEmptyArgsInstance() { return new execute_next_render_step_args(); } public org.apache.thrift.async.AsyncMethodCallback<TRenderStepResult> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TRenderStepResult>() { public void onComplete(TRenderStepResult o) { execute_next_render_step_result result = new execute_next_render_step_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; execute_next_render_step_result result = new execute_next_render_step_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, execute_next_render_step_args args, org.apache.thrift.async.AsyncMethodCallback<TRenderStepResult> resultHandler) throws org.apache.thrift.TException { iface.execute_next_render_step(args.pending_render, args.merged_data,resultHandler); } } public static class insert_data<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, insert_data_args, Void> { public insert_data() { super("insert_data"); } public insert_data_args getEmptyArgsInstance() { return new insert_data_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { insert_data_result result = new insert_data_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; insert_data_result result = new insert_data_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, insert_data_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.insert_data(args.session, args.insert_data,resultHandler); } } public static class insert_chunks<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, insert_chunks_args, Void> { public insert_chunks() { super("insert_chunks"); } public insert_chunks_args getEmptyArgsInstance() { return new insert_chunks_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { insert_chunks_result result = new insert_chunks_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; insert_chunks_result result = new insert_chunks_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, insert_chunks_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.insert_chunks(args.session, args.insert_chunks,resultHandler); } } public static class checkpoint<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, checkpoint_args, Void> { public checkpoint() { super("checkpoint"); } public checkpoint_args getEmptyArgsInstance() { return new checkpoint_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { checkpoint_result result = new checkpoint_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; checkpoint_result result = new checkpoint_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, checkpoint_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.checkpoint(args.session, args.table_id,resultHandler); } } public static class get_roles<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_roles_args, java.util.List<java.lang.String>> { public get_roles() { super("get_roles"); } public get_roles_args getEmptyArgsInstance() { return new get_roles_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_roles_result result = new get_roles_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_roles_result result = new get_roles_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_roles_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_roles(args.session,resultHandler); } } public static class get_db_objects_for_grantee<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_db_objects_for_grantee_args, java.util.List<TDBObject>> { public get_db_objects_for_grantee() { super("get_db_objects_for_grantee"); } public get_db_objects_for_grantee_args getEmptyArgsInstance() { return new get_db_objects_for_grantee_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>>() { public void onComplete(java.util.List<TDBObject> o) { get_db_objects_for_grantee_result result = new get_db_objects_for_grantee_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_db_objects_for_grantee_result result = new get_db_objects_for_grantee_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_db_objects_for_grantee_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>> resultHandler) throws org.apache.thrift.TException { iface.get_db_objects_for_grantee(args.session, args.roleName,resultHandler); } } public static class get_db_object_privs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_db_object_privs_args, java.util.List<TDBObject>> { public get_db_object_privs() { super("get_db_object_privs"); } public get_db_object_privs_args getEmptyArgsInstance() { return new get_db_object_privs_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>>() { public void onComplete(java.util.List<TDBObject> o) { get_db_object_privs_result result = new get_db_object_privs_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_db_object_privs_result result = new get_db_object_privs_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_db_object_privs_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDBObject>> resultHandler) throws org.apache.thrift.TException { iface.get_db_object_privs(args.session, args.objectName, args.type,resultHandler); } } public static class get_all_roles_for_user<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_all_roles_for_user_args, java.util.List<java.lang.String>> { public get_all_roles_for_user() { super("get_all_roles_for_user"); } public get_all_roles_for_user_args getEmptyArgsInstance() { return new get_all_roles_for_user_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_all_roles_for_user_result result = new get_all_roles_for_user_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_all_roles_for_user_result result = new get_all_roles_for_user_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_all_roles_for_user_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_all_roles_for_user(args.session, args.userName,resultHandler); } } public static class get_all_effective_roles_for_user<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_all_effective_roles_for_user_args, java.util.List<java.lang.String>> { public get_all_effective_roles_for_user() { super("get_all_effective_roles_for_user"); } public get_all_effective_roles_for_user_args getEmptyArgsInstance() { return new get_all_effective_roles_for_user_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_all_effective_roles_for_user_result result = new get_all_effective_roles_for_user_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_all_effective_roles_for_user_result result = new get_all_effective_roles_for_user_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_all_effective_roles_for_user_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_all_effective_roles_for_user(args.session, args.userName,resultHandler); } } public static class has_role<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, has_role_args, java.lang.Boolean> { public has_role() { super("has_role"); } public has_role_args getEmptyArgsInstance() { return new has_role_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { public void onComplete(java.lang.Boolean o) { has_role_result result = new has_role_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; has_role_result result = new has_role_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, has_role_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException { iface.has_role(args.session, args.granteeName, args.roleName,resultHandler); } } public static class has_object_privilege<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, has_object_privilege_args, java.lang.Boolean> { public has_object_privilege() { super("has_object_privilege"); } public has_object_privilege_args getEmptyArgsInstance() { return new has_object_privilege_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { public void onComplete(java.lang.Boolean o) { has_object_privilege_result result = new has_object_privilege_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; has_object_privilege_result result = new has_object_privilege_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, has_object_privilege_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException { iface.has_object_privilege(args.session, args.granteeName, args.ObjectName, args.objectType, args.permissions,resultHandler); } } public static class set_license_key<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, set_license_key_args, TLicenseInfo> { public set_license_key() { super("set_license_key"); } public set_license_key_args getEmptyArgsInstance() { return new set_license_key_args(); } public org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo>() { public void onComplete(TLicenseInfo o) { set_license_key_result result = new set_license_key_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; set_license_key_result result = new set_license_key_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, set_license_key_args args, org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo> resultHandler) throws org.apache.thrift.TException { iface.set_license_key(args.session, args.key, args.nonce,resultHandler); } } public static class get_license_claims<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_license_claims_args, TLicenseInfo> { public get_license_claims() { super("get_license_claims"); } public get_license_claims_args getEmptyArgsInstance() { return new get_license_claims_args(); } public org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo>() { public void onComplete(TLicenseInfo o) { get_license_claims_result result = new get_license_claims_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_license_claims_result result = new get_license_claims_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_license_claims_args args, org.apache.thrift.async.AsyncMethodCallback<TLicenseInfo> resultHandler) throws org.apache.thrift.TException { iface.get_license_claims(args.session, args.nonce,resultHandler); } } public static class get_device_parameters<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_device_parameters_args, java.util.Map<java.lang.String,java.lang.String>> { public get_device_parameters() { super("get_device_parameters"); } public get_device_parameters_args getEmptyArgsInstance() { return new get_device_parameters_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>>() { public void onComplete(java.util.Map<java.lang.String,java.lang.String> o) { get_device_parameters_result result = new get_device_parameters_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_device_parameters_result result = new get_device_parameters_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_device_parameters_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_device_parameters(args.session,resultHandler); } } public static class register_runtime_extension_functions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, register_runtime_extension_functions_args, Void> { public register_runtime_extension_functions() { super("register_runtime_extension_functions"); } public register_runtime_extension_functions_args getEmptyArgsInstance() { return new register_runtime_extension_functions_args(); } public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<Void>() { public void onComplete(Void o) { register_runtime_extension_functions_result result = new register_runtime_extension_functions_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; register_runtime_extension_functions_result result = new register_runtime_extension_functions_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, register_runtime_extension_functions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.register_runtime_extension_functions(args.session, args.udfs, args.udtfs, args.device_ir_map,resultHandler); } } public static class get_table_function_names<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_function_names_args, java.util.List<java.lang.String>> { public get_table_function_names() { super("get_table_function_names"); } public get_table_function_names_args getEmptyArgsInstance() { return new get_table_function_names_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_table_function_names_result result = new get_table_function_names_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_table_function_names_result result = new get_table_function_names_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_function_names_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_table_function_names(args.session,resultHandler); } } public static class get_runtime_table_function_names<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_runtime_table_function_names_args, java.util.List<java.lang.String>> { public get_runtime_table_function_names() { super("get_runtime_table_function_names"); } public get_runtime_table_function_names_args getEmptyArgsInstance() { return new get_runtime_table_function_names_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_runtime_table_function_names_result result = new get_runtime_table_function_names_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_runtime_table_function_names_result result = new get_runtime_table_function_names_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_runtime_table_function_names_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_runtime_table_function_names(args.session,resultHandler); } } public static class get_table_function_details<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_function_details_args, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>> { public get_table_function_details() { super("get_table_function_details"); } public get_table_function_details_args getEmptyArgsInstance() { return new get_table_function_details_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>>() { public void onComplete(java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> o) { get_table_function_details_result result = new get_table_function_details_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_table_function_details_result result = new get_table_function_details_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_function_details_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>> resultHandler) throws org.apache.thrift.TException { iface.get_table_function_details(args.session, args.udtf_names,resultHandler); } } public static class get_function_names<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_function_names_args, java.util.List<java.lang.String>> { public get_function_names() { super("get_function_names"); } public get_function_names_args getEmptyArgsInstance() { return new get_function_names_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_function_names_result result = new get_function_names_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_function_names_result result = new get_function_names_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_function_names_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_function_names(args.session,resultHandler); } } public static class get_runtime_function_names<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_runtime_function_names_args, java.util.List<java.lang.String>> { public get_runtime_function_names() { super("get_runtime_function_names"); } public get_runtime_function_names_args getEmptyArgsInstance() { return new get_runtime_function_names_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { public void onComplete(java.util.List<java.lang.String> o) { get_runtime_function_names_result result = new get_runtime_function_names_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_runtime_function_names_result result = new get_runtime_function_names_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_runtime_function_names_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException { iface.get_runtime_function_names(args.session,resultHandler); } } public static class get_function_details<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_function_details_args, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>> { public get_function_details() { super("get_function_details"); } public get_function_details_args getEmptyArgsInstance() { return new get_function_details_args(); } public org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>>() { public void onComplete(java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> o) { get_function_details_result result = new get_function_details_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_function_details_result result = new get_function_details_result(); if (e instanceof TDBException) { result.e = (TDBException) e; result.setEIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } protected boolean isOneway() { return false; } public void start(I iface, get_function_details_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>> resultHandler) throws org.apache.thrift.TException { iface.get_function_details(args.session, args.udf_names,resultHandler); } } } public static class connect_args implements org.apache.thrift.TBase<connect_args, connect_args._Fields>, java.io.Serializable, Cloneable, Comparable<connect_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("connect_args"); private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PASSWD_FIELD_DESC = new org.apache.thrift.protocol.TField("passwd", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new connect_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new connect_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String user; // required public @org.apache.thrift.annotation.Nullable java.lang.String passwd; // required public @org.apache.thrift.annotation.Nullable java.lang.String dbname; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER((short)1, "user"), PASSWD((short)2, "passwd"), DBNAME((short)3, "dbname"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER return USER; case 2: // PASSWD return PASSWD; case 3: // DBNAME return DBNAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PASSWD, new org.apache.thrift.meta_data.FieldMetaData("passwd", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(connect_args.class, metaDataMap); } public connect_args() { } public connect_args( java.lang.String user, java.lang.String passwd, java.lang.String dbname) { this(); this.user = user; this.passwd = passwd; this.dbname = dbname; } /** * Performs a deep copy on <i>other</i>. */ public connect_args(connect_args other) { if (other.isSetUser()) { this.user = other.user; } if (other.isSetPasswd()) { this.passwd = other.passwd; } if (other.isSetDbname()) { this.dbname = other.dbname; } } public connect_args deepCopy() { return new connect_args(this); } @Override public void clear() { this.user = null; this.passwd = null; this.dbname = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUser() { return this.user; } public connect_args setUser(@org.apache.thrift.annotation.Nullable java.lang.String user) { this.user = user; return this; } public void unsetUser() { this.user = null; } /** Returns true if field user is set (has been assigned a value) and false otherwise */ public boolean isSetUser() { return this.user != null; } public void setUserIsSet(boolean value) { if (!value) { this.user = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getPasswd() { return this.passwd; } public connect_args setPasswd(@org.apache.thrift.annotation.Nullable java.lang.String passwd) { this.passwd = passwd; return this; } public void unsetPasswd() { this.passwd = null; } /** Returns true if field passwd is set (has been assigned a value) and false otherwise */ public boolean isSetPasswd() { return this.passwd != null; } public void setPasswdIsSet(boolean value) { if (!value) { this.passwd = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDbname() { return this.dbname; } public connect_args setDbname(@org.apache.thrift.annotation.Nullable java.lang.String dbname) { this.dbname = dbname; return this; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER: if (value == null) { unsetUser(); } else { setUser((java.lang.String)value); } break; case PASSWD: if (value == null) { unsetPasswd(); } else { setPasswd((java.lang.String)value); } break; case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER: return getUser(); case PASSWD: return getPasswd(); case DBNAME: return getDbname(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER: return isSetUser(); case PASSWD: return isSetPasswd(); case DBNAME: return isSetDbname(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof connect_args) return this.equals((connect_args)that); return false; } public boolean equals(connect_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_user = true && this.isSetUser(); boolean that_present_user = true && that.isSetUser(); if (this_present_user || that_present_user) { if (!(this_present_user && that_present_user)) return false; if (!this.user.equals(that.user)) return false; } boolean this_present_passwd = true && this.isSetPasswd(); boolean that_present_passwd = true && that.isSetPasswd(); if (this_present_passwd || that_present_passwd) { if (!(this_present_passwd && that_present_passwd)) return false; if (!this.passwd.equals(that.passwd)) return false; } boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287); if (isSetUser()) hashCode = hashCode * 8191 + user.hashCode(); hashCode = hashCode * 8191 + ((isSetPasswd()) ? 131071 : 524287); if (isSetPasswd()) hashCode = hashCode * 8191 + passwd.hashCode(); hashCode = hashCode * 8191 + ((isSetDbname()) ? 131071 : 524287); if (isSetDbname()) hashCode = hashCode * 8191 + dbname.hashCode(); return hashCode; } @Override public int compareTo(connect_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUser(), other.isSetUser()); if (lastComparison != 0) { return lastComparison; } if (isSetUser()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPasswd(), other.isSetPasswd()); if (lastComparison != 0) { return lastComparison; } if (isSetPasswd()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwd, other.passwd); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDbname(), other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("connect_args("); boolean first = true; sb.append("user:"); if (this.user == null) { sb.append("null"); } else { sb.append(this.user); } first = false; if (!first) sb.append(", "); sb.append("passwd:"); if (this.passwd == null) { sb.append("null"); } else { sb.append(this.passwd); } first = false; if (!first) sb.append(", "); sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class connect_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public connect_argsStandardScheme getScheme() { return new connect_argsStandardScheme(); } } private static class connect_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<connect_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, connect_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.user = iprot.readString(); struct.setUserIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PASSWD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.passwd = iprot.readString(); struct.setPasswdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, connect_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.user != null) { oprot.writeFieldBegin(USER_FIELD_DESC); oprot.writeString(struct.user); oprot.writeFieldEnd(); } if (struct.passwd != null) { oprot.writeFieldBegin(PASSWD_FIELD_DESC); oprot.writeString(struct.passwd); oprot.writeFieldEnd(); } if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class connect_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public connect_argsTupleScheme getScheme() { return new connect_argsTupleScheme(); } } private static class connect_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<connect_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, connect_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUser()) { optionals.set(0); } if (struct.isSetPasswd()) { optionals.set(1); } if (struct.isSetDbname()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUser()) { oprot.writeString(struct.user); } if (struct.isSetPasswd()) { oprot.writeString(struct.passwd); } if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, connect_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.user = iprot.readString(); struct.setUserIsSet(true); } if (incoming.get(1)) { struct.passwd = iprot.readString(); struct.setPasswdIsSet(true); } if (incoming.get(2)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class connect_result implements org.apache.thrift.TBase<connect_result, connect_result._Fields>, java.io.Serializable, Cloneable, Comparable<connect_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("connect_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new connect_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new connect_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(connect_result.class, metaDataMap); } public connect_result() { } public connect_result( java.lang.String success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public connect_result(connect_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public connect_result deepCopy() { return new connect_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public connect_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public connect_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof connect_result) return this.equals((connect_result)that); return false; } public boolean equals(connect_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(connect_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("connect_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class connect_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public connect_resultStandardScheme getScheme() { return new connect_resultStandardScheme(); } } private static class connect_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<connect_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, connect_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, connect_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class connect_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public connect_resultTupleScheme getScheme() { return new connect_resultTupleScheme(); } } private static class connect_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<connect_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, connect_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, connect_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class krb5_connect_args implements org.apache.thrift.TBase<krb5_connect_args, krb5_connect_args._Fields>, java.io.Serializable, Cloneable, Comparable<krb5_connect_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("krb5_connect_args"); private static final org.apache.thrift.protocol.TField INPUT_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("inputToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new krb5_connect_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new krb5_connect_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String inputToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String dbname; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { INPUT_TOKEN((short)1, "inputToken"), DBNAME((short)2, "dbname"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // INPUT_TOKEN return INPUT_TOKEN; case 2: // DBNAME return DBNAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.INPUT_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("inputToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(krb5_connect_args.class, metaDataMap); } public krb5_connect_args() { } public krb5_connect_args( java.lang.String inputToken, java.lang.String dbname) { this(); this.inputToken = inputToken; this.dbname = dbname; } /** * Performs a deep copy on <i>other</i>. */ public krb5_connect_args(krb5_connect_args other) { if (other.isSetInputToken()) { this.inputToken = other.inputToken; } if (other.isSetDbname()) { this.dbname = other.dbname; } } public krb5_connect_args deepCopy() { return new krb5_connect_args(this); } @Override public void clear() { this.inputToken = null; this.dbname = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getInputToken() { return this.inputToken; } public krb5_connect_args setInputToken(@org.apache.thrift.annotation.Nullable java.lang.String inputToken) { this.inputToken = inputToken; return this; } public void unsetInputToken() { this.inputToken = null; } /** Returns true if field inputToken is set (has been assigned a value) and false otherwise */ public boolean isSetInputToken() { return this.inputToken != null; } public void setInputTokenIsSet(boolean value) { if (!value) { this.inputToken = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDbname() { return this.dbname; } public krb5_connect_args setDbname(@org.apache.thrift.annotation.Nullable java.lang.String dbname) { this.dbname = dbname; return this; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case INPUT_TOKEN: if (value == null) { unsetInputToken(); } else { setInputToken((java.lang.String)value); } break; case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case INPUT_TOKEN: return getInputToken(); case DBNAME: return getDbname(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case INPUT_TOKEN: return isSetInputToken(); case DBNAME: return isSetDbname(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof krb5_connect_args) return this.equals((krb5_connect_args)that); return false; } public boolean equals(krb5_connect_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_inputToken = true && this.isSetInputToken(); boolean that_present_inputToken = true && that.isSetInputToken(); if (this_present_inputToken || that_present_inputToken) { if (!(this_present_inputToken && that_present_inputToken)) return false; if (!this.inputToken.equals(that.inputToken)) return false; } boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetInputToken()) ? 131071 : 524287); if (isSetInputToken()) hashCode = hashCode * 8191 + inputToken.hashCode(); hashCode = hashCode * 8191 + ((isSetDbname()) ? 131071 : 524287); if (isSetDbname()) hashCode = hashCode * 8191 + dbname.hashCode(); return hashCode; } @Override public int compareTo(krb5_connect_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetInputToken(), other.isSetInputToken()); if (lastComparison != 0) { return lastComparison; } if (isSetInputToken()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inputToken, other.inputToken); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDbname(), other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("krb5_connect_args("); boolean first = true; sb.append("inputToken:"); if (this.inputToken == null) { sb.append("null"); } else { sb.append(this.inputToken); } first = false; if (!first) sb.append(", "); sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class krb5_connect_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public krb5_connect_argsStandardScheme getScheme() { return new krb5_connect_argsStandardScheme(); } } private static class krb5_connect_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<krb5_connect_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, krb5_connect_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // INPUT_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.inputToken = iprot.readString(); struct.setInputTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, krb5_connect_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.inputToken != null) { oprot.writeFieldBegin(INPUT_TOKEN_FIELD_DESC); oprot.writeString(struct.inputToken); oprot.writeFieldEnd(); } if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class krb5_connect_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public krb5_connect_argsTupleScheme getScheme() { return new krb5_connect_argsTupleScheme(); } } private static class krb5_connect_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<krb5_connect_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, krb5_connect_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetInputToken()) { optionals.set(0); } if (struct.isSetDbname()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetInputToken()) { oprot.writeString(struct.inputToken); } if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, krb5_connect_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.inputToken = iprot.readString(); struct.setInputTokenIsSet(true); } if (incoming.get(1)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class krb5_connect_result implements org.apache.thrift.TBase<krb5_connect_result, krb5_connect_result._Fields>, java.io.Serializable, Cloneable, Comparable<krb5_connect_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("krb5_connect_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new krb5_connect_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new krb5_connect_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TKrb5Session success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKrb5Session.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(krb5_connect_result.class, metaDataMap); } public krb5_connect_result() { } public krb5_connect_result( TKrb5Session success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public krb5_connect_result(krb5_connect_result other) { if (other.isSetSuccess()) { this.success = new TKrb5Session(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public krb5_connect_result deepCopy() { return new krb5_connect_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TKrb5Session getSuccess() { return this.success; } public krb5_connect_result setSuccess(@org.apache.thrift.annotation.Nullable TKrb5Session success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public krb5_connect_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TKrb5Session)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof krb5_connect_result) return this.equals((krb5_connect_result)that); return false; } public boolean equals(krb5_connect_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(krb5_connect_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("krb5_connect_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class krb5_connect_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public krb5_connect_resultStandardScheme getScheme() { return new krb5_connect_resultStandardScheme(); } } private static class krb5_connect_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<krb5_connect_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, krb5_connect_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TKrb5Session(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, krb5_connect_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class krb5_connect_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public krb5_connect_resultTupleScheme getScheme() { return new krb5_connect_resultTupleScheme(); } } private static class krb5_connect_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<krb5_connect_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, krb5_connect_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, krb5_connect_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TKrb5Session(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class disconnect_args implements org.apache.thrift.TBase<disconnect_args, disconnect_args._Fields>, java.io.Serializable, Cloneable, Comparable<disconnect_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disconnect_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new disconnect_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new disconnect_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disconnect_args.class, metaDataMap); } public disconnect_args() { } public disconnect_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public disconnect_args(disconnect_args other) { if (other.isSetSession()) { this.session = other.session; } } public disconnect_args deepCopy() { return new disconnect_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public disconnect_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof disconnect_args) return this.equals((disconnect_args)that); return false; } public boolean equals(disconnect_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(disconnect_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("disconnect_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class disconnect_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public disconnect_argsStandardScheme getScheme() { return new disconnect_argsStandardScheme(); } } private static class disconnect_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<disconnect_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, disconnect_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, disconnect_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class disconnect_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public disconnect_argsTupleScheme getScheme() { return new disconnect_argsTupleScheme(); } } private static class disconnect_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<disconnect_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, disconnect_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, disconnect_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class disconnect_result implements org.apache.thrift.TBase<disconnect_result, disconnect_result._Fields>, java.io.Serializable, Cloneable, Comparable<disconnect_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disconnect_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new disconnect_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new disconnect_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disconnect_result.class, metaDataMap); } public disconnect_result() { } public disconnect_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public disconnect_result(disconnect_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public disconnect_result deepCopy() { return new disconnect_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public disconnect_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof disconnect_result) return this.equals((disconnect_result)that); return false; } public boolean equals(disconnect_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(disconnect_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("disconnect_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class disconnect_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public disconnect_resultStandardScheme getScheme() { return new disconnect_resultStandardScheme(); } } private static class disconnect_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<disconnect_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, disconnect_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, disconnect_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class disconnect_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public disconnect_resultTupleScheme getScheme() { return new disconnect_resultTupleScheme(); } } private static class disconnect_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<disconnect_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, disconnect_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, disconnect_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class switch_database_args implements org.apache.thrift.TBase<switch_database_args, switch_database_args._Fields>, java.io.Serializable, Cloneable, Comparable<switch_database_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("switch_database_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new switch_database_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new switch_database_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String dbname; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DBNAME((short)2, "dbname"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DBNAME return DBNAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(switch_database_args.class, metaDataMap); } public switch_database_args() { } public switch_database_args( java.lang.String session, java.lang.String dbname) { this(); this.session = session; this.dbname = dbname; } /** * Performs a deep copy on <i>other</i>. */ public switch_database_args(switch_database_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetDbname()) { this.dbname = other.dbname; } } public switch_database_args deepCopy() { return new switch_database_args(this); } @Override public void clear() { this.session = null; this.dbname = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public switch_database_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDbname() { return this.dbname; } public switch_database_args setDbname(@org.apache.thrift.annotation.Nullable java.lang.String dbname) { this.dbname = dbname; return this; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DBNAME: return getDbname(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DBNAME: return isSetDbname(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof switch_database_args) return this.equals((switch_database_args)that); return false; } public boolean equals(switch_database_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetDbname()) ? 131071 : 524287); if (isSetDbname()) hashCode = hashCode * 8191 + dbname.hashCode(); return hashCode; } @Override public int compareTo(switch_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDbname(), other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("switch_database_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class switch_database_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public switch_database_argsStandardScheme getScheme() { return new switch_database_argsStandardScheme(); } } private static class switch_database_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<switch_database_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, switch_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, switch_database_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class switch_database_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public switch_database_argsTupleScheme getScheme() { return new switch_database_argsTupleScheme(); } } private static class switch_database_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<switch_database_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, switch_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDbname()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, switch_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class switch_database_result implements org.apache.thrift.TBase<switch_database_result, switch_database_result._Fields>, java.io.Serializable, Cloneable, Comparable<switch_database_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("switch_database_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new switch_database_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new switch_database_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(switch_database_result.class, metaDataMap); } public switch_database_result() { } public switch_database_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public switch_database_result(switch_database_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public switch_database_result deepCopy() { return new switch_database_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public switch_database_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof switch_database_result) return this.equals((switch_database_result)that); return false; } public boolean equals(switch_database_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(switch_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("switch_database_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class switch_database_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public switch_database_resultStandardScheme getScheme() { return new switch_database_resultStandardScheme(); } } private static class switch_database_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<switch_database_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, switch_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, switch_database_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class switch_database_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public switch_database_resultTupleScheme getScheme() { return new switch_database_resultTupleScheme(); } } private static class switch_database_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<switch_database_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, switch_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, switch_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class clone_session_args implements org.apache.thrift.TBase<clone_session_args, clone_session_args._Fields>, java.io.Serializable, Cloneable, Comparable<clone_session_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clone_session_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new clone_session_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new clone_session_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clone_session_args.class, metaDataMap); } public clone_session_args() { } public clone_session_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public clone_session_args(clone_session_args other) { if (other.isSetSession()) { this.session = other.session; } } public clone_session_args deepCopy() { return new clone_session_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public clone_session_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof clone_session_args) return this.equals((clone_session_args)that); return false; } public boolean equals(clone_session_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(clone_session_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("clone_session_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class clone_session_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clone_session_argsStandardScheme getScheme() { return new clone_session_argsStandardScheme(); } } private static class clone_session_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<clone_session_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, clone_session_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, clone_session_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class clone_session_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clone_session_argsTupleScheme getScheme() { return new clone_session_argsTupleScheme(); } } private static class clone_session_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<clone_session_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, clone_session_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, clone_session_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class clone_session_result implements org.apache.thrift.TBase<clone_session_result, clone_session_result._Fields>, java.io.Serializable, Cloneable, Comparable<clone_session_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clone_session_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new clone_session_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new clone_session_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clone_session_result.class, metaDataMap); } public clone_session_result() { } public clone_session_result( java.lang.String success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public clone_session_result(clone_session_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public clone_session_result deepCopy() { return new clone_session_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public clone_session_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public clone_session_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof clone_session_result) return this.equals((clone_session_result)that); return false; } public boolean equals(clone_session_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(clone_session_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("clone_session_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class clone_session_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clone_session_resultStandardScheme getScheme() { return new clone_session_resultStandardScheme(); } } private static class clone_session_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<clone_session_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, clone_session_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, clone_session_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class clone_session_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clone_session_resultTupleScheme getScheme() { return new clone_session_resultTupleScheme(); } } private static class clone_session_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<clone_session_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, clone_session_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, clone_session_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_server_status_args implements org.apache.thrift.TBase<get_server_status_args, get_server_status_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_server_status_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_server_status_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_server_status_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_server_status_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_server_status_args.class, metaDataMap); } public get_server_status_args() { } public get_server_status_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_server_status_args(get_server_status_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_server_status_args deepCopy() { return new get_server_status_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_server_status_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_server_status_args) return this.equals((get_server_status_args)that); return false; } public boolean equals(get_server_status_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_server_status_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_server_status_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_server_status_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_server_status_argsStandardScheme getScheme() { return new get_server_status_argsStandardScheme(); } } private static class get_server_status_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_server_status_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_server_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_server_status_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_server_status_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_server_status_argsTupleScheme getScheme() { return new get_server_status_argsTupleScheme(); } } private static class get_server_status_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_server_status_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_server_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_server_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_server_status_result implements org.apache.thrift.TBase<get_server_status_result, get_server_status_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_server_status_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_server_status_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_server_status_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_server_status_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TServerStatus success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TServerStatus.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_server_status_result.class, metaDataMap); } public get_server_status_result() { } public get_server_status_result( TServerStatus success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_server_status_result(get_server_status_result other) { if (other.isSetSuccess()) { this.success = new TServerStatus(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_server_status_result deepCopy() { return new get_server_status_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TServerStatus getSuccess() { return this.success; } public get_server_status_result setSuccess(@org.apache.thrift.annotation.Nullable TServerStatus success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_server_status_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TServerStatus)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_server_status_result) return this.equals((get_server_status_result)that); return false; } public boolean equals(get_server_status_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_server_status_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_server_status_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_server_status_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_server_status_resultStandardScheme getScheme() { return new get_server_status_resultStandardScheme(); } } private static class get_server_status_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_server_status_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_server_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TServerStatus(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_server_status_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_server_status_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_server_status_resultTupleScheme getScheme() { return new get_server_status_resultTupleScheme(); } } private static class get_server_status_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_server_status_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_server_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_server_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TServerStatus(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_status_args implements org.apache.thrift.TBase<get_status_args, get_status_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_status_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_status_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_status_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_status_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_status_args.class, metaDataMap); } public get_status_args() { } public get_status_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_status_args(get_status_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_status_args deepCopy() { return new get_status_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_status_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_status_args) return this.equals((get_status_args)that); return false; } public boolean equals(get_status_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_status_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_status_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_status_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_status_argsStandardScheme getScheme() { return new get_status_argsStandardScheme(); } } private static class get_status_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_status_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_status_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_status_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_status_argsTupleScheme getScheme() { return new get_status_argsTupleScheme(); } } private static class get_status_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_status_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_status_result implements org.apache.thrift.TBase<get_status_result, get_status_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_status_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_status_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_status_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_status_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TServerStatus> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TServerStatus.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_status_result.class, metaDataMap); } public get_status_result() { } public get_status_result( java.util.List<TServerStatus> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_status_result(get_status_result other) { if (other.isSetSuccess()) { java.util.List<TServerStatus> __this__success = new java.util.ArrayList<TServerStatus>(other.success.size()); for (TServerStatus other_element : other.success) { __this__success.add(new TServerStatus(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_status_result deepCopy() { return new get_status_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TServerStatus> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TServerStatus elem) { if (this.success == null) { this.success = new java.util.ArrayList<TServerStatus>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TServerStatus> getSuccess() { return this.success; } public get_status_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TServerStatus> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_status_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TServerStatus>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_status_result) return this.equals((get_status_result)that); return false; } public boolean equals(get_status_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_status_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_status_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_status_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_status_resultStandardScheme getScheme() { return new get_status_resultStandardScheme(); } } private static class get_status_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_status_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list314 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TServerStatus>(_list314.size); @org.apache.thrift.annotation.Nullable TServerStatus _elem315; for (int _i316 = 0; _i316 < _list314.size; ++_i316) { _elem315 = new TServerStatus(); _elem315.read(iprot); struct.success.add(_elem315); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_status_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TServerStatus _iter317 : struct.success) { _iter317.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_status_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_status_resultTupleScheme getScheme() { return new get_status_resultTupleScheme(); } } private static class get_status_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_status_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TServerStatus _iter318 : struct.success) { _iter318.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list319 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TServerStatus>(_list319.size); @org.apache.thrift.annotation.Nullable TServerStatus _elem320; for (int _i321 = 0; _i321 < _list319.size; ++_i321) { _elem320 = new TServerStatus(); _elem320.read(iprot); struct.success.add(_elem320); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_hardware_info_args implements org.apache.thrift.TBase<get_hardware_info_args, get_hardware_info_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_hardware_info_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_hardware_info_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_hardware_info_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_hardware_info_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_hardware_info_args.class, metaDataMap); } public get_hardware_info_args() { } public get_hardware_info_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_hardware_info_args(get_hardware_info_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_hardware_info_args deepCopy() { return new get_hardware_info_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_hardware_info_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_hardware_info_args) return this.equals((get_hardware_info_args)that); return false; } public boolean equals(get_hardware_info_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_hardware_info_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_hardware_info_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_hardware_info_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_hardware_info_argsStandardScheme getScheme() { return new get_hardware_info_argsStandardScheme(); } } private static class get_hardware_info_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_hardware_info_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_hardware_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_hardware_info_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_hardware_info_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_hardware_info_argsTupleScheme getScheme() { return new get_hardware_info_argsTupleScheme(); } } private static class get_hardware_info_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_hardware_info_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_hardware_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_hardware_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_hardware_info_result implements org.apache.thrift.TBase<get_hardware_info_result, get_hardware_info_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_hardware_info_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_hardware_info_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_hardware_info_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_hardware_info_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TClusterHardwareInfo success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TClusterHardwareInfo.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_hardware_info_result.class, metaDataMap); } public get_hardware_info_result() { } public get_hardware_info_result( TClusterHardwareInfo success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_hardware_info_result(get_hardware_info_result other) { if (other.isSetSuccess()) { this.success = new TClusterHardwareInfo(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_hardware_info_result deepCopy() { return new get_hardware_info_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TClusterHardwareInfo getSuccess() { return this.success; } public get_hardware_info_result setSuccess(@org.apache.thrift.annotation.Nullable TClusterHardwareInfo success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_hardware_info_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TClusterHardwareInfo)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_hardware_info_result) return this.equals((get_hardware_info_result)that); return false; } public boolean equals(get_hardware_info_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_hardware_info_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_hardware_info_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_hardware_info_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_hardware_info_resultStandardScheme getScheme() { return new get_hardware_info_resultStandardScheme(); } } private static class get_hardware_info_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_hardware_info_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_hardware_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TClusterHardwareInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_hardware_info_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_hardware_info_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_hardware_info_resultTupleScheme getScheme() { return new get_hardware_info_resultTupleScheme(); } } private static class get_hardware_info_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_hardware_info_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_hardware_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_hardware_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TClusterHardwareInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_tables_args implements org.apache.thrift.TBase<get_tables_args, get_tables_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_tables_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_tables_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_tables_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); } public get_tables_args() { } public get_tables_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_tables_args(get_tables_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_tables_args deepCopy() { return new get_tables_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_tables_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_tables_args) return this.equals((get_tables_args)that); return false; } public boolean equals(get_tables_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_tables_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_tables_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_tables_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_argsStandardScheme getScheme() { return new get_tables_argsStandardScheme(); } } private static class get_tables_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_tables_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_tables_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_argsTupleScheme getScheme() { return new get_tables_argsTupleScheme(); } } private static class get_tables_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_tables_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_tables_result implements org.apache.thrift.TBase<get_tables_result, get_tables_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_tables_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_tables_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_tables_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); } public get_tables_result() { } public get_tables_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_tables_result(get_tables_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_tables_result deepCopy() { return new get_tables_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_tables_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_tables_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_tables_result) return this.equals((get_tables_result)that); return false; } public boolean equals(get_tables_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_tables_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_tables_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_tables_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_resultStandardScheme getScheme() { return new get_tables_resultStandardScheme(); } } private static class get_tables_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_tables_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list322 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list322.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem323; for (int _i324 = 0; _i324 < _list322.size; ++_i324) { _elem323 = iprot.readString(); struct.success.add(_elem323); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter325 : struct.success) { oprot.writeString(_iter325); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_tables_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_resultTupleScheme getScheme() { return new get_tables_resultTupleScheme(); } } private static class get_tables_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_tables_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter326 : struct.success) { oprot.writeString(_iter326); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list327 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list327.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem328; for (int _i329 = 0; _i329 < _list327.size; ++_i329) { _elem328 = iprot.readString(); struct.success.add(_elem328); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_tables_for_database_args implements org.apache.thrift.TBase<get_tables_for_database_args, get_tables_for_database_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_tables_for_database_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_for_database_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DATABASE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("database_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_tables_for_database_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_tables_for_database_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String database_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DATABASE_NAME((short)2, "database_name"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DATABASE_NAME return DATABASE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DATABASE_NAME, new org.apache.thrift.meta_data.FieldMetaData("database_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_for_database_args.class, metaDataMap); } public get_tables_for_database_args() { } public get_tables_for_database_args( java.lang.String session, java.lang.String database_name) { this(); this.session = session; this.database_name = database_name; } /** * Performs a deep copy on <i>other</i>. */ public get_tables_for_database_args(get_tables_for_database_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetDatabase_name()) { this.database_name = other.database_name; } } public get_tables_for_database_args deepCopy() { return new get_tables_for_database_args(this); } @Override public void clear() { this.session = null; this.database_name = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_tables_for_database_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDatabase_name() { return this.database_name; } public get_tables_for_database_args setDatabase_name(@org.apache.thrift.annotation.Nullable java.lang.String database_name) { this.database_name = database_name; return this; } public void unsetDatabase_name() { this.database_name = null; } /** Returns true if field database_name is set (has been assigned a value) and false otherwise */ public boolean isSetDatabase_name() { return this.database_name != null; } public void setDatabase_nameIsSet(boolean value) { if (!value) { this.database_name = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DATABASE_NAME: if (value == null) { unsetDatabase_name(); } else { setDatabase_name((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DATABASE_NAME: return getDatabase_name(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DATABASE_NAME: return isSetDatabase_name(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_tables_for_database_args) return this.equals((get_tables_for_database_args)that); return false; } public boolean equals(get_tables_for_database_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_database_name = true && this.isSetDatabase_name(); boolean that_present_database_name = true && that.isSetDatabase_name(); if (this_present_database_name || that_present_database_name) { if (!(this_present_database_name && that_present_database_name)) return false; if (!this.database_name.equals(that.database_name)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetDatabase_name()) ? 131071 : 524287); if (isSetDatabase_name()) hashCode = hashCode * 8191 + database_name.hashCode(); return hashCode; } @Override public int compareTo(get_tables_for_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDatabase_name(), other.isSetDatabase_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDatabase_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database_name, other.database_name); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_tables_for_database_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("database_name:"); if (this.database_name == null) { sb.append("null"); } else { sb.append(this.database_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_tables_for_database_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_for_database_argsStandardScheme getScheme() { return new get_tables_for_database_argsStandardScheme(); } } private static class get_tables_for_database_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_tables_for_database_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_for_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DATABASE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.database_name = iprot.readString(); struct.setDatabase_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_for_database_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.database_name != null) { oprot.writeFieldBegin(DATABASE_NAME_FIELD_DESC); oprot.writeString(struct.database_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_tables_for_database_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_for_database_argsTupleScheme getScheme() { return new get_tables_for_database_argsTupleScheme(); } } private static class get_tables_for_database_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_tables_for_database_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_for_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDatabase_name()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDatabase_name()) { oprot.writeString(struct.database_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_for_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.database_name = iprot.readString(); struct.setDatabase_nameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_tables_for_database_result implements org.apache.thrift.TBase<get_tables_for_database_result, get_tables_for_database_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_tables_for_database_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_for_database_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_tables_for_database_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_tables_for_database_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_for_database_result.class, metaDataMap); } public get_tables_for_database_result() { } public get_tables_for_database_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_tables_for_database_result(get_tables_for_database_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_tables_for_database_result deepCopy() { return new get_tables_for_database_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_tables_for_database_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_tables_for_database_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_tables_for_database_result) return this.equals((get_tables_for_database_result)that); return false; } public boolean equals(get_tables_for_database_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_tables_for_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_tables_for_database_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_tables_for_database_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_for_database_resultStandardScheme getScheme() { return new get_tables_for_database_resultStandardScheme(); } } private static class get_tables_for_database_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_tables_for_database_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_for_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list330 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list330.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem331; for (int _i332 = 0; _i332 < _list330.size; ++_i332) { _elem331 = iprot.readString(); struct.success.add(_elem331); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_for_database_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter333 : struct.success) { oprot.writeString(_iter333); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_tables_for_database_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_for_database_resultTupleScheme getScheme() { return new get_tables_for_database_resultTupleScheme(); } } private static class get_tables_for_database_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_tables_for_database_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_for_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter334 : struct.success) { oprot.writeString(_iter334); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_for_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list335 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list335.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem336; for (int _i337 = 0; _i337 < _list335.size; ++_i337) { _elem336 = iprot.readString(); struct.success.add(_elem336); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_physical_tables_args implements org.apache.thrift.TBase<get_physical_tables_args, get_physical_tables_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_physical_tables_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_physical_tables_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_physical_tables_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_physical_tables_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_physical_tables_args.class, metaDataMap); } public get_physical_tables_args() { } public get_physical_tables_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_physical_tables_args(get_physical_tables_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_physical_tables_args deepCopy() { return new get_physical_tables_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_physical_tables_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_physical_tables_args) return this.equals((get_physical_tables_args)that); return false; } public boolean equals(get_physical_tables_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_physical_tables_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_physical_tables_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_physical_tables_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_physical_tables_argsStandardScheme getScheme() { return new get_physical_tables_argsStandardScheme(); } } private static class get_physical_tables_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_physical_tables_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_physical_tables_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_physical_tables_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_physical_tables_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_physical_tables_argsTupleScheme getScheme() { return new get_physical_tables_argsTupleScheme(); } } private static class get_physical_tables_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_physical_tables_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_physical_tables_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_physical_tables_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_physical_tables_result implements org.apache.thrift.TBase<get_physical_tables_result, get_physical_tables_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_physical_tables_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_physical_tables_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_physical_tables_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_physical_tables_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_physical_tables_result.class, metaDataMap); } public get_physical_tables_result() { } public get_physical_tables_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_physical_tables_result(get_physical_tables_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_physical_tables_result deepCopy() { return new get_physical_tables_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_physical_tables_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_physical_tables_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_physical_tables_result) return this.equals((get_physical_tables_result)that); return false; } public boolean equals(get_physical_tables_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_physical_tables_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_physical_tables_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_physical_tables_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_physical_tables_resultStandardScheme getScheme() { return new get_physical_tables_resultStandardScheme(); } } private static class get_physical_tables_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_physical_tables_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_physical_tables_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list338 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list338.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem339; for (int _i340 = 0; _i340 < _list338.size; ++_i340) { _elem339 = iprot.readString(); struct.success.add(_elem339); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_physical_tables_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter341 : struct.success) { oprot.writeString(_iter341); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_physical_tables_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_physical_tables_resultTupleScheme getScheme() { return new get_physical_tables_resultTupleScheme(); } } private static class get_physical_tables_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_physical_tables_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_physical_tables_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter342 : struct.success) { oprot.writeString(_iter342); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_physical_tables_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list343 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list343.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem344; for (int _i345 = 0; _i345 < _list343.size; ++_i345) { _elem344 = iprot.readString(); struct.success.add(_elem344); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_views_args implements org.apache.thrift.TBase<get_views_args, get_views_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_views_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_views_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_views_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_views_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_views_args.class, metaDataMap); } public get_views_args() { } public get_views_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_views_args(get_views_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_views_args deepCopy() { return new get_views_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_views_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_views_args) return this.equals((get_views_args)that); return false; } public boolean equals(get_views_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_views_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_views_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_views_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_views_argsStandardScheme getScheme() { return new get_views_argsStandardScheme(); } } private static class get_views_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_views_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_views_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_views_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_views_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_views_argsTupleScheme getScheme() { return new get_views_argsTupleScheme(); } } private static class get_views_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_views_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_views_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_views_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_views_result implements org.apache.thrift.TBase<get_views_result, get_views_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_views_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_views_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_views_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_views_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_views_result.class, metaDataMap); } public get_views_result() { } public get_views_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_views_result(get_views_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_views_result deepCopy() { return new get_views_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_views_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_views_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_views_result) return this.equals((get_views_result)that); return false; } public boolean equals(get_views_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_views_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_views_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_views_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_views_resultStandardScheme getScheme() { return new get_views_resultStandardScheme(); } } private static class get_views_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_views_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_views_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list346 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list346.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem347; for (int _i348 = 0; _i348 < _list346.size; ++_i348) { _elem347 = iprot.readString(); struct.success.add(_elem347); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_views_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter349 : struct.success) { oprot.writeString(_iter349); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_views_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_views_resultTupleScheme getScheme() { return new get_views_resultTupleScheme(); } } private static class get_views_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_views_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_views_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter350 : struct.success) { oprot.writeString(_iter350); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_views_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list351 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list351.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem352; for (int _i353 = 0; _i353 < _list351.size; ++_i353) { _elem352 = iprot.readString(); struct.success.add(_elem352); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_tables_meta_args implements org.apache.thrift.TBase<get_tables_meta_args, get_tables_meta_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_tables_meta_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_meta_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_tables_meta_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_tables_meta_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_meta_args.class, metaDataMap); } public get_tables_meta_args() { } public get_tables_meta_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_tables_meta_args(get_tables_meta_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_tables_meta_args deepCopy() { return new get_tables_meta_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_tables_meta_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_tables_meta_args) return this.equals((get_tables_meta_args)that); return false; } public boolean equals(get_tables_meta_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_tables_meta_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_tables_meta_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_tables_meta_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_meta_argsStandardScheme getScheme() { return new get_tables_meta_argsStandardScheme(); } } private static class get_tables_meta_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_tables_meta_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_meta_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_meta_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_tables_meta_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_meta_argsTupleScheme getScheme() { return new get_tables_meta_argsTupleScheme(); } } private static class get_tables_meta_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_tables_meta_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_meta_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_meta_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_tables_meta_result implements org.apache.thrift.TBase<get_tables_meta_result, get_tables_meta_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_tables_meta_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_meta_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_tables_meta_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_tables_meta_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TTableMeta> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableMeta.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_meta_result.class, metaDataMap); } public get_tables_meta_result() { } public get_tables_meta_result( java.util.List<TTableMeta> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_tables_meta_result(get_tables_meta_result other) { if (other.isSetSuccess()) { java.util.List<TTableMeta> __this__success = new java.util.ArrayList<TTableMeta>(other.success.size()); for (TTableMeta other_element : other.success) { __this__success.add(new TTableMeta(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_tables_meta_result deepCopy() { return new get_tables_meta_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TTableMeta> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TTableMeta elem) { if (this.success == null) { this.success = new java.util.ArrayList<TTableMeta>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TTableMeta> getSuccess() { return this.success; } public get_tables_meta_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TTableMeta> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_tables_meta_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TTableMeta>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_tables_meta_result) return this.equals((get_tables_meta_result)that); return false; } public boolean equals(get_tables_meta_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_tables_meta_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_tables_meta_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_tables_meta_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_meta_resultStandardScheme getScheme() { return new get_tables_meta_resultStandardScheme(); } } private static class get_tables_meta_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_tables_meta_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_meta_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list354 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TTableMeta>(_list354.size); @org.apache.thrift.annotation.Nullable TTableMeta _elem355; for (int _i356 = 0; _i356 < _list354.size; ++_i356) { _elem355 = new TTableMeta(); _elem355.read(iprot); struct.success.add(_elem355); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_meta_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TTableMeta _iter357 : struct.success) { _iter357.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_tables_meta_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_tables_meta_resultTupleScheme getScheme() { return new get_tables_meta_resultTupleScheme(); } } private static class get_tables_meta_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_tables_meta_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_meta_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TTableMeta _iter358 : struct.success) { _iter358.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_meta_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list359 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TTableMeta>(_list359.size); @org.apache.thrift.annotation.Nullable TTableMeta _elem360; for (int _i361 = 0; _i361 < _list359.size; ++_i361) { _elem360 = new TTableMeta(); _elem360.read(iprot); struct.success.add(_elem360); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_details_args implements org.apache.thrift.TBase<get_table_details_args, get_table_details_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_details_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_details_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_details_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_details_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_details_args.class, metaDataMap); } public get_table_details_args() { } public get_table_details_args( java.lang.String session, java.lang.String table_name) { this(); this.session = session; this.table_name = table_name; } /** * Performs a deep copy on <i>other</i>. */ public get_table_details_args(get_table_details_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } } public get_table_details_args deepCopy() { return new get_table_details_args(this); } @Override public void clear() { this.session = null; this.table_name = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_table_details_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public get_table_details_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_details_args) return this.equals((get_table_details_args)that); return false; } public boolean equals(get_table_details_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); return hashCode; } @Override public int compareTo(get_table_details_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_details_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_details_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_details_argsStandardScheme getScheme() { return new get_table_details_argsStandardScheme(); } } private static class get_table_details_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_details_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_details_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_details_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_details_argsTupleScheme getScheme() { return new get_table_details_argsTupleScheme(); } } private static class get_table_details_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_details_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_details_result implements org.apache.thrift.TBase<get_table_details_result, get_table_details_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_details_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_details_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_details_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_details_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TTableDetails success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDetails.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_details_result.class, metaDataMap); } public get_table_details_result() { } public get_table_details_result( TTableDetails success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_table_details_result(get_table_details_result other) { if (other.isSetSuccess()) { this.success = new TTableDetails(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_table_details_result deepCopy() { return new get_table_details_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TTableDetails getSuccess() { return this.success; } public get_table_details_result setSuccess(@org.apache.thrift.annotation.Nullable TTableDetails success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_table_details_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TTableDetails)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_details_result) return this.equals((get_table_details_result)that); return false; } public boolean equals(get_table_details_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_table_details_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_details_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_details_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_details_resultStandardScheme getScheme() { return new get_table_details_resultStandardScheme(); } } private static class get_table_details_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_details_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TTableDetails(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_details_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_details_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_details_resultTupleScheme getScheme() { return new get_table_details_resultTupleScheme(); } } private static class get_table_details_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_details_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TTableDetails(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_details_for_database_args implements org.apache.thrift.TBase<get_table_details_for_database_args, get_table_details_for_database_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_details_for_database_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_details_for_database_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DATABASE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("database_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_details_for_database_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_details_for_database_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public @org.apache.thrift.annotation.Nullable java.lang.String database_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), DATABASE_NAME((short)3, "database_name"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // DATABASE_NAME return DATABASE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DATABASE_NAME, new org.apache.thrift.meta_data.FieldMetaData("database_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_details_for_database_args.class, metaDataMap); } public get_table_details_for_database_args() { } public get_table_details_for_database_args( java.lang.String session, java.lang.String table_name, java.lang.String database_name) { this(); this.session = session; this.table_name = table_name; this.database_name = database_name; } /** * Performs a deep copy on <i>other</i>. */ public get_table_details_for_database_args(get_table_details_for_database_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetDatabase_name()) { this.database_name = other.database_name; } } public get_table_details_for_database_args deepCopy() { return new get_table_details_for_database_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.database_name = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_table_details_for_database_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public get_table_details_for_database_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDatabase_name() { return this.database_name; } public get_table_details_for_database_args setDatabase_name(@org.apache.thrift.annotation.Nullable java.lang.String database_name) { this.database_name = database_name; return this; } public void unsetDatabase_name() { this.database_name = null; } /** Returns true if field database_name is set (has been assigned a value) and false otherwise */ public boolean isSetDatabase_name() { return this.database_name != null; } public void setDatabase_nameIsSet(boolean value) { if (!value) { this.database_name = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case DATABASE_NAME: if (value == null) { unsetDatabase_name(); } else { setDatabase_name((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case DATABASE_NAME: return getDatabase_name(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case DATABASE_NAME: return isSetDatabase_name(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_details_for_database_args) return this.equals((get_table_details_for_database_args)that); return false; } public boolean equals(get_table_details_for_database_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_database_name = true && this.isSetDatabase_name(); boolean that_present_database_name = true && that.isSetDatabase_name(); if (this_present_database_name || that_present_database_name) { if (!(this_present_database_name && that_present_database_name)) return false; if (!this.database_name.equals(that.database_name)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((isSetDatabase_name()) ? 131071 : 524287); if (isSetDatabase_name()) hashCode = hashCode * 8191 + database_name.hashCode(); return hashCode; } @Override public int compareTo(get_table_details_for_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDatabase_name(), other.isSetDatabase_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDatabase_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database_name, other.database_name); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_details_for_database_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("database_name:"); if (this.database_name == null) { sb.append("null"); } else { sb.append(this.database_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_details_for_database_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_details_for_database_argsStandardScheme getScheme() { return new get_table_details_for_database_argsStandardScheme(); } } private static class get_table_details_for_database_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_details_for_database_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_details_for_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DATABASE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.database_name = iprot.readString(); struct.setDatabase_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_details_for_database_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.database_name != null) { oprot.writeFieldBegin(DATABASE_NAME_FIELD_DESC); oprot.writeString(struct.database_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_details_for_database_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_details_for_database_argsTupleScheme getScheme() { return new get_table_details_for_database_argsTupleScheme(); } } private static class get_table_details_for_database_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_details_for_database_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_details_for_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetDatabase_name()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetDatabase_name()) { oprot.writeString(struct.database_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_details_for_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { struct.database_name = iprot.readString(); struct.setDatabase_nameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_details_for_database_result implements org.apache.thrift.TBase<get_table_details_for_database_result, get_table_details_for_database_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_details_for_database_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_details_for_database_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_details_for_database_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_details_for_database_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TTableDetails success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDetails.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_details_for_database_result.class, metaDataMap); } public get_table_details_for_database_result() { } public get_table_details_for_database_result( TTableDetails success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_table_details_for_database_result(get_table_details_for_database_result other) { if (other.isSetSuccess()) { this.success = new TTableDetails(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_table_details_for_database_result deepCopy() { return new get_table_details_for_database_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TTableDetails getSuccess() { return this.success; } public get_table_details_for_database_result setSuccess(@org.apache.thrift.annotation.Nullable TTableDetails success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_table_details_for_database_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TTableDetails)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_details_for_database_result) return this.equals((get_table_details_for_database_result)that); return false; } public boolean equals(get_table_details_for_database_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_table_details_for_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_details_for_database_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_details_for_database_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_details_for_database_resultStandardScheme getScheme() { return new get_table_details_for_database_resultStandardScheme(); } } private static class get_table_details_for_database_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_details_for_database_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_details_for_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TTableDetails(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_details_for_database_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_details_for_database_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_details_for_database_resultTupleScheme getScheme() { return new get_table_details_for_database_resultTupleScheme(); } } private static class get_table_details_for_database_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_details_for_database_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_details_for_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_details_for_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TTableDetails(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_internal_table_details_args implements org.apache.thrift.TBase<get_internal_table_details_args, get_internal_table_details_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_internal_table_details_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_internal_table_details_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField INCLUDE_SYSTEM_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("include_system_columns", org.apache.thrift.protocol.TType.BOOL, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_internal_table_details_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_internal_table_details_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public boolean include_system_columns; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), INCLUDE_SYSTEM_COLUMNS((short)3, "include_system_columns"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // INCLUDE_SYSTEM_COLUMNS return INCLUDE_SYSTEM_COLUMNS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __INCLUDE_SYSTEM_COLUMNS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.INCLUDE_SYSTEM_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("include_system_columns", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_internal_table_details_args.class, metaDataMap); } public get_internal_table_details_args() { this.include_system_columns = true; } public get_internal_table_details_args( java.lang.String session, java.lang.String table_name, boolean include_system_columns) { this(); this.session = session; this.table_name = table_name; this.include_system_columns = include_system_columns; setInclude_system_columnsIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public get_internal_table_details_args(get_internal_table_details_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } this.include_system_columns = other.include_system_columns; } public get_internal_table_details_args deepCopy() { return new get_internal_table_details_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.include_system_columns = true; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_internal_table_details_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public get_internal_table_details_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public boolean isInclude_system_columns() { return this.include_system_columns; } public get_internal_table_details_args setInclude_system_columns(boolean include_system_columns) { this.include_system_columns = include_system_columns; setInclude_system_columnsIsSet(true); return this; } public void unsetInclude_system_columns() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INCLUDE_SYSTEM_COLUMNS_ISSET_ID); } /** Returns true if field include_system_columns is set (has been assigned a value) and false otherwise */ public boolean isSetInclude_system_columns() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INCLUDE_SYSTEM_COLUMNS_ISSET_ID); } public void setInclude_system_columnsIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INCLUDE_SYSTEM_COLUMNS_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case INCLUDE_SYSTEM_COLUMNS: if (value == null) { unsetInclude_system_columns(); } else { setInclude_system_columns((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case INCLUDE_SYSTEM_COLUMNS: return isInclude_system_columns(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case INCLUDE_SYSTEM_COLUMNS: return isSetInclude_system_columns(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_internal_table_details_args) return this.equals((get_internal_table_details_args)that); return false; } public boolean equals(get_internal_table_details_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_include_system_columns = true; boolean that_present_include_system_columns = true; if (this_present_include_system_columns || that_present_include_system_columns) { if (!(this_present_include_system_columns && that_present_include_system_columns)) return false; if (this.include_system_columns != that.include_system_columns) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((include_system_columns) ? 131071 : 524287); return hashCode; } @Override public int compareTo(get_internal_table_details_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetInclude_system_columns(), other.isSetInclude_system_columns()); if (lastComparison != 0) { return lastComparison; } if (isSetInclude_system_columns()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.include_system_columns, other.include_system_columns); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_internal_table_details_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("include_system_columns:"); sb.append(this.include_system_columns); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_internal_table_details_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_internal_table_details_argsStandardScheme getScheme() { return new get_internal_table_details_argsStandardScheme(); } } private static class get_internal_table_details_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_internal_table_details_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_internal_table_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // INCLUDE_SYSTEM_COLUMNS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.include_system_columns = iprot.readBool(); struct.setInclude_system_columnsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_internal_table_details_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(INCLUDE_SYSTEM_COLUMNS_FIELD_DESC); oprot.writeBool(struct.include_system_columns); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_internal_table_details_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_internal_table_details_argsTupleScheme getScheme() { return new get_internal_table_details_argsTupleScheme(); } } private static class get_internal_table_details_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_internal_table_details_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_internal_table_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetInclude_system_columns()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetInclude_system_columns()) { oprot.writeBool(struct.include_system_columns); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_internal_table_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { struct.include_system_columns = iprot.readBool(); struct.setInclude_system_columnsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_internal_table_details_result implements org.apache.thrift.TBase<get_internal_table_details_result, get_internal_table_details_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_internal_table_details_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_internal_table_details_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_internal_table_details_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_internal_table_details_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TTableDetails success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDetails.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_internal_table_details_result.class, metaDataMap); } public get_internal_table_details_result() { } public get_internal_table_details_result( TTableDetails success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_internal_table_details_result(get_internal_table_details_result other) { if (other.isSetSuccess()) { this.success = new TTableDetails(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_internal_table_details_result deepCopy() { return new get_internal_table_details_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TTableDetails getSuccess() { return this.success; } public get_internal_table_details_result setSuccess(@org.apache.thrift.annotation.Nullable TTableDetails success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_internal_table_details_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TTableDetails)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_internal_table_details_result) return this.equals((get_internal_table_details_result)that); return false; } public boolean equals(get_internal_table_details_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_internal_table_details_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_internal_table_details_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_internal_table_details_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_internal_table_details_resultStandardScheme getScheme() { return new get_internal_table_details_resultStandardScheme(); } } private static class get_internal_table_details_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_internal_table_details_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_internal_table_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TTableDetails(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_internal_table_details_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_internal_table_details_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_internal_table_details_resultTupleScheme getScheme() { return new get_internal_table_details_resultTupleScheme(); } } private static class get_internal_table_details_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_internal_table_details_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_internal_table_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_internal_table_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TTableDetails(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_internal_table_details_for_database_args implements org.apache.thrift.TBase<get_internal_table_details_for_database_args, get_internal_table_details_for_database_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_internal_table_details_for_database_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_internal_table_details_for_database_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DATABASE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("database_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_internal_table_details_for_database_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_internal_table_details_for_database_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public @org.apache.thrift.annotation.Nullable java.lang.String database_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), DATABASE_NAME((short)3, "database_name"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // DATABASE_NAME return DATABASE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DATABASE_NAME, new org.apache.thrift.meta_data.FieldMetaData("database_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_internal_table_details_for_database_args.class, metaDataMap); } public get_internal_table_details_for_database_args() { } public get_internal_table_details_for_database_args( java.lang.String session, java.lang.String table_name, java.lang.String database_name) { this(); this.session = session; this.table_name = table_name; this.database_name = database_name; } /** * Performs a deep copy on <i>other</i>. */ public get_internal_table_details_for_database_args(get_internal_table_details_for_database_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetDatabase_name()) { this.database_name = other.database_name; } } public get_internal_table_details_for_database_args deepCopy() { return new get_internal_table_details_for_database_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.database_name = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_internal_table_details_for_database_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public get_internal_table_details_for_database_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDatabase_name() { return this.database_name; } public get_internal_table_details_for_database_args setDatabase_name(@org.apache.thrift.annotation.Nullable java.lang.String database_name) { this.database_name = database_name; return this; } public void unsetDatabase_name() { this.database_name = null; } /** Returns true if field database_name is set (has been assigned a value) and false otherwise */ public boolean isSetDatabase_name() { return this.database_name != null; } public void setDatabase_nameIsSet(boolean value) { if (!value) { this.database_name = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case DATABASE_NAME: if (value == null) { unsetDatabase_name(); } else { setDatabase_name((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case DATABASE_NAME: return getDatabase_name(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case DATABASE_NAME: return isSetDatabase_name(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_internal_table_details_for_database_args) return this.equals((get_internal_table_details_for_database_args)that); return false; } public boolean equals(get_internal_table_details_for_database_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_database_name = true && this.isSetDatabase_name(); boolean that_present_database_name = true && that.isSetDatabase_name(); if (this_present_database_name || that_present_database_name) { if (!(this_present_database_name && that_present_database_name)) return false; if (!this.database_name.equals(that.database_name)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((isSetDatabase_name()) ? 131071 : 524287); if (isSetDatabase_name()) hashCode = hashCode * 8191 + database_name.hashCode(); return hashCode; } @Override public int compareTo(get_internal_table_details_for_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDatabase_name(), other.isSetDatabase_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDatabase_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database_name, other.database_name); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_internal_table_details_for_database_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("database_name:"); if (this.database_name == null) { sb.append("null"); } else { sb.append(this.database_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_internal_table_details_for_database_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_internal_table_details_for_database_argsStandardScheme getScheme() { return new get_internal_table_details_for_database_argsStandardScheme(); } } private static class get_internal_table_details_for_database_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_internal_table_details_for_database_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_internal_table_details_for_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DATABASE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.database_name = iprot.readString(); struct.setDatabase_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_internal_table_details_for_database_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.database_name != null) { oprot.writeFieldBegin(DATABASE_NAME_FIELD_DESC); oprot.writeString(struct.database_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_internal_table_details_for_database_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_internal_table_details_for_database_argsTupleScheme getScheme() { return new get_internal_table_details_for_database_argsTupleScheme(); } } private static class get_internal_table_details_for_database_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_internal_table_details_for_database_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_internal_table_details_for_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetDatabase_name()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetDatabase_name()) { oprot.writeString(struct.database_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_internal_table_details_for_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { struct.database_name = iprot.readString(); struct.setDatabase_nameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_internal_table_details_for_database_result implements org.apache.thrift.TBase<get_internal_table_details_for_database_result, get_internal_table_details_for_database_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_internal_table_details_for_database_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_internal_table_details_for_database_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_internal_table_details_for_database_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_internal_table_details_for_database_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TTableDetails success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDetails.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_internal_table_details_for_database_result.class, metaDataMap); } public get_internal_table_details_for_database_result() { } public get_internal_table_details_for_database_result( TTableDetails success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_internal_table_details_for_database_result(get_internal_table_details_for_database_result other) { if (other.isSetSuccess()) { this.success = new TTableDetails(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_internal_table_details_for_database_result deepCopy() { return new get_internal_table_details_for_database_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TTableDetails getSuccess() { return this.success; } public get_internal_table_details_for_database_result setSuccess(@org.apache.thrift.annotation.Nullable TTableDetails success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_internal_table_details_for_database_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TTableDetails)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_internal_table_details_for_database_result) return this.equals((get_internal_table_details_for_database_result)that); return false; } public boolean equals(get_internal_table_details_for_database_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_internal_table_details_for_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_internal_table_details_for_database_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_internal_table_details_for_database_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_internal_table_details_for_database_resultStandardScheme getScheme() { return new get_internal_table_details_for_database_resultStandardScheme(); } } private static class get_internal_table_details_for_database_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_internal_table_details_for_database_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_internal_table_details_for_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TTableDetails(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_internal_table_details_for_database_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_internal_table_details_for_database_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_internal_table_details_for_database_resultTupleScheme getScheme() { return new get_internal_table_details_for_database_resultTupleScheme(); } } private static class get_internal_table_details_for_database_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_internal_table_details_for_database_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_internal_table_details_for_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_internal_table_details_for_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TTableDetails(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_users_args implements org.apache.thrift.TBase<get_users_args, get_users_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_users_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_users_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_users_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_users_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_users_args.class, metaDataMap); } public get_users_args() { } public get_users_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_users_args(get_users_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_users_args deepCopy() { return new get_users_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_users_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_users_args) return this.equals((get_users_args)that); return false; } public boolean equals(get_users_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_users_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_users_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_users_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_users_argsStandardScheme getScheme() { return new get_users_argsStandardScheme(); } } private static class get_users_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_users_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_users_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_users_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_users_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_users_argsTupleScheme getScheme() { return new get_users_argsTupleScheme(); } } private static class get_users_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_users_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_users_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_users_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_users_result implements org.apache.thrift.TBase<get_users_result, get_users_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_users_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_users_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_users_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_users_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_users_result.class, metaDataMap); } public get_users_result() { } public get_users_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_users_result(get_users_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_users_result deepCopy() { return new get_users_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_users_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_users_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_users_result) return this.equals((get_users_result)that); return false; } public boolean equals(get_users_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_users_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_users_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_users_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_users_resultStandardScheme getScheme() { return new get_users_resultStandardScheme(); } } private static class get_users_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_users_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_users_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list362 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list362.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem363; for (int _i364 = 0; _i364 < _list362.size; ++_i364) { _elem363 = iprot.readString(); struct.success.add(_elem363); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_users_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter365 : struct.success) { oprot.writeString(_iter365); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_users_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_users_resultTupleScheme getScheme() { return new get_users_resultTupleScheme(); } } private static class get_users_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_users_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_users_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter366 : struct.success) { oprot.writeString(_iter366); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_users_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list367 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list367.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem368; for (int _i369 = 0; _i369 < _list367.size; ++_i369) { _elem368 = iprot.readString(); struct.success.add(_elem368); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_databases_args implements org.apache.thrift.TBase<get_databases_args, get_databases_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_databases_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_databases_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_databases_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_databases_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_databases_args.class, metaDataMap); } public get_databases_args() { } public get_databases_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_databases_args(get_databases_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_databases_args deepCopy() { return new get_databases_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_databases_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_databases_args) return this.equals((get_databases_args)that); return false; } public boolean equals(get_databases_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_databases_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_databases_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_databases_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_databases_argsStandardScheme getScheme() { return new get_databases_argsStandardScheme(); } } private static class get_databases_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_databases_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_databases_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_databases_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_databases_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_databases_argsTupleScheme getScheme() { return new get_databases_argsTupleScheme(); } } private static class get_databases_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_databases_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_databases_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_databases_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_databases_result implements org.apache.thrift.TBase<get_databases_result, get_databases_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_databases_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_databases_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_databases_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_databases_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TDBInfo> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBInfo.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); } public get_databases_result() { } public get_databases_result( java.util.List<TDBInfo> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_databases_result(get_databases_result other) { if (other.isSetSuccess()) { java.util.List<TDBInfo> __this__success = new java.util.ArrayList<TDBInfo>(other.success.size()); for (TDBInfo other_element : other.success) { __this__success.add(new TDBInfo(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_databases_result deepCopy() { return new get_databases_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TDBInfo> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TDBInfo elem) { if (this.success == null) { this.success = new java.util.ArrayList<TDBInfo>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TDBInfo> getSuccess() { return this.success; } public get_databases_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TDBInfo> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_databases_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TDBInfo>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_databases_result) return this.equals((get_databases_result)that); return false; } public boolean equals(get_databases_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_databases_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_databases_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_databases_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_databases_resultStandardScheme getScheme() { return new get_databases_resultStandardScheme(); } } private static class get_databases_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_databases_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_databases_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list370 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TDBInfo>(_list370.size); @org.apache.thrift.annotation.Nullable TDBInfo _elem371; for (int _i372 = 0; _i372 < _list370.size; ++_i372) { _elem371 = new TDBInfo(); _elem371.read(iprot); struct.success.add(_elem371); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_databases_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TDBInfo _iter373 : struct.success) { _iter373.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_databases_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_databases_resultTupleScheme getScheme() { return new get_databases_resultTupleScheme(); } } private static class get_databases_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_databases_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_databases_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TDBInfo _iter374 : struct.success) { _iter374.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_databases_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list375 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TDBInfo>(_list375.size); @org.apache.thrift.annotation.Nullable TDBInfo _elem376; for (int _i377 = 0; _i377 < _list375.size; ++_i377) { _elem376 = new TDBInfo(); _elem376.read(iprot); struct.success.add(_elem376); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_version_args implements org.apache.thrift.TBase<get_version_args, get_version_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_version_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_version_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_version_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_version_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_version_args.class, metaDataMap); } public get_version_args() { } /** * Performs a deep copy on <i>other</i>. */ public get_version_args(get_version_args other) { } public get_version_args deepCopy() { return new get_version_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_version_args) return this.equals((get_version_args)that); return false; } public boolean equals(get_version_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(get_version_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_version_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_version_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_version_argsStandardScheme getScheme() { return new get_version_argsStandardScheme(); } } private static class get_version_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_version_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_version_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_version_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_version_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_version_argsTupleScheme getScheme() { return new get_version_argsTupleScheme(); } } private static class get_version_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_version_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_version_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_version_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_version_result implements org.apache.thrift.TBase<get_version_result, get_version_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_version_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_version_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_version_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_version_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_version_result.class, metaDataMap); } public get_version_result() { } public get_version_result( java.lang.String success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_version_result(get_version_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_version_result deepCopy() { return new get_version_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public get_version_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_version_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_version_result) return this.equals((get_version_result)that); return false; } public boolean equals(get_version_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_version_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_version_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_version_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_version_resultStandardScheme getScheme() { return new get_version_resultStandardScheme(); } } private static class get_version_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_version_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_version_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_version_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_version_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_version_resultTupleScheme getScheme() { return new get_version_resultTupleScheme(); } } private static class get_version_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_version_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_version_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_version_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class start_heap_profile_args implements org.apache.thrift.TBase<start_heap_profile_args, start_heap_profile_args._Fields>, java.io.Serializable, Cloneable, Comparable<start_heap_profile_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("start_heap_profile_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new start_heap_profile_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new start_heap_profile_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(start_heap_profile_args.class, metaDataMap); } public start_heap_profile_args() { } public start_heap_profile_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public start_heap_profile_args(start_heap_profile_args other) { if (other.isSetSession()) { this.session = other.session; } } public start_heap_profile_args deepCopy() { return new start_heap_profile_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public start_heap_profile_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof start_heap_profile_args) return this.equals((start_heap_profile_args)that); return false; } public boolean equals(start_heap_profile_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(start_heap_profile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("start_heap_profile_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class start_heap_profile_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_heap_profile_argsStandardScheme getScheme() { return new start_heap_profile_argsStandardScheme(); } } private static class start_heap_profile_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<start_heap_profile_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, start_heap_profile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, start_heap_profile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class start_heap_profile_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_heap_profile_argsTupleScheme getScheme() { return new start_heap_profile_argsTupleScheme(); } } private static class start_heap_profile_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<start_heap_profile_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, start_heap_profile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, start_heap_profile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class start_heap_profile_result implements org.apache.thrift.TBase<start_heap_profile_result, start_heap_profile_result._Fields>, java.io.Serializable, Cloneable, Comparable<start_heap_profile_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("start_heap_profile_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new start_heap_profile_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new start_heap_profile_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(start_heap_profile_result.class, metaDataMap); } public start_heap_profile_result() { } public start_heap_profile_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public start_heap_profile_result(start_heap_profile_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public start_heap_profile_result deepCopy() { return new start_heap_profile_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public start_heap_profile_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof start_heap_profile_result) return this.equals((start_heap_profile_result)that); return false; } public boolean equals(start_heap_profile_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(start_heap_profile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("start_heap_profile_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class start_heap_profile_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_heap_profile_resultStandardScheme getScheme() { return new start_heap_profile_resultStandardScheme(); } } private static class start_heap_profile_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<start_heap_profile_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, start_heap_profile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, start_heap_profile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class start_heap_profile_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_heap_profile_resultTupleScheme getScheme() { return new start_heap_profile_resultTupleScheme(); } } private static class start_heap_profile_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<start_heap_profile_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, start_heap_profile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, start_heap_profile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class stop_heap_profile_args implements org.apache.thrift.TBase<stop_heap_profile_args, stop_heap_profile_args._Fields>, java.io.Serializable, Cloneable, Comparable<stop_heap_profile_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stop_heap_profile_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new stop_heap_profile_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new stop_heap_profile_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stop_heap_profile_args.class, metaDataMap); } public stop_heap_profile_args() { } public stop_heap_profile_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public stop_heap_profile_args(stop_heap_profile_args other) { if (other.isSetSession()) { this.session = other.session; } } public stop_heap_profile_args deepCopy() { return new stop_heap_profile_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public stop_heap_profile_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof stop_heap_profile_args) return this.equals((stop_heap_profile_args)that); return false; } public boolean equals(stop_heap_profile_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(stop_heap_profile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("stop_heap_profile_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class stop_heap_profile_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public stop_heap_profile_argsStandardScheme getScheme() { return new stop_heap_profile_argsStandardScheme(); } } private static class stop_heap_profile_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<stop_heap_profile_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, stop_heap_profile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, stop_heap_profile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class stop_heap_profile_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public stop_heap_profile_argsTupleScheme getScheme() { return new stop_heap_profile_argsTupleScheme(); } } private static class stop_heap_profile_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<stop_heap_profile_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, stop_heap_profile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, stop_heap_profile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class stop_heap_profile_result implements org.apache.thrift.TBase<stop_heap_profile_result, stop_heap_profile_result._Fields>, java.io.Serializable, Cloneable, Comparable<stop_heap_profile_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stop_heap_profile_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new stop_heap_profile_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new stop_heap_profile_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stop_heap_profile_result.class, metaDataMap); } public stop_heap_profile_result() { } public stop_heap_profile_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public stop_heap_profile_result(stop_heap_profile_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public stop_heap_profile_result deepCopy() { return new stop_heap_profile_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public stop_heap_profile_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof stop_heap_profile_result) return this.equals((stop_heap_profile_result)that); return false; } public boolean equals(stop_heap_profile_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(stop_heap_profile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("stop_heap_profile_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class stop_heap_profile_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public stop_heap_profile_resultStandardScheme getScheme() { return new stop_heap_profile_resultStandardScheme(); } } private static class stop_heap_profile_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<stop_heap_profile_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, stop_heap_profile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, stop_heap_profile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class stop_heap_profile_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public stop_heap_profile_resultTupleScheme getScheme() { return new stop_heap_profile_resultTupleScheme(); } } private static class stop_heap_profile_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<stop_heap_profile_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, stop_heap_profile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, stop_heap_profile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_heap_profile_args implements org.apache.thrift.TBase<get_heap_profile_args, get_heap_profile_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_heap_profile_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_heap_profile_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_heap_profile_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_heap_profile_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_heap_profile_args.class, metaDataMap); } public get_heap_profile_args() { } public get_heap_profile_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_heap_profile_args(get_heap_profile_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_heap_profile_args deepCopy() { return new get_heap_profile_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_heap_profile_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_heap_profile_args) return this.equals((get_heap_profile_args)that); return false; } public boolean equals(get_heap_profile_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_heap_profile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_heap_profile_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_heap_profile_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_heap_profile_argsStandardScheme getScheme() { return new get_heap_profile_argsStandardScheme(); } } private static class get_heap_profile_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_heap_profile_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_heap_profile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_heap_profile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_heap_profile_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_heap_profile_argsTupleScheme getScheme() { return new get_heap_profile_argsTupleScheme(); } } private static class get_heap_profile_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_heap_profile_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_heap_profile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_heap_profile_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_heap_profile_result implements org.apache.thrift.TBase<get_heap_profile_result, get_heap_profile_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_heap_profile_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_heap_profile_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_heap_profile_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_heap_profile_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_heap_profile_result.class, metaDataMap); } public get_heap_profile_result() { } public get_heap_profile_result( java.lang.String success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_heap_profile_result(get_heap_profile_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_heap_profile_result deepCopy() { return new get_heap_profile_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public get_heap_profile_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_heap_profile_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_heap_profile_result) return this.equals((get_heap_profile_result)that); return false; } public boolean equals(get_heap_profile_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_heap_profile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_heap_profile_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_heap_profile_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_heap_profile_resultStandardScheme getScheme() { return new get_heap_profile_resultStandardScheme(); } } private static class get_heap_profile_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_heap_profile_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_heap_profile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_heap_profile_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_heap_profile_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_heap_profile_resultTupleScheme getScheme() { return new get_heap_profile_resultTupleScheme(); } } private static class get_heap_profile_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_heap_profile_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_heap_profile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_heap_profile_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_memory_args implements org.apache.thrift.TBase<get_memory_args, get_memory_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_memory_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_memory_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField MEMORY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("memory_level", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_memory_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_memory_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String memory_level; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), MEMORY_LEVEL((short)2, "memory_level"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // MEMORY_LEVEL return MEMORY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.MEMORY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("memory_level", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_memory_args.class, metaDataMap); } public get_memory_args() { } public get_memory_args( java.lang.String session, java.lang.String memory_level) { this(); this.session = session; this.memory_level = memory_level; } /** * Performs a deep copy on <i>other</i>. */ public get_memory_args(get_memory_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetMemory_level()) { this.memory_level = other.memory_level; } } public get_memory_args deepCopy() { return new get_memory_args(this); } @Override public void clear() { this.session = null; this.memory_level = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_memory_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getMemory_level() { return this.memory_level; } public get_memory_args setMemory_level(@org.apache.thrift.annotation.Nullable java.lang.String memory_level) { this.memory_level = memory_level; return this; } public void unsetMemory_level() { this.memory_level = null; } /** Returns true if field memory_level is set (has been assigned a value) and false otherwise */ public boolean isSetMemory_level() { return this.memory_level != null; } public void setMemory_levelIsSet(boolean value) { if (!value) { this.memory_level = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case MEMORY_LEVEL: if (value == null) { unsetMemory_level(); } else { setMemory_level((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case MEMORY_LEVEL: return getMemory_level(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case MEMORY_LEVEL: return isSetMemory_level(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_memory_args) return this.equals((get_memory_args)that); return false; } public boolean equals(get_memory_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_memory_level = true && this.isSetMemory_level(); boolean that_present_memory_level = true && that.isSetMemory_level(); if (this_present_memory_level || that_present_memory_level) { if (!(this_present_memory_level && that_present_memory_level)) return false; if (!this.memory_level.equals(that.memory_level)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetMemory_level()) ? 131071 : 524287); if (isSetMemory_level()) hashCode = hashCode * 8191 + memory_level.hashCode(); return hashCode; } @Override public int compareTo(get_memory_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetMemory_level(), other.isSetMemory_level()); if (lastComparison != 0) { return lastComparison; } if (isSetMemory_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memory_level, other.memory_level); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_memory_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("memory_level:"); if (this.memory_level == null) { sb.append("null"); } else { sb.append(this.memory_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_memory_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_memory_argsStandardScheme getScheme() { return new get_memory_argsStandardScheme(); } } private static class get_memory_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_memory_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_memory_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // MEMORY_LEVEL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.memory_level = iprot.readString(); struct.setMemory_levelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_memory_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.memory_level != null) { oprot.writeFieldBegin(MEMORY_LEVEL_FIELD_DESC); oprot.writeString(struct.memory_level); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_memory_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_memory_argsTupleScheme getScheme() { return new get_memory_argsTupleScheme(); } } private static class get_memory_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_memory_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_memory_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetMemory_level()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetMemory_level()) { oprot.writeString(struct.memory_level); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_memory_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.memory_level = iprot.readString(); struct.setMemory_levelIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_memory_result implements org.apache.thrift.TBase<get_memory_result, get_memory_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_memory_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_memory_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_memory_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_memory_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TNodeMemoryInfo> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNodeMemoryInfo.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_memory_result.class, metaDataMap); } public get_memory_result() { } public get_memory_result( java.util.List<TNodeMemoryInfo> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_memory_result(get_memory_result other) { if (other.isSetSuccess()) { java.util.List<TNodeMemoryInfo> __this__success = new java.util.ArrayList<TNodeMemoryInfo>(other.success.size()); for (TNodeMemoryInfo other_element : other.success) { __this__success.add(new TNodeMemoryInfo(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_memory_result deepCopy() { return new get_memory_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TNodeMemoryInfo> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TNodeMemoryInfo elem) { if (this.success == null) { this.success = new java.util.ArrayList<TNodeMemoryInfo>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TNodeMemoryInfo> getSuccess() { return this.success; } public get_memory_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TNodeMemoryInfo> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_memory_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TNodeMemoryInfo>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_memory_result) return this.equals((get_memory_result)that); return false; } public boolean equals(get_memory_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_memory_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_memory_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_memory_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_memory_resultStandardScheme getScheme() { return new get_memory_resultStandardScheme(); } } private static class get_memory_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_memory_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_memory_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list378 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TNodeMemoryInfo>(_list378.size); @org.apache.thrift.annotation.Nullable TNodeMemoryInfo _elem379; for (int _i380 = 0; _i380 < _list378.size; ++_i380) { _elem379 = new TNodeMemoryInfo(); _elem379.read(iprot); struct.success.add(_elem379); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_memory_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TNodeMemoryInfo _iter381 : struct.success) { _iter381.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_memory_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_memory_resultTupleScheme getScheme() { return new get_memory_resultTupleScheme(); } } private static class get_memory_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_memory_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_memory_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TNodeMemoryInfo _iter382 : struct.success) { _iter382.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_memory_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list383 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TNodeMemoryInfo>(_list383.size); @org.apache.thrift.annotation.Nullable TNodeMemoryInfo _elem384; for (int _i385 = 0; _i385 < _list383.size; ++_i385) { _elem384 = new TNodeMemoryInfo(); _elem384.read(iprot); struct.success.add(_elem384); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class clear_cpu_memory_args implements org.apache.thrift.TBase<clear_cpu_memory_args, clear_cpu_memory_args._Fields>, java.io.Serializable, Cloneable, Comparable<clear_cpu_memory_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clear_cpu_memory_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new clear_cpu_memory_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new clear_cpu_memory_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clear_cpu_memory_args.class, metaDataMap); } public clear_cpu_memory_args() { } public clear_cpu_memory_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public clear_cpu_memory_args(clear_cpu_memory_args other) { if (other.isSetSession()) { this.session = other.session; } } public clear_cpu_memory_args deepCopy() { return new clear_cpu_memory_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public clear_cpu_memory_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof clear_cpu_memory_args) return this.equals((clear_cpu_memory_args)that); return false; } public boolean equals(clear_cpu_memory_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(clear_cpu_memory_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("clear_cpu_memory_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class clear_cpu_memory_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clear_cpu_memory_argsStandardScheme getScheme() { return new clear_cpu_memory_argsStandardScheme(); } } private static class clear_cpu_memory_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<clear_cpu_memory_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, clear_cpu_memory_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, clear_cpu_memory_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class clear_cpu_memory_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clear_cpu_memory_argsTupleScheme getScheme() { return new clear_cpu_memory_argsTupleScheme(); } } private static class clear_cpu_memory_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<clear_cpu_memory_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, clear_cpu_memory_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, clear_cpu_memory_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class clear_cpu_memory_result implements org.apache.thrift.TBase<clear_cpu_memory_result, clear_cpu_memory_result._Fields>, java.io.Serializable, Cloneable, Comparable<clear_cpu_memory_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clear_cpu_memory_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new clear_cpu_memory_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new clear_cpu_memory_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clear_cpu_memory_result.class, metaDataMap); } public clear_cpu_memory_result() { } public clear_cpu_memory_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public clear_cpu_memory_result(clear_cpu_memory_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public clear_cpu_memory_result deepCopy() { return new clear_cpu_memory_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public clear_cpu_memory_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof clear_cpu_memory_result) return this.equals((clear_cpu_memory_result)that); return false; } public boolean equals(clear_cpu_memory_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(clear_cpu_memory_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("clear_cpu_memory_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class clear_cpu_memory_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clear_cpu_memory_resultStandardScheme getScheme() { return new clear_cpu_memory_resultStandardScheme(); } } private static class clear_cpu_memory_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<clear_cpu_memory_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, clear_cpu_memory_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, clear_cpu_memory_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class clear_cpu_memory_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clear_cpu_memory_resultTupleScheme getScheme() { return new clear_cpu_memory_resultTupleScheme(); } } private static class clear_cpu_memory_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<clear_cpu_memory_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, clear_cpu_memory_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, clear_cpu_memory_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class clear_gpu_memory_args implements org.apache.thrift.TBase<clear_gpu_memory_args, clear_gpu_memory_args._Fields>, java.io.Serializable, Cloneable, Comparable<clear_gpu_memory_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clear_gpu_memory_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new clear_gpu_memory_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new clear_gpu_memory_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clear_gpu_memory_args.class, metaDataMap); } public clear_gpu_memory_args() { } public clear_gpu_memory_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public clear_gpu_memory_args(clear_gpu_memory_args other) { if (other.isSetSession()) { this.session = other.session; } } public clear_gpu_memory_args deepCopy() { return new clear_gpu_memory_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public clear_gpu_memory_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof clear_gpu_memory_args) return this.equals((clear_gpu_memory_args)that); return false; } public boolean equals(clear_gpu_memory_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(clear_gpu_memory_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("clear_gpu_memory_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class clear_gpu_memory_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clear_gpu_memory_argsStandardScheme getScheme() { return new clear_gpu_memory_argsStandardScheme(); } } private static class clear_gpu_memory_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<clear_gpu_memory_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, clear_gpu_memory_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, clear_gpu_memory_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class clear_gpu_memory_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clear_gpu_memory_argsTupleScheme getScheme() { return new clear_gpu_memory_argsTupleScheme(); } } private static class clear_gpu_memory_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<clear_gpu_memory_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, clear_gpu_memory_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, clear_gpu_memory_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class clear_gpu_memory_result implements org.apache.thrift.TBase<clear_gpu_memory_result, clear_gpu_memory_result._Fields>, java.io.Serializable, Cloneable, Comparable<clear_gpu_memory_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clear_gpu_memory_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new clear_gpu_memory_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new clear_gpu_memory_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clear_gpu_memory_result.class, metaDataMap); } public clear_gpu_memory_result() { } public clear_gpu_memory_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public clear_gpu_memory_result(clear_gpu_memory_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public clear_gpu_memory_result deepCopy() { return new clear_gpu_memory_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public clear_gpu_memory_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof clear_gpu_memory_result) return this.equals((clear_gpu_memory_result)that); return false; } public boolean equals(clear_gpu_memory_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(clear_gpu_memory_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("clear_gpu_memory_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class clear_gpu_memory_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clear_gpu_memory_resultStandardScheme getScheme() { return new clear_gpu_memory_resultStandardScheme(); } } private static class clear_gpu_memory_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<clear_gpu_memory_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, clear_gpu_memory_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, clear_gpu_memory_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class clear_gpu_memory_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public clear_gpu_memory_resultTupleScheme getScheme() { return new clear_gpu_memory_resultTupleScheme(); } } private static class clear_gpu_memory_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<clear_gpu_memory_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, clear_gpu_memory_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, clear_gpu_memory_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_cur_session_args implements org.apache.thrift.TBase<set_cur_session_args, set_cur_session_args._Fields>, java.io.Serializable, Cloneable, Comparable<set_cur_session_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_cur_session_args"); private static final org.apache.thrift.protocol.TField PARENT_SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField LEAF_SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("leaf_session", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField START_TIME_STR_FIELD_DESC = new org.apache.thrift.protocol.TField("start_time_str", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField FOR_RUNNING_QUERY_KERNEL_FIELD_DESC = new org.apache.thrift.protocol.TField("for_running_query_kernel", org.apache.thrift.protocol.TType.BOOL, (short)5); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_cur_session_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_cur_session_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String parent_session; // required public @org.apache.thrift.annotation.Nullable java.lang.String leaf_session; // required public @org.apache.thrift.annotation.Nullable java.lang.String start_time_str; // required public @org.apache.thrift.annotation.Nullable java.lang.String label; // required public boolean for_running_query_kernel; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PARENT_SESSION((short)1, "parent_session"), LEAF_SESSION((short)2, "leaf_session"), START_TIME_STR((short)3, "start_time_str"), LABEL((short)4, "label"), FOR_RUNNING_QUERY_KERNEL((short)5, "for_running_query_kernel"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PARENT_SESSION return PARENT_SESSION; case 2: // LEAF_SESSION return LEAF_SESSION; case 3: // START_TIME_STR return START_TIME_STR; case 4: // LABEL return LABEL; case 5: // FOR_RUNNING_QUERY_KERNEL return FOR_RUNNING_QUERY_KERNEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __FOR_RUNNING_QUERY_KERNEL_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PARENT_SESSION, new org.apache.thrift.meta_data.FieldMetaData("parent_session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.LEAF_SESSION, new org.apache.thrift.meta_data.FieldMetaData("leaf_session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.START_TIME_STR, new org.apache.thrift.meta_data.FieldMetaData("start_time_str", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FOR_RUNNING_QUERY_KERNEL, new org.apache.thrift.meta_data.FieldMetaData("for_running_query_kernel", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_cur_session_args.class, metaDataMap); } public set_cur_session_args() { } public set_cur_session_args( java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel) { this(); this.parent_session = parent_session; this.leaf_session = leaf_session; this.start_time_str = start_time_str; this.label = label; this.for_running_query_kernel = for_running_query_kernel; setFor_running_query_kernelIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public set_cur_session_args(set_cur_session_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetParent_session()) { this.parent_session = other.parent_session; } if (other.isSetLeaf_session()) { this.leaf_session = other.leaf_session; } if (other.isSetStart_time_str()) { this.start_time_str = other.start_time_str; } if (other.isSetLabel()) { this.label = other.label; } this.for_running_query_kernel = other.for_running_query_kernel; } public set_cur_session_args deepCopy() { return new set_cur_session_args(this); } @Override public void clear() { this.parent_session = null; this.leaf_session = null; this.start_time_str = null; this.label = null; setFor_running_query_kernelIsSet(false); this.for_running_query_kernel = false; } @org.apache.thrift.annotation.Nullable public java.lang.String getParent_session() { return this.parent_session; } public set_cur_session_args setParent_session(@org.apache.thrift.annotation.Nullable java.lang.String parent_session) { this.parent_session = parent_session; return this; } public void unsetParent_session() { this.parent_session = null; } /** Returns true if field parent_session is set (has been assigned a value) and false otherwise */ public boolean isSetParent_session() { return this.parent_session != null; } public void setParent_sessionIsSet(boolean value) { if (!value) { this.parent_session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLeaf_session() { return this.leaf_session; } public set_cur_session_args setLeaf_session(@org.apache.thrift.annotation.Nullable java.lang.String leaf_session) { this.leaf_session = leaf_session; return this; } public void unsetLeaf_session() { this.leaf_session = null; } /** Returns true if field leaf_session is set (has been assigned a value) and false otherwise */ public boolean isSetLeaf_session() { return this.leaf_session != null; } public void setLeaf_sessionIsSet(boolean value) { if (!value) { this.leaf_session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getStart_time_str() { return this.start_time_str; } public set_cur_session_args setStart_time_str(@org.apache.thrift.annotation.Nullable java.lang.String start_time_str) { this.start_time_str = start_time_str; return this; } public void unsetStart_time_str() { this.start_time_str = null; } /** Returns true if field start_time_str is set (has been assigned a value) and false otherwise */ public boolean isSetStart_time_str() { return this.start_time_str != null; } public void setStart_time_strIsSet(boolean value) { if (!value) { this.start_time_str = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLabel() { return this.label; } public set_cur_session_args setLabel(@org.apache.thrift.annotation.Nullable java.lang.String label) { this.label = label; return this; } public void unsetLabel() { this.label = null; } /** Returns true if field label is set (has been assigned a value) and false otherwise */ public boolean isSetLabel() { return this.label != null; } public void setLabelIsSet(boolean value) { if (!value) { this.label = null; } } public boolean isFor_running_query_kernel() { return this.for_running_query_kernel; } public set_cur_session_args setFor_running_query_kernel(boolean for_running_query_kernel) { this.for_running_query_kernel = for_running_query_kernel; setFor_running_query_kernelIsSet(true); return this; } public void unsetFor_running_query_kernel() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FOR_RUNNING_QUERY_KERNEL_ISSET_ID); } /** Returns true if field for_running_query_kernel is set (has been assigned a value) and false otherwise */ public boolean isSetFor_running_query_kernel() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FOR_RUNNING_QUERY_KERNEL_ISSET_ID); } public void setFor_running_query_kernelIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FOR_RUNNING_QUERY_KERNEL_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PARENT_SESSION: if (value == null) { unsetParent_session(); } else { setParent_session((java.lang.String)value); } break; case LEAF_SESSION: if (value == null) { unsetLeaf_session(); } else { setLeaf_session((java.lang.String)value); } break; case START_TIME_STR: if (value == null) { unsetStart_time_str(); } else { setStart_time_str((java.lang.String)value); } break; case LABEL: if (value == null) { unsetLabel(); } else { setLabel((java.lang.String)value); } break; case FOR_RUNNING_QUERY_KERNEL: if (value == null) { unsetFor_running_query_kernel(); } else { setFor_running_query_kernel((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PARENT_SESSION: return getParent_session(); case LEAF_SESSION: return getLeaf_session(); case START_TIME_STR: return getStart_time_str(); case LABEL: return getLabel(); case FOR_RUNNING_QUERY_KERNEL: return isFor_running_query_kernel(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case PARENT_SESSION: return isSetParent_session(); case LEAF_SESSION: return isSetLeaf_session(); case START_TIME_STR: return isSetStart_time_str(); case LABEL: return isSetLabel(); case FOR_RUNNING_QUERY_KERNEL: return isSetFor_running_query_kernel(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_cur_session_args) return this.equals((set_cur_session_args)that); return false; } public boolean equals(set_cur_session_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_parent_session = true && this.isSetParent_session(); boolean that_present_parent_session = true && that.isSetParent_session(); if (this_present_parent_session || that_present_parent_session) { if (!(this_present_parent_session && that_present_parent_session)) return false; if (!this.parent_session.equals(that.parent_session)) return false; } boolean this_present_leaf_session = true && this.isSetLeaf_session(); boolean that_present_leaf_session = true && that.isSetLeaf_session(); if (this_present_leaf_session || that_present_leaf_session) { if (!(this_present_leaf_session && that_present_leaf_session)) return false; if (!this.leaf_session.equals(that.leaf_session)) return false; } boolean this_present_start_time_str = true && this.isSetStart_time_str(); boolean that_present_start_time_str = true && that.isSetStart_time_str(); if (this_present_start_time_str || that_present_start_time_str) { if (!(this_present_start_time_str && that_present_start_time_str)) return false; if (!this.start_time_str.equals(that.start_time_str)) return false; } boolean this_present_label = true && this.isSetLabel(); boolean that_present_label = true && that.isSetLabel(); if (this_present_label || that_present_label) { if (!(this_present_label && that_present_label)) return false; if (!this.label.equals(that.label)) return false; } boolean this_present_for_running_query_kernel = true; boolean that_present_for_running_query_kernel = true; if (this_present_for_running_query_kernel || that_present_for_running_query_kernel) { if (!(this_present_for_running_query_kernel && that_present_for_running_query_kernel)) return false; if (this.for_running_query_kernel != that.for_running_query_kernel) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetParent_session()) ? 131071 : 524287); if (isSetParent_session()) hashCode = hashCode * 8191 + parent_session.hashCode(); hashCode = hashCode * 8191 + ((isSetLeaf_session()) ? 131071 : 524287); if (isSetLeaf_session()) hashCode = hashCode * 8191 + leaf_session.hashCode(); hashCode = hashCode * 8191 + ((isSetStart_time_str()) ? 131071 : 524287); if (isSetStart_time_str()) hashCode = hashCode * 8191 + start_time_str.hashCode(); hashCode = hashCode * 8191 + ((isSetLabel()) ? 131071 : 524287); if (isSetLabel()) hashCode = hashCode * 8191 + label.hashCode(); hashCode = hashCode * 8191 + ((for_running_query_kernel) ? 131071 : 524287); return hashCode; } @Override public int compareTo(set_cur_session_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetParent_session(), other.isSetParent_session()); if (lastComparison != 0) { return lastComparison; } if (isSetParent_session()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_session, other.parent_session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetLeaf_session(), other.isSetLeaf_session()); if (lastComparison != 0) { return lastComparison; } if (isSetLeaf_session()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leaf_session, other.leaf_session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetStart_time_str(), other.isSetStart_time_str()); if (lastComparison != 0) { return lastComparison; } if (isSetStart_time_str()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_time_str, other.start_time_str); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetLabel(), other.isSetLabel()); if (lastComparison != 0) { return lastComparison; } if (isSetLabel()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFor_running_query_kernel(), other.isSetFor_running_query_kernel()); if (lastComparison != 0) { return lastComparison; } if (isSetFor_running_query_kernel()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.for_running_query_kernel, other.for_running_query_kernel); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_cur_session_args("); boolean first = true; sb.append("parent_session:"); if (this.parent_session == null) { sb.append("null"); } else { sb.append(this.parent_session); } first = false; if (!first) sb.append(", "); sb.append("leaf_session:"); if (this.leaf_session == null) { sb.append("null"); } else { sb.append(this.leaf_session); } first = false; if (!first) sb.append(", "); sb.append("start_time_str:"); if (this.start_time_str == null) { sb.append("null"); } else { sb.append(this.start_time_str); } first = false; if (!first) sb.append(", "); sb.append("label:"); if (this.label == null) { sb.append("null"); } else { sb.append(this.label); } first = false; if (!first) sb.append(", "); sb.append("for_running_query_kernel:"); sb.append(this.for_running_query_kernel); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_cur_session_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_cur_session_argsStandardScheme getScheme() { return new set_cur_session_argsStandardScheme(); } } private static class set_cur_session_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_cur_session_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_cur_session_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PARENT_SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.parent_session = iprot.readString(); struct.setParent_sessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // LEAF_SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.leaf_session = iprot.readString(); struct.setLeaf_sessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // START_TIME_STR if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.start_time_str = iprot.readString(); struct.setStart_time_strIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // LABEL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.label = iprot.readString(); struct.setLabelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // FOR_RUNNING_QUERY_KERNEL if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.for_running_query_kernel = iprot.readBool(); struct.setFor_running_query_kernelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_cur_session_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.parent_session != null) { oprot.writeFieldBegin(PARENT_SESSION_FIELD_DESC); oprot.writeString(struct.parent_session); oprot.writeFieldEnd(); } if (struct.leaf_session != null) { oprot.writeFieldBegin(LEAF_SESSION_FIELD_DESC); oprot.writeString(struct.leaf_session); oprot.writeFieldEnd(); } if (struct.start_time_str != null) { oprot.writeFieldBegin(START_TIME_STR_FIELD_DESC); oprot.writeString(struct.start_time_str); oprot.writeFieldEnd(); } if (struct.label != null) { oprot.writeFieldBegin(LABEL_FIELD_DESC); oprot.writeString(struct.label); oprot.writeFieldEnd(); } oprot.writeFieldBegin(FOR_RUNNING_QUERY_KERNEL_FIELD_DESC); oprot.writeBool(struct.for_running_query_kernel); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_cur_session_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_cur_session_argsTupleScheme getScheme() { return new set_cur_session_argsTupleScheme(); } } private static class set_cur_session_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_cur_session_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_cur_session_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetParent_session()) { optionals.set(0); } if (struct.isSetLeaf_session()) { optionals.set(1); } if (struct.isSetStart_time_str()) { optionals.set(2); } if (struct.isSetLabel()) { optionals.set(3); } if (struct.isSetFor_running_query_kernel()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetParent_session()) { oprot.writeString(struct.parent_session); } if (struct.isSetLeaf_session()) { oprot.writeString(struct.leaf_session); } if (struct.isSetStart_time_str()) { oprot.writeString(struct.start_time_str); } if (struct.isSetLabel()) { oprot.writeString(struct.label); } if (struct.isSetFor_running_query_kernel()) { oprot.writeBool(struct.for_running_query_kernel); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_cur_session_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.parent_session = iprot.readString(); struct.setParent_sessionIsSet(true); } if (incoming.get(1)) { struct.leaf_session = iprot.readString(); struct.setLeaf_sessionIsSet(true); } if (incoming.get(2)) { struct.start_time_str = iprot.readString(); struct.setStart_time_strIsSet(true); } if (incoming.get(3)) { struct.label = iprot.readString(); struct.setLabelIsSet(true); } if (incoming.get(4)) { struct.for_running_query_kernel = iprot.readBool(); struct.setFor_running_query_kernelIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_cur_session_result implements org.apache.thrift.TBase<set_cur_session_result, set_cur_session_result._Fields>, java.io.Serializable, Cloneable, Comparable<set_cur_session_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_cur_session_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_cur_session_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_cur_session_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_cur_session_result.class, metaDataMap); } public set_cur_session_result() { } public set_cur_session_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public set_cur_session_result(set_cur_session_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public set_cur_session_result deepCopy() { return new set_cur_session_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public set_cur_session_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_cur_session_result) return this.equals((set_cur_session_result)that); return false; } public boolean equals(set_cur_session_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(set_cur_session_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_cur_session_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_cur_session_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_cur_session_resultStandardScheme getScheme() { return new set_cur_session_resultStandardScheme(); } } private static class set_cur_session_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_cur_session_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_cur_session_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_cur_session_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_cur_session_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_cur_session_resultTupleScheme getScheme() { return new set_cur_session_resultTupleScheme(); } } private static class set_cur_session_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_cur_session_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_cur_session_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_cur_session_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class invalidate_cur_session_args implements org.apache.thrift.TBase<invalidate_cur_session_args, invalidate_cur_session_args._Fields>, java.io.Serializable, Cloneable, Comparable<invalidate_cur_session_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidate_cur_session_args"); private static final org.apache.thrift.protocol.TField PARENT_SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField LEAF_SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("leaf_session", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField START_TIME_STR_FIELD_DESC = new org.apache.thrift.protocol.TField("start_time_str", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField FOR_RUNNING_QUERY_KERNEL_FIELD_DESC = new org.apache.thrift.protocol.TField("for_running_query_kernel", org.apache.thrift.protocol.TType.BOOL, (short)5); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new invalidate_cur_session_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new invalidate_cur_session_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String parent_session; // required public @org.apache.thrift.annotation.Nullable java.lang.String leaf_session; // required public @org.apache.thrift.annotation.Nullable java.lang.String start_time_str; // required public @org.apache.thrift.annotation.Nullable java.lang.String label; // required public boolean for_running_query_kernel; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PARENT_SESSION((short)1, "parent_session"), LEAF_SESSION((short)2, "leaf_session"), START_TIME_STR((short)3, "start_time_str"), LABEL((short)4, "label"), FOR_RUNNING_QUERY_KERNEL((short)5, "for_running_query_kernel"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PARENT_SESSION return PARENT_SESSION; case 2: // LEAF_SESSION return LEAF_SESSION; case 3: // START_TIME_STR return START_TIME_STR; case 4: // LABEL return LABEL; case 5: // FOR_RUNNING_QUERY_KERNEL return FOR_RUNNING_QUERY_KERNEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __FOR_RUNNING_QUERY_KERNEL_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PARENT_SESSION, new org.apache.thrift.meta_data.FieldMetaData("parent_session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.LEAF_SESSION, new org.apache.thrift.meta_data.FieldMetaData("leaf_session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.START_TIME_STR, new org.apache.thrift.meta_data.FieldMetaData("start_time_str", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FOR_RUNNING_QUERY_KERNEL, new org.apache.thrift.meta_data.FieldMetaData("for_running_query_kernel", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidate_cur_session_args.class, metaDataMap); } public invalidate_cur_session_args() { } public invalidate_cur_session_args( java.lang.String parent_session, java.lang.String leaf_session, java.lang.String start_time_str, java.lang.String label, boolean for_running_query_kernel) { this(); this.parent_session = parent_session; this.leaf_session = leaf_session; this.start_time_str = start_time_str; this.label = label; this.for_running_query_kernel = for_running_query_kernel; setFor_running_query_kernelIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public invalidate_cur_session_args(invalidate_cur_session_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetParent_session()) { this.parent_session = other.parent_session; } if (other.isSetLeaf_session()) { this.leaf_session = other.leaf_session; } if (other.isSetStart_time_str()) { this.start_time_str = other.start_time_str; } if (other.isSetLabel()) { this.label = other.label; } this.for_running_query_kernel = other.for_running_query_kernel; } public invalidate_cur_session_args deepCopy() { return new invalidate_cur_session_args(this); } @Override public void clear() { this.parent_session = null; this.leaf_session = null; this.start_time_str = null; this.label = null; setFor_running_query_kernelIsSet(false); this.for_running_query_kernel = false; } @org.apache.thrift.annotation.Nullable public java.lang.String getParent_session() { return this.parent_session; } public invalidate_cur_session_args setParent_session(@org.apache.thrift.annotation.Nullable java.lang.String parent_session) { this.parent_session = parent_session; return this; } public void unsetParent_session() { this.parent_session = null; } /** Returns true if field parent_session is set (has been assigned a value) and false otherwise */ public boolean isSetParent_session() { return this.parent_session != null; } public void setParent_sessionIsSet(boolean value) { if (!value) { this.parent_session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLeaf_session() { return this.leaf_session; } public invalidate_cur_session_args setLeaf_session(@org.apache.thrift.annotation.Nullable java.lang.String leaf_session) { this.leaf_session = leaf_session; return this; } public void unsetLeaf_session() { this.leaf_session = null; } /** Returns true if field leaf_session is set (has been assigned a value) and false otherwise */ public boolean isSetLeaf_session() { return this.leaf_session != null; } public void setLeaf_sessionIsSet(boolean value) { if (!value) { this.leaf_session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getStart_time_str() { return this.start_time_str; } public invalidate_cur_session_args setStart_time_str(@org.apache.thrift.annotation.Nullable java.lang.String start_time_str) { this.start_time_str = start_time_str; return this; } public void unsetStart_time_str() { this.start_time_str = null; } /** Returns true if field start_time_str is set (has been assigned a value) and false otherwise */ public boolean isSetStart_time_str() { return this.start_time_str != null; } public void setStart_time_strIsSet(boolean value) { if (!value) { this.start_time_str = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLabel() { return this.label; } public invalidate_cur_session_args setLabel(@org.apache.thrift.annotation.Nullable java.lang.String label) { this.label = label; return this; } public void unsetLabel() { this.label = null; } /** Returns true if field label is set (has been assigned a value) and false otherwise */ public boolean isSetLabel() { return this.label != null; } public void setLabelIsSet(boolean value) { if (!value) { this.label = null; } } public boolean isFor_running_query_kernel() { return this.for_running_query_kernel; } public invalidate_cur_session_args setFor_running_query_kernel(boolean for_running_query_kernel) { this.for_running_query_kernel = for_running_query_kernel; setFor_running_query_kernelIsSet(true); return this; } public void unsetFor_running_query_kernel() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FOR_RUNNING_QUERY_KERNEL_ISSET_ID); } /** Returns true if field for_running_query_kernel is set (has been assigned a value) and false otherwise */ public boolean isSetFor_running_query_kernel() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FOR_RUNNING_QUERY_KERNEL_ISSET_ID); } public void setFor_running_query_kernelIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FOR_RUNNING_QUERY_KERNEL_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PARENT_SESSION: if (value == null) { unsetParent_session(); } else { setParent_session((java.lang.String)value); } break; case LEAF_SESSION: if (value == null) { unsetLeaf_session(); } else { setLeaf_session((java.lang.String)value); } break; case START_TIME_STR: if (value == null) { unsetStart_time_str(); } else { setStart_time_str((java.lang.String)value); } break; case LABEL: if (value == null) { unsetLabel(); } else { setLabel((java.lang.String)value); } break; case FOR_RUNNING_QUERY_KERNEL: if (value == null) { unsetFor_running_query_kernel(); } else { setFor_running_query_kernel((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PARENT_SESSION: return getParent_session(); case LEAF_SESSION: return getLeaf_session(); case START_TIME_STR: return getStart_time_str(); case LABEL: return getLabel(); case FOR_RUNNING_QUERY_KERNEL: return isFor_running_query_kernel(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case PARENT_SESSION: return isSetParent_session(); case LEAF_SESSION: return isSetLeaf_session(); case START_TIME_STR: return isSetStart_time_str(); case LABEL: return isSetLabel(); case FOR_RUNNING_QUERY_KERNEL: return isSetFor_running_query_kernel(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof invalidate_cur_session_args) return this.equals((invalidate_cur_session_args)that); return false; } public boolean equals(invalidate_cur_session_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_parent_session = true && this.isSetParent_session(); boolean that_present_parent_session = true && that.isSetParent_session(); if (this_present_parent_session || that_present_parent_session) { if (!(this_present_parent_session && that_present_parent_session)) return false; if (!this.parent_session.equals(that.parent_session)) return false; } boolean this_present_leaf_session = true && this.isSetLeaf_session(); boolean that_present_leaf_session = true && that.isSetLeaf_session(); if (this_present_leaf_session || that_present_leaf_session) { if (!(this_present_leaf_session && that_present_leaf_session)) return false; if (!this.leaf_session.equals(that.leaf_session)) return false; } boolean this_present_start_time_str = true && this.isSetStart_time_str(); boolean that_present_start_time_str = true && that.isSetStart_time_str(); if (this_present_start_time_str || that_present_start_time_str) { if (!(this_present_start_time_str && that_present_start_time_str)) return false; if (!this.start_time_str.equals(that.start_time_str)) return false; } boolean this_present_label = true && this.isSetLabel(); boolean that_present_label = true && that.isSetLabel(); if (this_present_label || that_present_label) { if (!(this_present_label && that_present_label)) return false; if (!this.label.equals(that.label)) return false; } boolean this_present_for_running_query_kernel = true; boolean that_present_for_running_query_kernel = true; if (this_present_for_running_query_kernel || that_present_for_running_query_kernel) { if (!(this_present_for_running_query_kernel && that_present_for_running_query_kernel)) return false; if (this.for_running_query_kernel != that.for_running_query_kernel) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetParent_session()) ? 131071 : 524287); if (isSetParent_session()) hashCode = hashCode * 8191 + parent_session.hashCode(); hashCode = hashCode * 8191 + ((isSetLeaf_session()) ? 131071 : 524287); if (isSetLeaf_session()) hashCode = hashCode * 8191 + leaf_session.hashCode(); hashCode = hashCode * 8191 + ((isSetStart_time_str()) ? 131071 : 524287); if (isSetStart_time_str()) hashCode = hashCode * 8191 + start_time_str.hashCode(); hashCode = hashCode * 8191 + ((isSetLabel()) ? 131071 : 524287); if (isSetLabel()) hashCode = hashCode * 8191 + label.hashCode(); hashCode = hashCode * 8191 + ((for_running_query_kernel) ? 131071 : 524287); return hashCode; } @Override public int compareTo(invalidate_cur_session_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetParent_session(), other.isSetParent_session()); if (lastComparison != 0) { return lastComparison; } if (isSetParent_session()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_session, other.parent_session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetLeaf_session(), other.isSetLeaf_session()); if (lastComparison != 0) { return lastComparison; } if (isSetLeaf_session()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leaf_session, other.leaf_session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetStart_time_str(), other.isSetStart_time_str()); if (lastComparison != 0) { return lastComparison; } if (isSetStart_time_str()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_time_str, other.start_time_str); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetLabel(), other.isSetLabel()); if (lastComparison != 0) { return lastComparison; } if (isSetLabel()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFor_running_query_kernel(), other.isSetFor_running_query_kernel()); if (lastComparison != 0) { return lastComparison; } if (isSetFor_running_query_kernel()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.for_running_query_kernel, other.for_running_query_kernel); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("invalidate_cur_session_args("); boolean first = true; sb.append("parent_session:"); if (this.parent_session == null) { sb.append("null"); } else { sb.append(this.parent_session); } first = false; if (!first) sb.append(", "); sb.append("leaf_session:"); if (this.leaf_session == null) { sb.append("null"); } else { sb.append(this.leaf_session); } first = false; if (!first) sb.append(", "); sb.append("start_time_str:"); if (this.start_time_str == null) { sb.append("null"); } else { sb.append(this.start_time_str); } first = false; if (!first) sb.append(", "); sb.append("label:"); if (this.label == null) { sb.append("null"); } else { sb.append(this.label); } first = false; if (!first) sb.append(", "); sb.append("for_running_query_kernel:"); sb.append(this.for_running_query_kernel); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class invalidate_cur_session_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public invalidate_cur_session_argsStandardScheme getScheme() { return new invalidate_cur_session_argsStandardScheme(); } } private static class invalidate_cur_session_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<invalidate_cur_session_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, invalidate_cur_session_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PARENT_SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.parent_session = iprot.readString(); struct.setParent_sessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // LEAF_SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.leaf_session = iprot.readString(); struct.setLeaf_sessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // START_TIME_STR if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.start_time_str = iprot.readString(); struct.setStart_time_strIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // LABEL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.label = iprot.readString(); struct.setLabelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // FOR_RUNNING_QUERY_KERNEL if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.for_running_query_kernel = iprot.readBool(); struct.setFor_running_query_kernelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, invalidate_cur_session_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.parent_session != null) { oprot.writeFieldBegin(PARENT_SESSION_FIELD_DESC); oprot.writeString(struct.parent_session); oprot.writeFieldEnd(); } if (struct.leaf_session != null) { oprot.writeFieldBegin(LEAF_SESSION_FIELD_DESC); oprot.writeString(struct.leaf_session); oprot.writeFieldEnd(); } if (struct.start_time_str != null) { oprot.writeFieldBegin(START_TIME_STR_FIELD_DESC); oprot.writeString(struct.start_time_str); oprot.writeFieldEnd(); } if (struct.label != null) { oprot.writeFieldBegin(LABEL_FIELD_DESC); oprot.writeString(struct.label); oprot.writeFieldEnd(); } oprot.writeFieldBegin(FOR_RUNNING_QUERY_KERNEL_FIELD_DESC); oprot.writeBool(struct.for_running_query_kernel); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class invalidate_cur_session_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public invalidate_cur_session_argsTupleScheme getScheme() { return new invalidate_cur_session_argsTupleScheme(); } } private static class invalidate_cur_session_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<invalidate_cur_session_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, invalidate_cur_session_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetParent_session()) { optionals.set(0); } if (struct.isSetLeaf_session()) { optionals.set(1); } if (struct.isSetStart_time_str()) { optionals.set(2); } if (struct.isSetLabel()) { optionals.set(3); } if (struct.isSetFor_running_query_kernel()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetParent_session()) { oprot.writeString(struct.parent_session); } if (struct.isSetLeaf_session()) { oprot.writeString(struct.leaf_session); } if (struct.isSetStart_time_str()) { oprot.writeString(struct.start_time_str); } if (struct.isSetLabel()) { oprot.writeString(struct.label); } if (struct.isSetFor_running_query_kernel()) { oprot.writeBool(struct.for_running_query_kernel); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, invalidate_cur_session_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.parent_session = iprot.readString(); struct.setParent_sessionIsSet(true); } if (incoming.get(1)) { struct.leaf_session = iprot.readString(); struct.setLeaf_sessionIsSet(true); } if (incoming.get(2)) { struct.start_time_str = iprot.readString(); struct.setStart_time_strIsSet(true); } if (incoming.get(3)) { struct.label = iprot.readString(); struct.setLabelIsSet(true); } if (incoming.get(4)) { struct.for_running_query_kernel = iprot.readBool(); struct.setFor_running_query_kernelIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class invalidate_cur_session_result implements org.apache.thrift.TBase<invalidate_cur_session_result, invalidate_cur_session_result._Fields>, java.io.Serializable, Cloneable, Comparable<invalidate_cur_session_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidate_cur_session_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new invalidate_cur_session_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new invalidate_cur_session_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidate_cur_session_result.class, metaDataMap); } public invalidate_cur_session_result() { } public invalidate_cur_session_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public invalidate_cur_session_result(invalidate_cur_session_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public invalidate_cur_session_result deepCopy() { return new invalidate_cur_session_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public invalidate_cur_session_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof invalidate_cur_session_result) return this.equals((invalidate_cur_session_result)that); return false; } public boolean equals(invalidate_cur_session_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(invalidate_cur_session_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("invalidate_cur_session_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class invalidate_cur_session_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public invalidate_cur_session_resultStandardScheme getScheme() { return new invalidate_cur_session_resultStandardScheme(); } } private static class invalidate_cur_session_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<invalidate_cur_session_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, invalidate_cur_session_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, invalidate_cur_session_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class invalidate_cur_session_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public invalidate_cur_session_resultTupleScheme getScheme() { return new invalidate_cur_session_resultTupleScheme(); } } private static class invalidate_cur_session_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<invalidate_cur_session_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, invalidate_cur_session_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, invalidate_cur_session_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_table_epoch_args implements org.apache.thrift.TBase<set_table_epoch_args, set_table_epoch_args._Fields>, java.io.Serializable, Cloneable, Comparable<set_table_epoch_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_table_epoch_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("db_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField NEW_EPOCH_FIELD_DESC = new org.apache.thrift.protocol.TField("new_epoch", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_table_epoch_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_table_epoch_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int db_id; // required public int table_id; // required public int new_epoch; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DB_ID((short)2, "db_id"), TABLE_ID((short)3, "table_id"), NEW_EPOCH((short)4, "new_epoch"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DB_ID return DB_ID; case 3: // TABLE_ID return TABLE_ID; case 4: // NEW_EPOCH return NEW_EPOCH; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DB_ID_ISSET_ID = 0; private static final int __TABLE_ID_ISSET_ID = 1; private static final int __NEW_EPOCH_ISSET_ID = 2; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DB_ID, new org.apache.thrift.meta_data.FieldMetaData("db_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.NEW_EPOCH, new org.apache.thrift.meta_data.FieldMetaData("new_epoch", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_table_epoch_args.class, metaDataMap); } public set_table_epoch_args() { } public set_table_epoch_args( java.lang.String session, int db_id, int table_id, int new_epoch) { this(); this.session = session; this.db_id = db_id; setDb_idIsSet(true); this.table_id = table_id; setTable_idIsSet(true); this.new_epoch = new_epoch; setNew_epochIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public set_table_epoch_args(set_table_epoch_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.db_id = other.db_id; this.table_id = other.table_id; this.new_epoch = other.new_epoch; } public set_table_epoch_args deepCopy() { return new set_table_epoch_args(this); } @Override public void clear() { this.session = null; setDb_idIsSet(false); this.db_id = 0; setTable_idIsSet(false); this.table_id = 0; setNew_epochIsSet(false); this.new_epoch = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public set_table_epoch_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDb_id() { return this.db_id; } public set_table_epoch_args setDb_id(int db_id) { this.db_id = db_id; setDb_idIsSet(true); return this; } public void unsetDb_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DB_ID_ISSET_ID); } /** Returns true if field db_id is set (has been assigned a value) and false otherwise */ public boolean isSetDb_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DB_ID_ISSET_ID); } public void setDb_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DB_ID_ISSET_ID, value); } public int getTable_id() { return this.table_id; } public set_table_epoch_args setTable_id(int table_id) { this.table_id = table_id; setTable_idIsSet(true); return this; } public void unsetTable_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } /** Returns true if field table_id is set (has been assigned a value) and false otherwise */ public boolean isSetTable_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } public void setTable_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLE_ID_ISSET_ID, value); } public int getNew_epoch() { return this.new_epoch; } public set_table_epoch_args setNew_epoch(int new_epoch) { this.new_epoch = new_epoch; setNew_epochIsSet(true); return this; } public void unsetNew_epoch() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NEW_EPOCH_ISSET_ID); } /** Returns true if field new_epoch is set (has been assigned a value) and false otherwise */ public boolean isSetNew_epoch() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NEW_EPOCH_ISSET_ID); } public void setNew_epochIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NEW_EPOCH_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DB_ID: if (value == null) { unsetDb_id(); } else { setDb_id((java.lang.Integer)value); } break; case TABLE_ID: if (value == null) { unsetTable_id(); } else { setTable_id((java.lang.Integer)value); } break; case NEW_EPOCH: if (value == null) { unsetNew_epoch(); } else { setNew_epoch((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DB_ID: return getDb_id(); case TABLE_ID: return getTable_id(); case NEW_EPOCH: return getNew_epoch(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DB_ID: return isSetDb_id(); case TABLE_ID: return isSetTable_id(); case NEW_EPOCH: return isSetNew_epoch(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_table_epoch_args) return this.equals((set_table_epoch_args)that); return false; } public boolean equals(set_table_epoch_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_db_id = true; boolean that_present_db_id = true; if (this_present_db_id || that_present_db_id) { if (!(this_present_db_id && that_present_db_id)) return false; if (this.db_id != that.db_id) return false; } boolean this_present_table_id = true; boolean that_present_table_id = true; if (this_present_table_id || that_present_table_id) { if (!(this_present_table_id && that_present_table_id)) return false; if (this.table_id != that.table_id) return false; } boolean this_present_new_epoch = true; boolean that_present_new_epoch = true; if (this_present_new_epoch || that_present_new_epoch) { if (!(this_present_new_epoch && that_present_new_epoch)) return false; if (this.new_epoch != that.new_epoch) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + db_id; hashCode = hashCode * 8191 + table_id; hashCode = hashCode * 8191 + new_epoch; return hashCode; } @Override public int compareTo(set_table_epoch_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDb_id(), other.isSetDb_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_id, other.db_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_id(), other.isSetTable_id()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_id, other.table_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNew_epoch(), other.isSetNew_epoch()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_epoch()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_epoch, other.new_epoch); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_table_epoch_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("db_id:"); sb.append(this.db_id); first = false; if (!first) sb.append(", "); sb.append("table_id:"); sb.append(this.table_id); first = false; if (!first) sb.append(", "); sb.append("new_epoch:"); sb.append(this.new_epoch); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_table_epoch_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epoch_argsStandardScheme getScheme() { return new set_table_epoch_argsStandardScheme(); } } private static class set_table_epoch_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_table_epoch_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_table_epoch_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DB_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.db_id = iprot.readI32(); struct.setDb_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TABLE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // NEW_EPOCH if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.new_epoch = iprot.readI32(); struct.setNew_epochIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_table_epoch_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DB_ID_FIELD_DESC); oprot.writeI32(struct.db_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(TABLE_ID_FIELD_DESC); oprot.writeI32(struct.table_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(NEW_EPOCH_FIELD_DESC); oprot.writeI32(struct.new_epoch); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_table_epoch_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epoch_argsTupleScheme getScheme() { return new set_table_epoch_argsTupleScheme(); } } private static class set_table_epoch_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_table_epoch_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_table_epoch_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDb_id()) { optionals.set(1); } if (struct.isSetTable_id()) { optionals.set(2); } if (struct.isSetNew_epoch()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDb_id()) { oprot.writeI32(struct.db_id); } if (struct.isSetTable_id()) { oprot.writeI32(struct.table_id); } if (struct.isSetNew_epoch()) { oprot.writeI32(struct.new_epoch); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_table_epoch_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.db_id = iprot.readI32(); struct.setDb_idIsSet(true); } if (incoming.get(2)) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } if (incoming.get(3)) { struct.new_epoch = iprot.readI32(); struct.setNew_epochIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_table_epoch_result implements org.apache.thrift.TBase<set_table_epoch_result, set_table_epoch_result._Fields>, java.io.Serializable, Cloneable, Comparable<set_table_epoch_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_table_epoch_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_table_epoch_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_table_epoch_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_table_epoch_result.class, metaDataMap); } public set_table_epoch_result() { } public set_table_epoch_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public set_table_epoch_result(set_table_epoch_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public set_table_epoch_result deepCopy() { return new set_table_epoch_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public set_table_epoch_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_table_epoch_result) return this.equals((set_table_epoch_result)that); return false; } public boolean equals(set_table_epoch_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(set_table_epoch_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_table_epoch_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_table_epoch_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epoch_resultStandardScheme getScheme() { return new set_table_epoch_resultStandardScheme(); } } private static class set_table_epoch_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_table_epoch_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_table_epoch_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_table_epoch_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_table_epoch_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epoch_resultTupleScheme getScheme() { return new set_table_epoch_resultTupleScheme(); } } private static class set_table_epoch_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_table_epoch_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_table_epoch_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_table_epoch_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_table_epoch_by_name_args implements org.apache.thrift.TBase<set_table_epoch_by_name_args, set_table_epoch_by_name_args._Fields>, java.io.Serializable, Cloneable, Comparable<set_table_epoch_by_name_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_table_epoch_by_name_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_EPOCH_FIELD_DESC = new org.apache.thrift.protocol.TField("new_epoch", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_table_epoch_by_name_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_table_epoch_by_name_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public int new_epoch; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), NEW_EPOCH((short)3, "new_epoch"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // NEW_EPOCH return NEW_EPOCH; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __NEW_EPOCH_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEW_EPOCH, new org.apache.thrift.meta_data.FieldMetaData("new_epoch", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_table_epoch_by_name_args.class, metaDataMap); } public set_table_epoch_by_name_args() { } public set_table_epoch_by_name_args( java.lang.String session, java.lang.String table_name, int new_epoch) { this(); this.session = session; this.table_name = table_name; this.new_epoch = new_epoch; setNew_epochIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public set_table_epoch_by_name_args(set_table_epoch_by_name_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } this.new_epoch = other.new_epoch; } public set_table_epoch_by_name_args deepCopy() { return new set_table_epoch_by_name_args(this); } @Override public void clear() { this.session = null; this.table_name = null; setNew_epochIsSet(false); this.new_epoch = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public set_table_epoch_by_name_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public set_table_epoch_by_name_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public int getNew_epoch() { return this.new_epoch; } public set_table_epoch_by_name_args setNew_epoch(int new_epoch) { this.new_epoch = new_epoch; setNew_epochIsSet(true); return this; } public void unsetNew_epoch() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NEW_EPOCH_ISSET_ID); } /** Returns true if field new_epoch is set (has been assigned a value) and false otherwise */ public boolean isSetNew_epoch() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NEW_EPOCH_ISSET_ID); } public void setNew_epochIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NEW_EPOCH_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case NEW_EPOCH: if (value == null) { unsetNew_epoch(); } else { setNew_epoch((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case NEW_EPOCH: return getNew_epoch(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case NEW_EPOCH: return isSetNew_epoch(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_table_epoch_by_name_args) return this.equals((set_table_epoch_by_name_args)that); return false; } public boolean equals(set_table_epoch_by_name_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_new_epoch = true; boolean that_present_new_epoch = true; if (this_present_new_epoch || that_present_new_epoch) { if (!(this_present_new_epoch && that_present_new_epoch)) return false; if (this.new_epoch != that.new_epoch) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + new_epoch; return hashCode; } @Override public int compareTo(set_table_epoch_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNew_epoch(), other.isSetNew_epoch()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_epoch()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_epoch, other.new_epoch); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_table_epoch_by_name_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("new_epoch:"); sb.append(this.new_epoch); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_table_epoch_by_name_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epoch_by_name_argsStandardScheme getScheme() { return new set_table_epoch_by_name_argsStandardScheme(); } } private static class set_table_epoch_by_name_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_table_epoch_by_name_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_table_epoch_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NEW_EPOCH if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.new_epoch = iprot.readI32(); struct.setNew_epochIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_table_epoch_by_name_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(NEW_EPOCH_FIELD_DESC); oprot.writeI32(struct.new_epoch); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_table_epoch_by_name_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epoch_by_name_argsTupleScheme getScheme() { return new set_table_epoch_by_name_argsTupleScheme(); } } private static class set_table_epoch_by_name_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_table_epoch_by_name_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_table_epoch_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetNew_epoch()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetNew_epoch()) { oprot.writeI32(struct.new_epoch); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_table_epoch_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { struct.new_epoch = iprot.readI32(); struct.setNew_epochIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_table_epoch_by_name_result implements org.apache.thrift.TBase<set_table_epoch_by_name_result, set_table_epoch_by_name_result._Fields>, java.io.Serializable, Cloneable, Comparable<set_table_epoch_by_name_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_table_epoch_by_name_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_table_epoch_by_name_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_table_epoch_by_name_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_table_epoch_by_name_result.class, metaDataMap); } public set_table_epoch_by_name_result() { } public set_table_epoch_by_name_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public set_table_epoch_by_name_result(set_table_epoch_by_name_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public set_table_epoch_by_name_result deepCopy() { return new set_table_epoch_by_name_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public set_table_epoch_by_name_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_table_epoch_by_name_result) return this.equals((set_table_epoch_by_name_result)that); return false; } public boolean equals(set_table_epoch_by_name_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(set_table_epoch_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_table_epoch_by_name_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_table_epoch_by_name_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epoch_by_name_resultStandardScheme getScheme() { return new set_table_epoch_by_name_resultStandardScheme(); } } private static class set_table_epoch_by_name_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_table_epoch_by_name_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_table_epoch_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_table_epoch_by_name_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_table_epoch_by_name_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epoch_by_name_resultTupleScheme getScheme() { return new set_table_epoch_by_name_resultTupleScheme(); } } private static class set_table_epoch_by_name_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_table_epoch_by_name_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_table_epoch_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_table_epoch_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_epoch_args implements org.apache.thrift.TBase<get_table_epoch_args, get_table_epoch_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_epoch_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_epoch_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("db_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_epoch_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_epoch_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int db_id; // required public int table_id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DB_ID((short)2, "db_id"), TABLE_ID((short)3, "table_id"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DB_ID return DB_ID; case 3: // TABLE_ID return TABLE_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DB_ID_ISSET_ID = 0; private static final int __TABLE_ID_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DB_ID, new org.apache.thrift.meta_data.FieldMetaData("db_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_epoch_args.class, metaDataMap); } public get_table_epoch_args() { } public get_table_epoch_args( java.lang.String session, int db_id, int table_id) { this(); this.session = session; this.db_id = db_id; setDb_idIsSet(true); this.table_id = table_id; setTable_idIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public get_table_epoch_args(get_table_epoch_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.db_id = other.db_id; this.table_id = other.table_id; } public get_table_epoch_args deepCopy() { return new get_table_epoch_args(this); } @Override public void clear() { this.session = null; setDb_idIsSet(false); this.db_id = 0; setTable_idIsSet(false); this.table_id = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_table_epoch_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDb_id() { return this.db_id; } public get_table_epoch_args setDb_id(int db_id) { this.db_id = db_id; setDb_idIsSet(true); return this; } public void unsetDb_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DB_ID_ISSET_ID); } /** Returns true if field db_id is set (has been assigned a value) and false otherwise */ public boolean isSetDb_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DB_ID_ISSET_ID); } public void setDb_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DB_ID_ISSET_ID, value); } public int getTable_id() { return this.table_id; } public get_table_epoch_args setTable_id(int table_id) { this.table_id = table_id; setTable_idIsSet(true); return this; } public void unsetTable_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } /** Returns true if field table_id is set (has been assigned a value) and false otherwise */ public boolean isSetTable_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } public void setTable_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLE_ID_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DB_ID: if (value == null) { unsetDb_id(); } else { setDb_id((java.lang.Integer)value); } break; case TABLE_ID: if (value == null) { unsetTable_id(); } else { setTable_id((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DB_ID: return getDb_id(); case TABLE_ID: return getTable_id(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DB_ID: return isSetDb_id(); case TABLE_ID: return isSetTable_id(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_epoch_args) return this.equals((get_table_epoch_args)that); return false; } public boolean equals(get_table_epoch_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_db_id = true; boolean that_present_db_id = true; if (this_present_db_id || that_present_db_id) { if (!(this_present_db_id && that_present_db_id)) return false; if (this.db_id != that.db_id) return false; } boolean this_present_table_id = true; boolean that_present_table_id = true; if (this_present_table_id || that_present_table_id) { if (!(this_present_table_id && that_present_table_id)) return false; if (this.table_id != that.table_id) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + db_id; hashCode = hashCode * 8191 + table_id; return hashCode; } @Override public int compareTo(get_table_epoch_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDb_id(), other.isSetDb_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_id, other.db_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_id(), other.isSetTable_id()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_id, other.table_id); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_epoch_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("db_id:"); sb.append(this.db_id); first = false; if (!first) sb.append(", "); sb.append("table_id:"); sb.append(this.table_id); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_epoch_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epoch_argsStandardScheme getScheme() { return new get_table_epoch_argsStandardScheme(); } } private static class get_table_epoch_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_epoch_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_epoch_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DB_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.db_id = iprot.readI32(); struct.setDb_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TABLE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_epoch_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DB_ID_FIELD_DESC); oprot.writeI32(struct.db_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(TABLE_ID_FIELD_DESC); oprot.writeI32(struct.table_id); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_epoch_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epoch_argsTupleScheme getScheme() { return new get_table_epoch_argsTupleScheme(); } } private static class get_table_epoch_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_epoch_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_epoch_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDb_id()) { optionals.set(1); } if (struct.isSetTable_id()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDb_id()) { oprot.writeI32(struct.db_id); } if (struct.isSetTable_id()) { oprot.writeI32(struct.table_id); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_epoch_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.db_id = iprot.readI32(); struct.setDb_idIsSet(true); } if (incoming.get(2)) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_epoch_result implements org.apache.thrift.TBase<get_table_epoch_result, get_table_epoch_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_epoch_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_epoch_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_epoch_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_epoch_resultTupleSchemeFactory(); public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_epoch_result.class, metaDataMap); } public get_table_epoch_result() { } public get_table_epoch_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public get_table_epoch_result(get_table_epoch_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public get_table_epoch_result deepCopy() { return new get_table_epoch_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public get_table_epoch_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_epoch_result) return this.equals((get_table_epoch_result)that); return false; } public boolean equals(get_table_epoch_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + success; return hashCode; } @Override public int compareTo(get_table_epoch_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_epoch_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_epoch_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epoch_resultStandardScheme getScheme() { return new get_table_epoch_resultStandardScheme(); } } private static class get_table_epoch_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_epoch_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_epoch_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_epoch_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_epoch_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epoch_resultTupleScheme getScheme() { return new get_table_epoch_resultTupleScheme(); } } private static class get_table_epoch_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_epoch_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_epoch_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_epoch_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_epoch_by_name_args implements org.apache.thrift.TBase<get_table_epoch_by_name_args, get_table_epoch_by_name_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_epoch_by_name_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_epoch_by_name_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_epoch_by_name_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_epoch_by_name_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_epoch_by_name_args.class, metaDataMap); } public get_table_epoch_by_name_args() { } public get_table_epoch_by_name_args( java.lang.String session, java.lang.String table_name) { this(); this.session = session; this.table_name = table_name; } /** * Performs a deep copy on <i>other</i>. */ public get_table_epoch_by_name_args(get_table_epoch_by_name_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } } public get_table_epoch_by_name_args deepCopy() { return new get_table_epoch_by_name_args(this); } @Override public void clear() { this.session = null; this.table_name = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_table_epoch_by_name_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public get_table_epoch_by_name_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_epoch_by_name_args) return this.equals((get_table_epoch_by_name_args)that); return false; } public boolean equals(get_table_epoch_by_name_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); return hashCode; } @Override public int compareTo(get_table_epoch_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_epoch_by_name_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_epoch_by_name_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epoch_by_name_argsStandardScheme getScheme() { return new get_table_epoch_by_name_argsStandardScheme(); } } private static class get_table_epoch_by_name_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_epoch_by_name_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_epoch_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_epoch_by_name_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_epoch_by_name_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epoch_by_name_argsTupleScheme getScheme() { return new get_table_epoch_by_name_argsTupleScheme(); } } private static class get_table_epoch_by_name_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_epoch_by_name_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_epoch_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_epoch_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_epoch_by_name_result implements org.apache.thrift.TBase<get_table_epoch_by_name_result, get_table_epoch_by_name_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_epoch_by_name_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_epoch_by_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_epoch_by_name_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_epoch_by_name_resultTupleSchemeFactory(); public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_epoch_by_name_result.class, metaDataMap); } public get_table_epoch_by_name_result() { } public get_table_epoch_by_name_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public get_table_epoch_by_name_result(get_table_epoch_by_name_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public get_table_epoch_by_name_result deepCopy() { return new get_table_epoch_by_name_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public get_table_epoch_by_name_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_epoch_by_name_result) return this.equals((get_table_epoch_by_name_result)that); return false; } public boolean equals(get_table_epoch_by_name_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + success; return hashCode; } @Override public int compareTo(get_table_epoch_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_epoch_by_name_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_epoch_by_name_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epoch_by_name_resultStandardScheme getScheme() { return new get_table_epoch_by_name_resultStandardScheme(); } } private static class get_table_epoch_by_name_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_epoch_by_name_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_epoch_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_epoch_by_name_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_epoch_by_name_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epoch_by_name_resultTupleScheme getScheme() { return new get_table_epoch_by_name_resultTupleScheme(); } } private static class get_table_epoch_by_name_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_epoch_by_name_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_epoch_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_epoch_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_epochs_args implements org.apache.thrift.TBase<get_table_epochs_args, get_table_epochs_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_epochs_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_epochs_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("db_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_epochs_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_epochs_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int db_id; // required public int table_id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DB_ID((short)2, "db_id"), TABLE_ID((short)3, "table_id"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DB_ID return DB_ID; case 3: // TABLE_ID return TABLE_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DB_ID_ISSET_ID = 0; private static final int __TABLE_ID_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DB_ID, new org.apache.thrift.meta_data.FieldMetaData("db_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_epochs_args.class, metaDataMap); } public get_table_epochs_args() { } public get_table_epochs_args( java.lang.String session, int db_id, int table_id) { this(); this.session = session; this.db_id = db_id; setDb_idIsSet(true); this.table_id = table_id; setTable_idIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public get_table_epochs_args(get_table_epochs_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.db_id = other.db_id; this.table_id = other.table_id; } public get_table_epochs_args deepCopy() { return new get_table_epochs_args(this); } @Override public void clear() { this.session = null; setDb_idIsSet(false); this.db_id = 0; setTable_idIsSet(false); this.table_id = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_table_epochs_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDb_id() { return this.db_id; } public get_table_epochs_args setDb_id(int db_id) { this.db_id = db_id; setDb_idIsSet(true); return this; } public void unsetDb_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DB_ID_ISSET_ID); } /** Returns true if field db_id is set (has been assigned a value) and false otherwise */ public boolean isSetDb_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DB_ID_ISSET_ID); } public void setDb_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DB_ID_ISSET_ID, value); } public int getTable_id() { return this.table_id; } public get_table_epochs_args setTable_id(int table_id) { this.table_id = table_id; setTable_idIsSet(true); return this; } public void unsetTable_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } /** Returns true if field table_id is set (has been assigned a value) and false otherwise */ public boolean isSetTable_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } public void setTable_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLE_ID_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DB_ID: if (value == null) { unsetDb_id(); } else { setDb_id((java.lang.Integer)value); } break; case TABLE_ID: if (value == null) { unsetTable_id(); } else { setTable_id((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DB_ID: return getDb_id(); case TABLE_ID: return getTable_id(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DB_ID: return isSetDb_id(); case TABLE_ID: return isSetTable_id(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_epochs_args) return this.equals((get_table_epochs_args)that); return false; } public boolean equals(get_table_epochs_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_db_id = true; boolean that_present_db_id = true; if (this_present_db_id || that_present_db_id) { if (!(this_present_db_id && that_present_db_id)) return false; if (this.db_id != that.db_id) return false; } boolean this_present_table_id = true; boolean that_present_table_id = true; if (this_present_table_id || that_present_table_id) { if (!(this_present_table_id && that_present_table_id)) return false; if (this.table_id != that.table_id) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + db_id; hashCode = hashCode * 8191 + table_id; return hashCode; } @Override public int compareTo(get_table_epochs_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDb_id(), other.isSetDb_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_id, other.db_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_id(), other.isSetTable_id()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_id, other.table_id); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_epochs_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("db_id:"); sb.append(this.db_id); first = false; if (!first) sb.append(", "); sb.append("table_id:"); sb.append(this.table_id); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_epochs_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epochs_argsStandardScheme getScheme() { return new get_table_epochs_argsStandardScheme(); } } private static class get_table_epochs_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_epochs_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_epochs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DB_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.db_id = iprot.readI32(); struct.setDb_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TABLE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_epochs_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DB_ID_FIELD_DESC); oprot.writeI32(struct.db_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(TABLE_ID_FIELD_DESC); oprot.writeI32(struct.table_id); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_epochs_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epochs_argsTupleScheme getScheme() { return new get_table_epochs_argsTupleScheme(); } } private static class get_table_epochs_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_epochs_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_epochs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDb_id()) { optionals.set(1); } if (struct.isSetTable_id()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDb_id()) { oprot.writeI32(struct.db_id); } if (struct.isSetTable_id()) { oprot.writeI32(struct.table_id); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_epochs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.db_id = iprot.readI32(); struct.setDb_idIsSet(true); } if (incoming.get(2)) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_epochs_result implements org.apache.thrift.TBase<get_table_epochs_result, get_table_epochs_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_epochs_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_epochs_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_epochs_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_epochs_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TTableEpochInfo> success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableEpochInfo.class)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_epochs_result.class, metaDataMap); } public get_table_epochs_result() { } public get_table_epochs_result( java.util.List<TTableEpochInfo> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_table_epochs_result(get_table_epochs_result other) { if (other.isSetSuccess()) { java.util.List<TTableEpochInfo> __this__success = new java.util.ArrayList<TTableEpochInfo>(other.success.size()); for (TTableEpochInfo other_element : other.success) { __this__success.add(new TTableEpochInfo(other_element)); } this.success = __this__success; } } public get_table_epochs_result deepCopy() { return new get_table_epochs_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TTableEpochInfo> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TTableEpochInfo elem) { if (this.success == null) { this.success = new java.util.ArrayList<TTableEpochInfo>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TTableEpochInfo> getSuccess() { return this.success; } public get_table_epochs_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TTableEpochInfo> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TTableEpochInfo>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_epochs_result) return this.equals((get_table_epochs_result)that); return false; } public boolean equals(get_table_epochs_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(get_table_epochs_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_epochs_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_epochs_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epochs_resultStandardScheme getScheme() { return new get_table_epochs_resultStandardScheme(); } } private static class get_table_epochs_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_epochs_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_epochs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list386 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TTableEpochInfo>(_list386.size); @org.apache.thrift.annotation.Nullable TTableEpochInfo _elem387; for (int _i388 = 0; _i388 < _list386.size; ++_i388) { _elem387 = new TTableEpochInfo(); _elem387.read(iprot); struct.success.add(_elem387); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_epochs_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TTableEpochInfo _iter389 : struct.success) { _iter389.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_epochs_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_epochs_resultTupleScheme getScheme() { return new get_table_epochs_resultTupleScheme(); } } private static class get_table_epochs_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_epochs_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_epochs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TTableEpochInfo _iter390 : struct.success) { _iter390.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_epochs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list391 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TTableEpochInfo>(_list391.size); @org.apache.thrift.annotation.Nullable TTableEpochInfo _elem392; for (int _i393 = 0; _i393 < _list391.size; ++_i393) { _elem392 = new TTableEpochInfo(); _elem392.read(iprot); struct.success.add(_elem392); } } struct.setSuccessIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_table_epochs_args implements org.apache.thrift.TBase<set_table_epochs_args, set_table_epochs_args._Fields>, java.io.Serializable, Cloneable, Comparable<set_table_epochs_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_table_epochs_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("db_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField TABLE_EPOCHS_FIELD_DESC = new org.apache.thrift.protocol.TField("table_epochs", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_table_epochs_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_table_epochs_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int db_id; // required public @org.apache.thrift.annotation.Nullable java.util.List<TTableEpochInfo> table_epochs; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DB_ID((short)2, "db_id"), TABLE_EPOCHS((short)3, "table_epochs"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DB_ID return DB_ID; case 3: // TABLE_EPOCHS return TABLE_EPOCHS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DB_ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DB_ID, new org.apache.thrift.meta_data.FieldMetaData("db_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TABLE_EPOCHS, new org.apache.thrift.meta_data.FieldMetaData("table_epochs", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableEpochInfo.class)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_table_epochs_args.class, metaDataMap); } public set_table_epochs_args() { } public set_table_epochs_args( java.lang.String session, int db_id, java.util.List<TTableEpochInfo> table_epochs) { this(); this.session = session; this.db_id = db_id; setDb_idIsSet(true); this.table_epochs = table_epochs; } /** * Performs a deep copy on <i>other</i>. */ public set_table_epochs_args(set_table_epochs_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.db_id = other.db_id; if (other.isSetTable_epochs()) { java.util.List<TTableEpochInfo> __this__table_epochs = new java.util.ArrayList<TTableEpochInfo>(other.table_epochs.size()); for (TTableEpochInfo other_element : other.table_epochs) { __this__table_epochs.add(new TTableEpochInfo(other_element)); } this.table_epochs = __this__table_epochs; } } public set_table_epochs_args deepCopy() { return new set_table_epochs_args(this); } @Override public void clear() { this.session = null; setDb_idIsSet(false); this.db_id = 0; this.table_epochs = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public set_table_epochs_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDb_id() { return this.db_id; } public set_table_epochs_args setDb_id(int db_id) { this.db_id = db_id; setDb_idIsSet(true); return this; } public void unsetDb_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DB_ID_ISSET_ID); } /** Returns true if field db_id is set (has been assigned a value) and false otherwise */ public boolean isSetDb_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DB_ID_ISSET_ID); } public void setDb_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DB_ID_ISSET_ID, value); } public int getTable_epochsSize() { return (this.table_epochs == null) ? 0 : this.table_epochs.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TTableEpochInfo> getTable_epochsIterator() { return (this.table_epochs == null) ? null : this.table_epochs.iterator(); } public void addToTable_epochs(TTableEpochInfo elem) { if (this.table_epochs == null) { this.table_epochs = new java.util.ArrayList<TTableEpochInfo>(); } this.table_epochs.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TTableEpochInfo> getTable_epochs() { return this.table_epochs; } public set_table_epochs_args setTable_epochs(@org.apache.thrift.annotation.Nullable java.util.List<TTableEpochInfo> table_epochs) { this.table_epochs = table_epochs; return this; } public void unsetTable_epochs() { this.table_epochs = null; } /** Returns true if field table_epochs is set (has been assigned a value) and false otherwise */ public boolean isSetTable_epochs() { return this.table_epochs != null; } public void setTable_epochsIsSet(boolean value) { if (!value) { this.table_epochs = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DB_ID: if (value == null) { unsetDb_id(); } else { setDb_id((java.lang.Integer)value); } break; case TABLE_EPOCHS: if (value == null) { unsetTable_epochs(); } else { setTable_epochs((java.util.List<TTableEpochInfo>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DB_ID: return getDb_id(); case TABLE_EPOCHS: return getTable_epochs(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DB_ID: return isSetDb_id(); case TABLE_EPOCHS: return isSetTable_epochs(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_table_epochs_args) return this.equals((set_table_epochs_args)that); return false; } public boolean equals(set_table_epochs_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_db_id = true; boolean that_present_db_id = true; if (this_present_db_id || that_present_db_id) { if (!(this_present_db_id && that_present_db_id)) return false; if (this.db_id != that.db_id) return false; } boolean this_present_table_epochs = true && this.isSetTable_epochs(); boolean that_present_table_epochs = true && that.isSetTable_epochs(); if (this_present_table_epochs || that_present_table_epochs) { if (!(this_present_table_epochs && that_present_table_epochs)) return false; if (!this.table_epochs.equals(that.table_epochs)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + db_id; hashCode = hashCode * 8191 + ((isSetTable_epochs()) ? 131071 : 524287); if (isSetTable_epochs()) hashCode = hashCode * 8191 + table_epochs.hashCode(); return hashCode; } @Override public int compareTo(set_table_epochs_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDb_id(), other.isSetDb_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_id, other.db_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_epochs(), other.isSetTable_epochs()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_epochs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_epochs, other.table_epochs); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_table_epochs_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("db_id:"); sb.append(this.db_id); first = false; if (!first) sb.append(", "); sb.append("table_epochs:"); if (this.table_epochs == null) { sb.append("null"); } else { sb.append(this.table_epochs); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_table_epochs_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epochs_argsStandardScheme getScheme() { return new set_table_epochs_argsStandardScheme(); } } private static class set_table_epochs_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_table_epochs_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_table_epochs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DB_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.db_id = iprot.readI32(); struct.setDb_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TABLE_EPOCHS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list394 = iprot.readListBegin(); struct.table_epochs = new java.util.ArrayList<TTableEpochInfo>(_list394.size); @org.apache.thrift.annotation.Nullable TTableEpochInfo _elem395; for (int _i396 = 0; _i396 < _list394.size; ++_i396) { _elem395 = new TTableEpochInfo(); _elem395.read(iprot); struct.table_epochs.add(_elem395); } iprot.readListEnd(); } struct.setTable_epochsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_table_epochs_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DB_ID_FIELD_DESC); oprot.writeI32(struct.db_id); oprot.writeFieldEnd(); if (struct.table_epochs != null) { oprot.writeFieldBegin(TABLE_EPOCHS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.table_epochs.size())); for (TTableEpochInfo _iter397 : struct.table_epochs) { _iter397.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_table_epochs_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epochs_argsTupleScheme getScheme() { return new set_table_epochs_argsTupleScheme(); } } private static class set_table_epochs_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_table_epochs_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_table_epochs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDb_id()) { optionals.set(1); } if (struct.isSetTable_epochs()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDb_id()) { oprot.writeI32(struct.db_id); } if (struct.isSetTable_epochs()) { { oprot.writeI32(struct.table_epochs.size()); for (TTableEpochInfo _iter398 : struct.table_epochs) { _iter398.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_table_epochs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.db_id = iprot.readI32(); struct.setDb_idIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list399 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.table_epochs = new java.util.ArrayList<TTableEpochInfo>(_list399.size); @org.apache.thrift.annotation.Nullable TTableEpochInfo _elem400; for (int _i401 = 0; _i401 < _list399.size; ++_i401) { _elem400 = new TTableEpochInfo(); _elem400.read(iprot); struct.table_epochs.add(_elem400); } } struct.setTable_epochsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_table_epochs_result implements org.apache.thrift.TBase<set_table_epochs_result, set_table_epochs_result._Fields>, java.io.Serializable, Cloneable, Comparable<set_table_epochs_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_table_epochs_result"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_table_epochs_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_table_epochs_resultTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_table_epochs_result.class, metaDataMap); } public set_table_epochs_result() { } /** * Performs a deep copy on <i>other</i>. */ public set_table_epochs_result(set_table_epochs_result other) { } public set_table_epochs_result deepCopy() { return new set_table_epochs_result(this); } @Override public void clear() { } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_table_epochs_result) return this.equals((set_table_epochs_result)that); return false; } public boolean equals(set_table_epochs_result that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(set_table_epochs_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_table_epochs_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_table_epochs_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epochs_resultStandardScheme getScheme() { return new set_table_epochs_resultStandardScheme(); } } private static class set_table_epochs_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_table_epochs_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_table_epochs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_table_epochs_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_table_epochs_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_table_epochs_resultTupleScheme getScheme() { return new set_table_epochs_resultTupleScheme(); } } private static class set_table_epochs_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_table_epochs_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_table_epochs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_table_epochs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_session_info_args implements org.apache.thrift.TBase<get_session_info_args, get_session_info_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_session_info_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_session_info_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_session_info_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_session_info_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_session_info_args.class, metaDataMap); } public get_session_info_args() { } public get_session_info_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_session_info_args(get_session_info_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_session_info_args deepCopy() { return new get_session_info_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_session_info_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_session_info_args) return this.equals((get_session_info_args)that); return false; } public boolean equals(get_session_info_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_session_info_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_session_info_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_session_info_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_session_info_argsStandardScheme getScheme() { return new get_session_info_argsStandardScheme(); } } private static class get_session_info_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_session_info_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_session_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_session_info_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_session_info_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_session_info_argsTupleScheme getScheme() { return new get_session_info_argsTupleScheme(); } } private static class get_session_info_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_session_info_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_session_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_session_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_session_info_result implements org.apache.thrift.TBase<get_session_info_result, get_session_info_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_session_info_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_session_info_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_session_info_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_session_info_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TSessionInfo success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSessionInfo.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_session_info_result.class, metaDataMap); } public get_session_info_result() { } public get_session_info_result( TSessionInfo success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_session_info_result(get_session_info_result other) { if (other.isSetSuccess()) { this.success = new TSessionInfo(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_session_info_result deepCopy() { return new get_session_info_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TSessionInfo getSuccess() { return this.success; } public get_session_info_result setSuccess(@org.apache.thrift.annotation.Nullable TSessionInfo success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_session_info_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TSessionInfo)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_session_info_result) return this.equals((get_session_info_result)that); return false; } public boolean equals(get_session_info_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_session_info_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_session_info_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_session_info_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_session_info_resultStandardScheme getScheme() { return new get_session_info_resultStandardScheme(); } } private static class get_session_info_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_session_info_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_session_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TSessionInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_session_info_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_session_info_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_session_info_resultTupleScheme getScheme() { return new get_session_info_resultTupleScheme(); } } private static class get_session_info_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_session_info_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_session_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_session_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TSessionInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_queries_info_args implements org.apache.thrift.TBase<get_queries_info_args, get_queries_info_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_queries_info_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_queries_info_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_queries_info_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_queries_info_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_queries_info_args.class, metaDataMap); } public get_queries_info_args() { } public get_queries_info_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_queries_info_args(get_queries_info_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_queries_info_args deepCopy() { return new get_queries_info_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_queries_info_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_queries_info_args) return this.equals((get_queries_info_args)that); return false; } public boolean equals(get_queries_info_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_queries_info_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_queries_info_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_queries_info_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_queries_info_argsStandardScheme getScheme() { return new get_queries_info_argsStandardScheme(); } } private static class get_queries_info_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_queries_info_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_queries_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_queries_info_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_queries_info_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_queries_info_argsTupleScheme getScheme() { return new get_queries_info_argsTupleScheme(); } } private static class get_queries_info_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_queries_info_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_queries_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_queries_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_queries_info_result implements org.apache.thrift.TBase<get_queries_info_result, get_queries_info_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_queries_info_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_queries_info_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_queries_info_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_queries_info_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TQueryInfo> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TQueryInfo.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_queries_info_result.class, metaDataMap); } public get_queries_info_result() { } public get_queries_info_result( java.util.List<TQueryInfo> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_queries_info_result(get_queries_info_result other) { if (other.isSetSuccess()) { java.util.List<TQueryInfo> __this__success = new java.util.ArrayList<TQueryInfo>(other.success.size()); for (TQueryInfo other_element : other.success) { __this__success.add(new TQueryInfo(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_queries_info_result deepCopy() { return new get_queries_info_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TQueryInfo> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TQueryInfo elem) { if (this.success == null) { this.success = new java.util.ArrayList<TQueryInfo>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TQueryInfo> getSuccess() { return this.success; } public get_queries_info_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TQueryInfo> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_queries_info_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TQueryInfo>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_queries_info_result) return this.equals((get_queries_info_result)that); return false; } public boolean equals(get_queries_info_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_queries_info_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_queries_info_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_queries_info_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_queries_info_resultStandardScheme getScheme() { return new get_queries_info_resultStandardScheme(); } } private static class get_queries_info_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_queries_info_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_queries_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list402 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TQueryInfo>(_list402.size); @org.apache.thrift.annotation.Nullable TQueryInfo _elem403; for (int _i404 = 0; _i404 < _list402.size; ++_i404) { _elem403 = new TQueryInfo(); _elem403.read(iprot); struct.success.add(_elem403); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_queries_info_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TQueryInfo _iter405 : struct.success) { _iter405.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_queries_info_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_queries_info_resultTupleScheme getScheme() { return new get_queries_info_resultTupleScheme(); } } private static class get_queries_info_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_queries_info_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_queries_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TQueryInfo _iter406 : struct.success) { _iter406.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_queries_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list407 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TQueryInfo>(_list407.size); @org.apache.thrift.annotation.Nullable TQueryInfo _elem408; for (int _i409 = 0; _i409 < _list407.size; ++_i409) { _elem408 = new TQueryInfo(); _elem408.read(iprot); struct.success.add(_elem408); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_leaf_info_args implements org.apache.thrift.TBase<set_leaf_info_args, set_leaf_info_args._Fields>, java.io.Serializable, Cloneable, Comparable<set_leaf_info_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_leaf_info_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField LEAF_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("leaf_info", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_leaf_info_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_leaf_info_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable TLeafInfo leaf_info; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), LEAF_INFO((short)2, "leaf_info"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // LEAF_INFO return LEAF_INFO; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.LEAF_INFO, new org.apache.thrift.meta_data.FieldMetaData("leaf_info", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TLeafInfo.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_leaf_info_args.class, metaDataMap); } public set_leaf_info_args() { } public set_leaf_info_args( java.lang.String session, TLeafInfo leaf_info) { this(); this.session = session; this.leaf_info = leaf_info; } /** * Performs a deep copy on <i>other</i>. */ public set_leaf_info_args(set_leaf_info_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetLeaf_info()) { this.leaf_info = new TLeafInfo(other.leaf_info); } } public set_leaf_info_args deepCopy() { return new set_leaf_info_args(this); } @Override public void clear() { this.session = null; this.leaf_info = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public set_leaf_info_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public TLeafInfo getLeaf_info() { return this.leaf_info; } public set_leaf_info_args setLeaf_info(@org.apache.thrift.annotation.Nullable TLeafInfo leaf_info) { this.leaf_info = leaf_info; return this; } public void unsetLeaf_info() { this.leaf_info = null; } /** Returns true if field leaf_info is set (has been assigned a value) and false otherwise */ public boolean isSetLeaf_info() { return this.leaf_info != null; } public void setLeaf_infoIsSet(boolean value) { if (!value) { this.leaf_info = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case LEAF_INFO: if (value == null) { unsetLeaf_info(); } else { setLeaf_info((TLeafInfo)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case LEAF_INFO: return getLeaf_info(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case LEAF_INFO: return isSetLeaf_info(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_leaf_info_args) return this.equals((set_leaf_info_args)that); return false; } public boolean equals(set_leaf_info_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_leaf_info = true && this.isSetLeaf_info(); boolean that_present_leaf_info = true && that.isSetLeaf_info(); if (this_present_leaf_info || that_present_leaf_info) { if (!(this_present_leaf_info && that_present_leaf_info)) return false; if (!this.leaf_info.equals(that.leaf_info)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetLeaf_info()) ? 131071 : 524287); if (isSetLeaf_info()) hashCode = hashCode * 8191 + leaf_info.hashCode(); return hashCode; } @Override public int compareTo(set_leaf_info_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetLeaf_info(), other.isSetLeaf_info()); if (lastComparison != 0) { return lastComparison; } if (isSetLeaf_info()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leaf_info, other.leaf_info); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_leaf_info_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("leaf_info:"); if (this.leaf_info == null) { sb.append("null"); } else { sb.append(this.leaf_info); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (leaf_info != null) { leaf_info.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_leaf_info_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_leaf_info_argsStandardScheme getScheme() { return new set_leaf_info_argsStandardScheme(); } } private static class set_leaf_info_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_leaf_info_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_leaf_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // LEAF_INFO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.leaf_info = new TLeafInfo(); struct.leaf_info.read(iprot); struct.setLeaf_infoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_leaf_info_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.leaf_info != null) { oprot.writeFieldBegin(LEAF_INFO_FIELD_DESC); struct.leaf_info.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_leaf_info_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_leaf_info_argsTupleScheme getScheme() { return new set_leaf_info_argsTupleScheme(); } } private static class set_leaf_info_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_leaf_info_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_leaf_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetLeaf_info()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetLeaf_info()) { struct.leaf_info.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_leaf_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.leaf_info = new TLeafInfo(); struct.leaf_info.read(iprot); struct.setLeaf_infoIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_leaf_info_result implements org.apache.thrift.TBase<set_leaf_info_result, set_leaf_info_result._Fields>, java.io.Serializable, Cloneable, Comparable<set_leaf_info_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_leaf_info_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_leaf_info_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_leaf_info_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_leaf_info_result.class, metaDataMap); } public set_leaf_info_result() { } public set_leaf_info_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public set_leaf_info_result(set_leaf_info_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public set_leaf_info_result deepCopy() { return new set_leaf_info_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public set_leaf_info_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_leaf_info_result) return this.equals((set_leaf_info_result)that); return false; } public boolean equals(set_leaf_info_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(set_leaf_info_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_leaf_info_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_leaf_info_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_leaf_info_resultStandardScheme getScheme() { return new set_leaf_info_resultStandardScheme(); } } private static class set_leaf_info_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_leaf_info_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_leaf_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_leaf_info_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_leaf_info_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_leaf_info_resultTupleScheme getScheme() { return new set_leaf_info_resultTupleScheme(); } } private static class set_leaf_info_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_leaf_info_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_leaf_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_leaf_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class sql_execute_args implements org.apache.thrift.TBase<sql_execute_args, sql_execute_args._Fields>, java.io.Serializable, Cloneable, Comparable<sql_execute_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sql_execute_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COLUMN_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("column_format", org.apache.thrift.protocol.TType.BOOL, (short)3); private static final org.apache.thrift.protocol.TField NONCE_FIELD_DESC = new org.apache.thrift.protocol.TField("nonce", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField FIRST_N_FIELD_DESC = new org.apache.thrift.protocol.TField("first_n", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField AT_MOST_N_FIELD_DESC = new org.apache.thrift.protocol.TField("at_most_n", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sql_execute_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sql_execute_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String query; // required public boolean column_format; // required public @org.apache.thrift.annotation.Nullable java.lang.String nonce; // required public int first_n; // required public int at_most_n; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), QUERY((short)2, "query"), COLUMN_FORMAT((short)3, "column_format"), NONCE((short)4, "nonce"), FIRST_N((short)5, "first_n"), AT_MOST_N((short)6, "at_most_n"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // QUERY return QUERY; case 3: // COLUMN_FORMAT return COLUMN_FORMAT; case 4: // NONCE return NONCE; case 5: // FIRST_N return FIRST_N; case 6: // AT_MOST_N return AT_MOST_N; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __COLUMN_FORMAT_ISSET_ID = 0; private static final int __FIRST_N_ISSET_ID = 1; private static final int __AT_MOST_N_ISSET_ID = 2; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLUMN_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("column_format", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.NONCE, new org.apache.thrift.meta_data.FieldMetaData("nonce", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FIRST_N, new org.apache.thrift.meta_data.FieldMetaData("first_n", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.AT_MOST_N, new org.apache.thrift.meta_data.FieldMetaData("at_most_n", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sql_execute_args.class, metaDataMap); } public sql_execute_args() { this.first_n = -1; this.at_most_n = -1; } public sql_execute_args( java.lang.String session, java.lang.String query, boolean column_format, java.lang.String nonce, int first_n, int at_most_n) { this(); this.session = session; this.query = query; this.column_format = column_format; setColumn_formatIsSet(true); this.nonce = nonce; this.first_n = first_n; setFirst_nIsSet(true); this.at_most_n = at_most_n; setAt_most_nIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public sql_execute_args(sql_execute_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } if (other.isSetQuery()) { this.query = other.query; } this.column_format = other.column_format; if (other.isSetNonce()) { this.nonce = other.nonce; } this.first_n = other.first_n; this.at_most_n = other.at_most_n; } public sql_execute_args deepCopy() { return new sql_execute_args(this); } @Override public void clear() { this.session = null; this.query = null; setColumn_formatIsSet(false); this.column_format = false; this.nonce = null; this.first_n = -1; this.at_most_n = -1; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public sql_execute_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getQuery() { return this.query; } public sql_execute_args setQuery(@org.apache.thrift.annotation.Nullable java.lang.String query) { this.query = query; return this; } public void unsetQuery() { this.query = null; } /** Returns true if field query is set (has been assigned a value) and false otherwise */ public boolean isSetQuery() { return this.query != null; } public void setQueryIsSet(boolean value) { if (!value) { this.query = null; } } public boolean isColumn_format() { return this.column_format; } public sql_execute_args setColumn_format(boolean column_format) { this.column_format = column_format; setColumn_formatIsSet(true); return this; } public void unsetColumn_format() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMN_FORMAT_ISSET_ID); } /** Returns true if field column_format is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_format() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMN_FORMAT_ISSET_ID); } public void setColumn_formatIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMN_FORMAT_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getNonce() { return this.nonce; } public sql_execute_args setNonce(@org.apache.thrift.annotation.Nullable java.lang.String nonce) { this.nonce = nonce; return this; } public void unsetNonce() { this.nonce = null; } /** Returns true if field nonce is set (has been assigned a value) and false otherwise */ public boolean isSetNonce() { return this.nonce != null; } public void setNonceIsSet(boolean value) { if (!value) { this.nonce = null; } } public int getFirst_n() { return this.first_n; } public sql_execute_args setFirst_n(int first_n) { this.first_n = first_n; setFirst_nIsSet(true); return this; } public void unsetFirst_n() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FIRST_N_ISSET_ID); } /** Returns true if field first_n is set (has been assigned a value) and false otherwise */ public boolean isSetFirst_n() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FIRST_N_ISSET_ID); } public void setFirst_nIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FIRST_N_ISSET_ID, value); } public int getAt_most_n() { return this.at_most_n; } public sql_execute_args setAt_most_n(int at_most_n) { this.at_most_n = at_most_n; setAt_most_nIsSet(true); return this; } public void unsetAt_most_n() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AT_MOST_N_ISSET_ID); } /** Returns true if field at_most_n is set (has been assigned a value) and false otherwise */ public boolean isSetAt_most_n() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AT_MOST_N_ISSET_ID); } public void setAt_most_nIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AT_MOST_N_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case QUERY: if (value == null) { unsetQuery(); } else { setQuery((java.lang.String)value); } break; case COLUMN_FORMAT: if (value == null) { unsetColumn_format(); } else { setColumn_format((java.lang.Boolean)value); } break; case NONCE: if (value == null) { unsetNonce(); } else { setNonce((java.lang.String)value); } break; case FIRST_N: if (value == null) { unsetFirst_n(); } else { setFirst_n((java.lang.Integer)value); } break; case AT_MOST_N: if (value == null) { unsetAt_most_n(); } else { setAt_most_n((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case QUERY: return getQuery(); case COLUMN_FORMAT: return isColumn_format(); case NONCE: return getNonce(); case FIRST_N: return getFirst_n(); case AT_MOST_N: return getAt_most_n(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case QUERY: return isSetQuery(); case COLUMN_FORMAT: return isSetColumn_format(); case NONCE: return isSetNonce(); case FIRST_N: return isSetFirst_n(); case AT_MOST_N: return isSetAt_most_n(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof sql_execute_args) return this.equals((sql_execute_args)that); return false; } public boolean equals(sql_execute_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_query = true && this.isSetQuery(); boolean that_present_query = true && that.isSetQuery(); if (this_present_query || that_present_query) { if (!(this_present_query && that_present_query)) return false; if (!this.query.equals(that.query)) return false; } boolean this_present_column_format = true; boolean that_present_column_format = true; if (this_present_column_format || that_present_column_format) { if (!(this_present_column_format && that_present_column_format)) return false; if (this.column_format != that.column_format) return false; } boolean this_present_nonce = true && this.isSetNonce(); boolean that_present_nonce = true && that.isSetNonce(); if (this_present_nonce || that_present_nonce) { if (!(this_present_nonce && that_present_nonce)) return false; if (!this.nonce.equals(that.nonce)) return false; } boolean this_present_first_n = true; boolean that_present_first_n = true; if (this_present_first_n || that_present_first_n) { if (!(this_present_first_n && that_present_first_n)) return false; if (this.first_n != that.first_n) return false; } boolean this_present_at_most_n = true; boolean that_present_at_most_n = true; if (this_present_at_most_n || that_present_at_most_n) { if (!(this_present_at_most_n && that_present_at_most_n)) return false; if (this.at_most_n != that.at_most_n) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287); if (isSetQuery()) hashCode = hashCode * 8191 + query.hashCode(); hashCode = hashCode * 8191 + ((column_format) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetNonce()) ? 131071 : 524287); if (isSetNonce()) hashCode = hashCode * 8191 + nonce.hashCode(); hashCode = hashCode * 8191 + first_n; hashCode = hashCode * 8191 + at_most_n; return hashCode; } @Override public int compareTo(sql_execute_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetQuery(), other.isSetQuery()); if (lastComparison != 0) { return lastComparison; } if (isSetQuery()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetColumn_format(), other.isSetColumn_format()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_format()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_format, other.column_format); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNonce(), other.isSetNonce()); if (lastComparison != 0) { return lastComparison; } if (isSetNonce()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonce, other.nonce); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFirst_n(), other.isSetFirst_n()); if (lastComparison != 0) { return lastComparison; } if (isSetFirst_n()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.first_n, other.first_n); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetAt_most_n(), other.isSetAt_most_n()); if (lastComparison != 0) { return lastComparison; } if (isSetAt_most_n()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.at_most_n, other.at_most_n); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("sql_execute_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("query:"); if (this.query == null) { sb.append("null"); } else { sb.append(this.query); } first = false; if (!first) sb.append(", "); sb.append("column_format:"); sb.append(this.column_format); first = false; if (!first) sb.append(", "); sb.append("nonce:"); if (this.nonce == null) { sb.append("null"); } else { sb.append(this.nonce); } first = false; if (!first) sb.append(", "); sb.append("first_n:"); sb.append(this.first_n); first = false; if (!first) sb.append(", "); sb.append("at_most_n:"); sb.append(this.at_most_n); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class sql_execute_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_argsStandardScheme getScheme() { return new sql_execute_argsStandardScheme(); } } private static class sql_execute_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<sql_execute_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, sql_execute_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // QUERY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COLUMN_FORMAT if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.column_format = iprot.readBool(); struct.setColumn_formatIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // NONCE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.nonce = iprot.readString(); struct.setNonceIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // FIRST_N if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.first_n = iprot.readI32(); struct.setFirst_nIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // AT_MOST_N if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.at_most_n = iprot.readI32(); struct.setAt_most_nIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sql_execute_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.query != null) { oprot.writeFieldBegin(QUERY_FIELD_DESC); oprot.writeString(struct.query); oprot.writeFieldEnd(); } oprot.writeFieldBegin(COLUMN_FORMAT_FIELD_DESC); oprot.writeBool(struct.column_format); oprot.writeFieldEnd(); if (struct.nonce != null) { oprot.writeFieldBegin(NONCE_FIELD_DESC); oprot.writeString(struct.nonce); oprot.writeFieldEnd(); } oprot.writeFieldBegin(FIRST_N_FIELD_DESC); oprot.writeI32(struct.first_n); oprot.writeFieldEnd(); oprot.writeFieldBegin(AT_MOST_N_FIELD_DESC); oprot.writeI32(struct.at_most_n); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sql_execute_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_argsTupleScheme getScheme() { return new sql_execute_argsTupleScheme(); } } private static class sql_execute_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<sql_execute_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sql_execute_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetQuery()) { optionals.set(1); } if (struct.isSetColumn_format()) { optionals.set(2); } if (struct.isSetNonce()) { optionals.set(3); } if (struct.isSetFirst_n()) { optionals.set(4); } if (struct.isSetAt_most_n()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetQuery()) { oprot.writeString(struct.query); } if (struct.isSetColumn_format()) { oprot.writeBool(struct.column_format); } if (struct.isSetNonce()) { oprot.writeString(struct.nonce); } if (struct.isSetFirst_n()) { oprot.writeI32(struct.first_n); } if (struct.isSetAt_most_n()) { oprot.writeI32(struct.at_most_n); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sql_execute_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } if (incoming.get(2)) { struct.column_format = iprot.readBool(); struct.setColumn_formatIsSet(true); } if (incoming.get(3)) { struct.nonce = iprot.readString(); struct.setNonceIsSet(true); } if (incoming.get(4)) { struct.first_n = iprot.readI32(); struct.setFirst_nIsSet(true); } if (incoming.get(5)) { struct.at_most_n = iprot.readI32(); struct.setAt_most_nIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class sql_execute_result implements org.apache.thrift.TBase<sql_execute_result, sql_execute_result._Fields>, java.io.Serializable, Cloneable, Comparable<sql_execute_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sql_execute_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sql_execute_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sql_execute_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TQueryResult success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TQueryResult.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sql_execute_result.class, metaDataMap); } public sql_execute_result() { } public sql_execute_result( TQueryResult success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public sql_execute_result(sql_execute_result other) { if (other.isSetSuccess()) { this.success = new TQueryResult(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public sql_execute_result deepCopy() { return new sql_execute_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TQueryResult getSuccess() { return this.success; } public sql_execute_result setSuccess(@org.apache.thrift.annotation.Nullable TQueryResult success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public sql_execute_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TQueryResult)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof sql_execute_result) return this.equals((sql_execute_result)that); return false; } public boolean equals(sql_execute_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(sql_execute_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("sql_execute_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class sql_execute_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_resultStandardScheme getScheme() { return new sql_execute_resultStandardScheme(); } } private static class sql_execute_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<sql_execute_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, sql_execute_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TQueryResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sql_execute_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sql_execute_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_resultTupleScheme getScheme() { return new sql_execute_resultTupleScheme(); } } private static class sql_execute_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<sql_execute_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sql_execute_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sql_execute_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TQueryResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class sql_execute_df_args implements org.apache.thrift.TBase<sql_execute_df_args, sql_execute_df_args._Fields>, java.io.Serializable, Cloneable, Comparable<sql_execute_df_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sql_execute_df_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DEVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("device_type", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField DEVICE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("device_id", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.protocol.TField FIRST_N_FIELD_DESC = new org.apache.thrift.protocol.TField("first_n", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField TRANSPORT_METHOD_FIELD_DESC = new org.apache.thrift.protocol.TField("transport_method", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sql_execute_df_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sql_execute_df_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String query; // required /** * * @see ai.heavy.thrift.server.TDeviceType */ public @org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TDeviceType device_type; // required public int device_id; // required public int first_n; // required /** * * @see TArrowTransport */ public @org.apache.thrift.annotation.Nullable TArrowTransport transport_method; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), QUERY((short)2, "query"), /** * * @see ai.heavy.thrift.server.TDeviceType */ DEVICE_TYPE((short)3, "device_type"), DEVICE_ID((short)4, "device_id"), FIRST_N((short)5, "first_n"), /** * * @see TArrowTransport */ TRANSPORT_METHOD((short)6, "transport_method"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // QUERY return QUERY; case 3: // DEVICE_TYPE return DEVICE_TYPE; case 4: // DEVICE_ID return DEVICE_ID; case 5: // FIRST_N return FIRST_N; case 6: // TRANSPORT_METHOD return TRANSPORT_METHOD; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DEVICE_ID_ISSET_ID = 0; private static final int __FIRST_N_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DEVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("device_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ai.heavy.thrift.server.TDeviceType.class))); tmpMap.put(_Fields.DEVICE_ID, new org.apache.thrift.meta_data.FieldMetaData("device_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.FIRST_N, new org.apache.thrift.meta_data.FieldMetaData("first_n", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TRANSPORT_METHOD, new org.apache.thrift.meta_data.FieldMetaData("transport_method", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TArrowTransport.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sql_execute_df_args.class, metaDataMap); } public sql_execute_df_args() { this.device_id = 0; this.first_n = -1; } public sql_execute_df_args( java.lang.String session, java.lang.String query, ai.heavy.thrift.server.TDeviceType device_type, int device_id, int first_n, TArrowTransport transport_method) { this(); this.session = session; this.query = query; this.device_type = device_type; this.device_id = device_id; setDevice_idIsSet(true); this.first_n = first_n; setFirst_nIsSet(true); this.transport_method = transport_method; } /** * Performs a deep copy on <i>other</i>. */ public sql_execute_df_args(sql_execute_df_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } if (other.isSetQuery()) { this.query = other.query; } if (other.isSetDevice_type()) { this.device_type = other.device_type; } this.device_id = other.device_id; this.first_n = other.first_n; if (other.isSetTransport_method()) { this.transport_method = other.transport_method; } } public sql_execute_df_args deepCopy() { return new sql_execute_df_args(this); } @Override public void clear() { this.session = null; this.query = null; this.device_type = null; this.device_id = 0; this.first_n = -1; this.transport_method = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public sql_execute_df_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getQuery() { return this.query; } public sql_execute_df_args setQuery(@org.apache.thrift.annotation.Nullable java.lang.String query) { this.query = query; return this; } public void unsetQuery() { this.query = null; } /** Returns true if field query is set (has been assigned a value) and false otherwise */ public boolean isSetQuery() { return this.query != null; } public void setQueryIsSet(boolean value) { if (!value) { this.query = null; } } /** * * @see ai.heavy.thrift.server.TDeviceType */ @org.apache.thrift.annotation.Nullable public ai.heavy.thrift.server.TDeviceType getDevice_type() { return this.device_type; } /** * * @see ai.heavy.thrift.server.TDeviceType */ public sql_execute_df_args setDevice_type(@org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TDeviceType device_type) { this.device_type = device_type; return this; } public void unsetDevice_type() { this.device_type = null; } /** Returns true if field device_type is set (has been assigned a value) and false otherwise */ public boolean isSetDevice_type() { return this.device_type != null; } public void setDevice_typeIsSet(boolean value) { if (!value) { this.device_type = null; } } public int getDevice_id() { return this.device_id; } public sql_execute_df_args setDevice_id(int device_id) { this.device_id = device_id; setDevice_idIsSet(true); return this; } public void unsetDevice_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEVICE_ID_ISSET_ID); } /** Returns true if field device_id is set (has been assigned a value) and false otherwise */ public boolean isSetDevice_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEVICE_ID_ISSET_ID); } public void setDevice_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEVICE_ID_ISSET_ID, value); } public int getFirst_n() { return this.first_n; } public sql_execute_df_args setFirst_n(int first_n) { this.first_n = first_n; setFirst_nIsSet(true); return this; } public void unsetFirst_n() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FIRST_N_ISSET_ID); } /** Returns true if field first_n is set (has been assigned a value) and false otherwise */ public boolean isSetFirst_n() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FIRST_N_ISSET_ID); } public void setFirst_nIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FIRST_N_ISSET_ID, value); } /** * * @see TArrowTransport */ @org.apache.thrift.annotation.Nullable public TArrowTransport getTransport_method() { return this.transport_method; } /** * * @see TArrowTransport */ public sql_execute_df_args setTransport_method(@org.apache.thrift.annotation.Nullable TArrowTransport transport_method) { this.transport_method = transport_method; return this; } public void unsetTransport_method() { this.transport_method = null; } /** Returns true if field transport_method is set (has been assigned a value) and false otherwise */ public boolean isSetTransport_method() { return this.transport_method != null; } public void setTransport_methodIsSet(boolean value) { if (!value) { this.transport_method = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case QUERY: if (value == null) { unsetQuery(); } else { setQuery((java.lang.String)value); } break; case DEVICE_TYPE: if (value == null) { unsetDevice_type(); } else { setDevice_type((ai.heavy.thrift.server.TDeviceType)value); } break; case DEVICE_ID: if (value == null) { unsetDevice_id(); } else { setDevice_id((java.lang.Integer)value); } break; case FIRST_N: if (value == null) { unsetFirst_n(); } else { setFirst_n((java.lang.Integer)value); } break; case TRANSPORT_METHOD: if (value == null) { unsetTransport_method(); } else { setTransport_method((TArrowTransport)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case QUERY: return getQuery(); case DEVICE_TYPE: return getDevice_type(); case DEVICE_ID: return getDevice_id(); case FIRST_N: return getFirst_n(); case TRANSPORT_METHOD: return getTransport_method(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case QUERY: return isSetQuery(); case DEVICE_TYPE: return isSetDevice_type(); case DEVICE_ID: return isSetDevice_id(); case FIRST_N: return isSetFirst_n(); case TRANSPORT_METHOD: return isSetTransport_method(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof sql_execute_df_args) return this.equals((sql_execute_df_args)that); return false; } public boolean equals(sql_execute_df_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_query = true && this.isSetQuery(); boolean that_present_query = true && that.isSetQuery(); if (this_present_query || that_present_query) { if (!(this_present_query && that_present_query)) return false; if (!this.query.equals(that.query)) return false; } boolean this_present_device_type = true && this.isSetDevice_type(); boolean that_present_device_type = true && that.isSetDevice_type(); if (this_present_device_type || that_present_device_type) { if (!(this_present_device_type && that_present_device_type)) return false; if (!this.device_type.equals(that.device_type)) return false; } boolean this_present_device_id = true; boolean that_present_device_id = true; if (this_present_device_id || that_present_device_id) { if (!(this_present_device_id && that_present_device_id)) return false; if (this.device_id != that.device_id) return false; } boolean this_present_first_n = true; boolean that_present_first_n = true; if (this_present_first_n || that_present_first_n) { if (!(this_present_first_n && that_present_first_n)) return false; if (this.first_n != that.first_n) return false; } boolean this_present_transport_method = true && this.isSetTransport_method(); boolean that_present_transport_method = true && that.isSetTransport_method(); if (this_present_transport_method || that_present_transport_method) { if (!(this_present_transport_method && that_present_transport_method)) return false; if (!this.transport_method.equals(that.transport_method)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287); if (isSetQuery()) hashCode = hashCode * 8191 + query.hashCode(); hashCode = hashCode * 8191 + ((isSetDevice_type()) ? 131071 : 524287); if (isSetDevice_type()) hashCode = hashCode * 8191 + device_type.getValue(); hashCode = hashCode * 8191 + device_id; hashCode = hashCode * 8191 + first_n; hashCode = hashCode * 8191 + ((isSetTransport_method()) ? 131071 : 524287); if (isSetTransport_method()) hashCode = hashCode * 8191 + transport_method.getValue(); return hashCode; } @Override public int compareTo(sql_execute_df_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetQuery(), other.isSetQuery()); if (lastComparison != 0) { return lastComparison; } if (isSetQuery()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDevice_type(), other.isSetDevice_type()); if (lastComparison != 0) { return lastComparison; } if (isSetDevice_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.device_type, other.device_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDevice_id(), other.isSetDevice_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDevice_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.device_id, other.device_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFirst_n(), other.isSetFirst_n()); if (lastComparison != 0) { return lastComparison; } if (isSetFirst_n()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.first_n, other.first_n); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTransport_method(), other.isSetTransport_method()); if (lastComparison != 0) { return lastComparison; } if (isSetTransport_method()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transport_method, other.transport_method); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("sql_execute_df_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("query:"); if (this.query == null) { sb.append("null"); } else { sb.append(this.query); } first = false; if (!first) sb.append(", "); sb.append("device_type:"); if (this.device_type == null) { sb.append("null"); } else { sb.append(this.device_type); } first = false; if (!first) sb.append(", "); sb.append("device_id:"); sb.append(this.device_id); first = false; if (!first) sb.append(", "); sb.append("first_n:"); sb.append(this.first_n); first = false; if (!first) sb.append(", "); sb.append("transport_method:"); if (this.transport_method == null) { sb.append("null"); } else { sb.append(this.transport_method); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class sql_execute_df_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_df_argsStandardScheme getScheme() { return new sql_execute_df_argsStandardScheme(); } } private static class sql_execute_df_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<sql_execute_df_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, sql_execute_df_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // QUERY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DEVICE_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.device_type = ai.heavy.thrift.server.TDeviceType.findByValue(iprot.readI32()); struct.setDevice_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DEVICE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.device_id = iprot.readI32(); struct.setDevice_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // FIRST_N if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.first_n = iprot.readI32(); struct.setFirst_nIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // TRANSPORT_METHOD if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.transport_method = ai.heavy.thrift.server.TArrowTransport.findByValue(iprot.readI32()); struct.setTransport_methodIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sql_execute_df_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.query != null) { oprot.writeFieldBegin(QUERY_FIELD_DESC); oprot.writeString(struct.query); oprot.writeFieldEnd(); } if (struct.device_type != null) { oprot.writeFieldBegin(DEVICE_TYPE_FIELD_DESC); oprot.writeI32(struct.device_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DEVICE_ID_FIELD_DESC); oprot.writeI32(struct.device_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(FIRST_N_FIELD_DESC); oprot.writeI32(struct.first_n); oprot.writeFieldEnd(); if (struct.transport_method != null) { oprot.writeFieldBegin(TRANSPORT_METHOD_FIELD_DESC); oprot.writeI32(struct.transport_method.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sql_execute_df_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_df_argsTupleScheme getScheme() { return new sql_execute_df_argsTupleScheme(); } } private static class sql_execute_df_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<sql_execute_df_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sql_execute_df_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetQuery()) { optionals.set(1); } if (struct.isSetDevice_type()) { optionals.set(2); } if (struct.isSetDevice_id()) { optionals.set(3); } if (struct.isSetFirst_n()) { optionals.set(4); } if (struct.isSetTransport_method()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetQuery()) { oprot.writeString(struct.query); } if (struct.isSetDevice_type()) { oprot.writeI32(struct.device_type.getValue()); } if (struct.isSetDevice_id()) { oprot.writeI32(struct.device_id); } if (struct.isSetFirst_n()) { oprot.writeI32(struct.first_n); } if (struct.isSetTransport_method()) { oprot.writeI32(struct.transport_method.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sql_execute_df_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } if (incoming.get(2)) { struct.device_type = ai.heavy.thrift.server.TDeviceType.findByValue(iprot.readI32()); struct.setDevice_typeIsSet(true); } if (incoming.get(3)) { struct.device_id = iprot.readI32(); struct.setDevice_idIsSet(true); } if (incoming.get(4)) { struct.first_n = iprot.readI32(); struct.setFirst_nIsSet(true); } if (incoming.get(5)) { struct.transport_method = ai.heavy.thrift.server.TArrowTransport.findByValue(iprot.readI32()); struct.setTransport_methodIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class sql_execute_df_result implements org.apache.thrift.TBase<sql_execute_df_result, sql_execute_df_result._Fields>, java.io.Serializable, Cloneable, Comparable<sql_execute_df_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sql_execute_df_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sql_execute_df_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sql_execute_df_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDataFrame success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDataFrame.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sql_execute_df_result.class, metaDataMap); } public sql_execute_df_result() { } public sql_execute_df_result( TDataFrame success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public sql_execute_df_result(sql_execute_df_result other) { if (other.isSetSuccess()) { this.success = new TDataFrame(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public sql_execute_df_result deepCopy() { return new sql_execute_df_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TDataFrame getSuccess() { return this.success; } public sql_execute_df_result setSuccess(@org.apache.thrift.annotation.Nullable TDataFrame success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public sql_execute_df_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TDataFrame)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof sql_execute_df_result) return this.equals((sql_execute_df_result)that); return false; } public boolean equals(sql_execute_df_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(sql_execute_df_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("sql_execute_df_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class sql_execute_df_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_df_resultStandardScheme getScheme() { return new sql_execute_df_resultStandardScheme(); } } private static class sql_execute_df_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<sql_execute_df_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, sql_execute_df_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TDataFrame(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sql_execute_df_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sql_execute_df_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_df_resultTupleScheme getScheme() { return new sql_execute_df_resultTupleScheme(); } } private static class sql_execute_df_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<sql_execute_df_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sql_execute_df_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sql_execute_df_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TDataFrame(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class sql_execute_gdf_args implements org.apache.thrift.TBase<sql_execute_gdf_args, sql_execute_gdf_args._Fields>, java.io.Serializable, Cloneable, Comparable<sql_execute_gdf_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sql_execute_gdf_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DEVICE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("device_id", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField FIRST_N_FIELD_DESC = new org.apache.thrift.protocol.TField("first_n", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sql_execute_gdf_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sql_execute_gdf_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String query; // required public int device_id; // required public int first_n; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), QUERY((short)2, "query"), DEVICE_ID((short)3, "device_id"), FIRST_N((short)4, "first_n"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // QUERY return QUERY; case 3: // DEVICE_ID return DEVICE_ID; case 4: // FIRST_N return FIRST_N; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DEVICE_ID_ISSET_ID = 0; private static final int __FIRST_N_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DEVICE_ID, new org.apache.thrift.meta_data.FieldMetaData("device_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.FIRST_N, new org.apache.thrift.meta_data.FieldMetaData("first_n", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sql_execute_gdf_args.class, metaDataMap); } public sql_execute_gdf_args() { this.device_id = 0; this.first_n = -1; } public sql_execute_gdf_args( java.lang.String session, java.lang.String query, int device_id, int first_n) { this(); this.session = session; this.query = query; this.device_id = device_id; setDevice_idIsSet(true); this.first_n = first_n; setFirst_nIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public sql_execute_gdf_args(sql_execute_gdf_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } if (other.isSetQuery()) { this.query = other.query; } this.device_id = other.device_id; this.first_n = other.first_n; } public sql_execute_gdf_args deepCopy() { return new sql_execute_gdf_args(this); } @Override public void clear() { this.session = null; this.query = null; this.device_id = 0; this.first_n = -1; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public sql_execute_gdf_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getQuery() { return this.query; } public sql_execute_gdf_args setQuery(@org.apache.thrift.annotation.Nullable java.lang.String query) { this.query = query; return this; } public void unsetQuery() { this.query = null; } /** Returns true if field query is set (has been assigned a value) and false otherwise */ public boolean isSetQuery() { return this.query != null; } public void setQueryIsSet(boolean value) { if (!value) { this.query = null; } } public int getDevice_id() { return this.device_id; } public sql_execute_gdf_args setDevice_id(int device_id) { this.device_id = device_id; setDevice_idIsSet(true); return this; } public void unsetDevice_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEVICE_ID_ISSET_ID); } /** Returns true if field device_id is set (has been assigned a value) and false otherwise */ public boolean isSetDevice_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEVICE_ID_ISSET_ID); } public void setDevice_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEVICE_ID_ISSET_ID, value); } public int getFirst_n() { return this.first_n; } public sql_execute_gdf_args setFirst_n(int first_n) { this.first_n = first_n; setFirst_nIsSet(true); return this; } public void unsetFirst_n() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FIRST_N_ISSET_ID); } /** Returns true if field first_n is set (has been assigned a value) and false otherwise */ public boolean isSetFirst_n() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FIRST_N_ISSET_ID); } public void setFirst_nIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FIRST_N_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case QUERY: if (value == null) { unsetQuery(); } else { setQuery((java.lang.String)value); } break; case DEVICE_ID: if (value == null) { unsetDevice_id(); } else { setDevice_id((java.lang.Integer)value); } break; case FIRST_N: if (value == null) { unsetFirst_n(); } else { setFirst_n((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case QUERY: return getQuery(); case DEVICE_ID: return getDevice_id(); case FIRST_N: return getFirst_n(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case QUERY: return isSetQuery(); case DEVICE_ID: return isSetDevice_id(); case FIRST_N: return isSetFirst_n(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof sql_execute_gdf_args) return this.equals((sql_execute_gdf_args)that); return false; } public boolean equals(sql_execute_gdf_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_query = true && this.isSetQuery(); boolean that_present_query = true && that.isSetQuery(); if (this_present_query || that_present_query) { if (!(this_present_query && that_present_query)) return false; if (!this.query.equals(that.query)) return false; } boolean this_present_device_id = true; boolean that_present_device_id = true; if (this_present_device_id || that_present_device_id) { if (!(this_present_device_id && that_present_device_id)) return false; if (this.device_id != that.device_id) return false; } boolean this_present_first_n = true; boolean that_present_first_n = true; if (this_present_first_n || that_present_first_n) { if (!(this_present_first_n && that_present_first_n)) return false; if (this.first_n != that.first_n) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287); if (isSetQuery()) hashCode = hashCode * 8191 + query.hashCode(); hashCode = hashCode * 8191 + device_id; hashCode = hashCode * 8191 + first_n; return hashCode; } @Override public int compareTo(sql_execute_gdf_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetQuery(), other.isSetQuery()); if (lastComparison != 0) { return lastComparison; } if (isSetQuery()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDevice_id(), other.isSetDevice_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDevice_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.device_id, other.device_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFirst_n(), other.isSetFirst_n()); if (lastComparison != 0) { return lastComparison; } if (isSetFirst_n()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.first_n, other.first_n); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("sql_execute_gdf_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("query:"); if (this.query == null) { sb.append("null"); } else { sb.append(this.query); } first = false; if (!first) sb.append(", "); sb.append("device_id:"); sb.append(this.device_id); first = false; if (!first) sb.append(", "); sb.append("first_n:"); sb.append(this.first_n); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class sql_execute_gdf_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_gdf_argsStandardScheme getScheme() { return new sql_execute_gdf_argsStandardScheme(); } } private static class sql_execute_gdf_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<sql_execute_gdf_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, sql_execute_gdf_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // QUERY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DEVICE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.device_id = iprot.readI32(); struct.setDevice_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // FIRST_N if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.first_n = iprot.readI32(); struct.setFirst_nIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sql_execute_gdf_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.query != null) { oprot.writeFieldBegin(QUERY_FIELD_DESC); oprot.writeString(struct.query); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DEVICE_ID_FIELD_DESC); oprot.writeI32(struct.device_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(FIRST_N_FIELD_DESC); oprot.writeI32(struct.first_n); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sql_execute_gdf_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_gdf_argsTupleScheme getScheme() { return new sql_execute_gdf_argsTupleScheme(); } } private static class sql_execute_gdf_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<sql_execute_gdf_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sql_execute_gdf_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetQuery()) { optionals.set(1); } if (struct.isSetDevice_id()) { optionals.set(2); } if (struct.isSetFirst_n()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetQuery()) { oprot.writeString(struct.query); } if (struct.isSetDevice_id()) { oprot.writeI32(struct.device_id); } if (struct.isSetFirst_n()) { oprot.writeI32(struct.first_n); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sql_execute_gdf_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } if (incoming.get(2)) { struct.device_id = iprot.readI32(); struct.setDevice_idIsSet(true); } if (incoming.get(3)) { struct.first_n = iprot.readI32(); struct.setFirst_nIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class sql_execute_gdf_result implements org.apache.thrift.TBase<sql_execute_gdf_result, sql_execute_gdf_result._Fields>, java.io.Serializable, Cloneable, Comparable<sql_execute_gdf_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sql_execute_gdf_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sql_execute_gdf_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sql_execute_gdf_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDataFrame success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDataFrame.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sql_execute_gdf_result.class, metaDataMap); } public sql_execute_gdf_result() { } public sql_execute_gdf_result( TDataFrame success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public sql_execute_gdf_result(sql_execute_gdf_result other) { if (other.isSetSuccess()) { this.success = new TDataFrame(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public sql_execute_gdf_result deepCopy() { return new sql_execute_gdf_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TDataFrame getSuccess() { return this.success; } public sql_execute_gdf_result setSuccess(@org.apache.thrift.annotation.Nullable TDataFrame success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public sql_execute_gdf_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TDataFrame)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof sql_execute_gdf_result) return this.equals((sql_execute_gdf_result)that); return false; } public boolean equals(sql_execute_gdf_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(sql_execute_gdf_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("sql_execute_gdf_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class sql_execute_gdf_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_gdf_resultStandardScheme getScheme() { return new sql_execute_gdf_resultStandardScheme(); } } private static class sql_execute_gdf_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<sql_execute_gdf_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, sql_execute_gdf_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TDataFrame(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sql_execute_gdf_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sql_execute_gdf_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_execute_gdf_resultTupleScheme getScheme() { return new sql_execute_gdf_resultTupleScheme(); } } private static class sql_execute_gdf_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<sql_execute_gdf_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sql_execute_gdf_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sql_execute_gdf_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TDataFrame(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class deallocate_df_args implements org.apache.thrift.TBase<deallocate_df_args, deallocate_df_args._Fields>, java.io.Serializable, Cloneable, Comparable<deallocate_df_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deallocate_df_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DF_FIELD_DESC = new org.apache.thrift.protocol.TField("df", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField DEVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("device_type", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField DEVICE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("device_id", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deallocate_df_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deallocate_df_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable TDataFrame df; // required /** * * @see ai.heavy.thrift.server.TDeviceType */ public @org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TDeviceType device_type; // required public int device_id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DF((short)2, "df"), /** * * @see ai.heavy.thrift.server.TDeviceType */ DEVICE_TYPE((short)3, "device_type"), DEVICE_ID((short)4, "device_id"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DF return DF; case 3: // DEVICE_TYPE return DEVICE_TYPE; case 4: // DEVICE_ID return DEVICE_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DEVICE_ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DF, new org.apache.thrift.meta_data.FieldMetaData("df", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDataFrame.class))); tmpMap.put(_Fields.DEVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("device_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ai.heavy.thrift.server.TDeviceType.class))); tmpMap.put(_Fields.DEVICE_ID, new org.apache.thrift.meta_data.FieldMetaData("device_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deallocate_df_args.class, metaDataMap); } public deallocate_df_args() { this.device_id = 0; } public deallocate_df_args( java.lang.String session, TDataFrame df, ai.heavy.thrift.server.TDeviceType device_type, int device_id) { this(); this.session = session; this.df = df; this.device_type = device_type; this.device_id = device_id; setDevice_idIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public deallocate_df_args(deallocate_df_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } if (other.isSetDf()) { this.df = new TDataFrame(other.df); } if (other.isSetDevice_type()) { this.device_type = other.device_type; } this.device_id = other.device_id; } public deallocate_df_args deepCopy() { return new deallocate_df_args(this); } @Override public void clear() { this.session = null; this.df = null; this.device_type = null; this.device_id = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public deallocate_df_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public TDataFrame getDf() { return this.df; } public deallocate_df_args setDf(@org.apache.thrift.annotation.Nullable TDataFrame df) { this.df = df; return this; } public void unsetDf() { this.df = null; } /** Returns true if field df is set (has been assigned a value) and false otherwise */ public boolean isSetDf() { return this.df != null; } public void setDfIsSet(boolean value) { if (!value) { this.df = null; } } /** * * @see ai.heavy.thrift.server.TDeviceType */ @org.apache.thrift.annotation.Nullable public ai.heavy.thrift.server.TDeviceType getDevice_type() { return this.device_type; } /** * * @see ai.heavy.thrift.server.TDeviceType */ public deallocate_df_args setDevice_type(@org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TDeviceType device_type) { this.device_type = device_type; return this; } public void unsetDevice_type() { this.device_type = null; } /** Returns true if field device_type is set (has been assigned a value) and false otherwise */ public boolean isSetDevice_type() { return this.device_type != null; } public void setDevice_typeIsSet(boolean value) { if (!value) { this.device_type = null; } } public int getDevice_id() { return this.device_id; } public deallocate_df_args setDevice_id(int device_id) { this.device_id = device_id; setDevice_idIsSet(true); return this; } public void unsetDevice_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEVICE_ID_ISSET_ID); } /** Returns true if field device_id is set (has been assigned a value) and false otherwise */ public boolean isSetDevice_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEVICE_ID_ISSET_ID); } public void setDevice_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEVICE_ID_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DF: if (value == null) { unsetDf(); } else { setDf((TDataFrame)value); } break; case DEVICE_TYPE: if (value == null) { unsetDevice_type(); } else { setDevice_type((ai.heavy.thrift.server.TDeviceType)value); } break; case DEVICE_ID: if (value == null) { unsetDevice_id(); } else { setDevice_id((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DF: return getDf(); case DEVICE_TYPE: return getDevice_type(); case DEVICE_ID: return getDevice_id(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DF: return isSetDf(); case DEVICE_TYPE: return isSetDevice_type(); case DEVICE_ID: return isSetDevice_id(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof deallocate_df_args) return this.equals((deallocate_df_args)that); return false; } public boolean equals(deallocate_df_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_df = true && this.isSetDf(); boolean that_present_df = true && that.isSetDf(); if (this_present_df || that_present_df) { if (!(this_present_df && that_present_df)) return false; if (!this.df.equals(that.df)) return false; } boolean this_present_device_type = true && this.isSetDevice_type(); boolean that_present_device_type = true && that.isSetDevice_type(); if (this_present_device_type || that_present_device_type) { if (!(this_present_device_type && that_present_device_type)) return false; if (!this.device_type.equals(that.device_type)) return false; } boolean this_present_device_id = true; boolean that_present_device_id = true; if (this_present_device_id || that_present_device_id) { if (!(this_present_device_id && that_present_device_id)) return false; if (this.device_id != that.device_id) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetDf()) ? 131071 : 524287); if (isSetDf()) hashCode = hashCode * 8191 + df.hashCode(); hashCode = hashCode * 8191 + ((isSetDevice_type()) ? 131071 : 524287); if (isSetDevice_type()) hashCode = hashCode * 8191 + device_type.getValue(); hashCode = hashCode * 8191 + device_id; return hashCode; } @Override public int compareTo(deallocate_df_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDf(), other.isSetDf()); if (lastComparison != 0) { return lastComparison; } if (isSetDf()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.df, other.df); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDevice_type(), other.isSetDevice_type()); if (lastComparison != 0) { return lastComparison; } if (isSetDevice_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.device_type, other.device_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDevice_id(), other.isSetDevice_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDevice_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.device_id, other.device_id); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("deallocate_df_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("df:"); if (this.df == null) { sb.append("null"); } else { sb.append(this.df); } first = false; if (!first) sb.append(", "); sb.append("device_type:"); if (this.device_type == null) { sb.append("null"); } else { sb.append(this.device_type); } first = false; if (!first) sb.append(", "); sb.append("device_id:"); sb.append(this.device_id); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (df != null) { df.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class deallocate_df_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public deallocate_df_argsStandardScheme getScheme() { return new deallocate_df_argsStandardScheme(); } } private static class deallocate_df_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<deallocate_df_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, deallocate_df_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DF if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.df = new TDataFrame(); struct.df.read(iprot); struct.setDfIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DEVICE_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.device_type = ai.heavy.thrift.server.TDeviceType.findByValue(iprot.readI32()); struct.setDevice_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DEVICE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.device_id = iprot.readI32(); struct.setDevice_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, deallocate_df_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.df != null) { oprot.writeFieldBegin(DF_FIELD_DESC); struct.df.write(oprot); oprot.writeFieldEnd(); } if (struct.device_type != null) { oprot.writeFieldBegin(DEVICE_TYPE_FIELD_DESC); oprot.writeI32(struct.device_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DEVICE_ID_FIELD_DESC); oprot.writeI32(struct.device_id); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deallocate_df_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public deallocate_df_argsTupleScheme getScheme() { return new deallocate_df_argsTupleScheme(); } } private static class deallocate_df_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deallocate_df_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deallocate_df_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDf()) { optionals.set(1); } if (struct.isSetDevice_type()) { optionals.set(2); } if (struct.isSetDevice_id()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDf()) { struct.df.write(oprot); } if (struct.isSetDevice_type()) { oprot.writeI32(struct.device_type.getValue()); } if (struct.isSetDevice_id()) { oprot.writeI32(struct.device_id); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deallocate_df_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.df = new TDataFrame(); struct.df.read(iprot); struct.setDfIsSet(true); } if (incoming.get(2)) { struct.device_type = ai.heavy.thrift.server.TDeviceType.findByValue(iprot.readI32()); struct.setDevice_typeIsSet(true); } if (incoming.get(3)) { struct.device_id = iprot.readI32(); struct.setDevice_idIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class deallocate_df_result implements org.apache.thrift.TBase<deallocate_df_result, deallocate_df_result._Fields>, java.io.Serializable, Cloneable, Comparable<deallocate_df_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deallocate_df_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deallocate_df_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deallocate_df_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deallocate_df_result.class, metaDataMap); } public deallocate_df_result() { } public deallocate_df_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public deallocate_df_result(deallocate_df_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public deallocate_df_result deepCopy() { return new deallocate_df_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public deallocate_df_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof deallocate_df_result) return this.equals((deallocate_df_result)that); return false; } public boolean equals(deallocate_df_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(deallocate_df_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("deallocate_df_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class deallocate_df_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public deallocate_df_resultStandardScheme getScheme() { return new deallocate_df_resultStandardScheme(); } } private static class deallocate_df_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<deallocate_df_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, deallocate_df_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, deallocate_df_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deallocate_df_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public deallocate_df_resultTupleScheme getScheme() { return new deallocate_df_resultTupleScheme(); } } private static class deallocate_df_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deallocate_df_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deallocate_df_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deallocate_df_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class interrupt_args implements org.apache.thrift.TBase<interrupt_args, interrupt_args._Fields>, java.io.Serializable, Cloneable, Comparable<interrupt_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("interrupt_args"); private static final org.apache.thrift.protocol.TField QUERY_SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("query_session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField INTERRUPT_SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("interrupt_session", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new interrupt_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new interrupt_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String query_session; // required public @org.apache.thrift.annotation.Nullable java.lang.String interrupt_session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { QUERY_SESSION((short)1, "query_session"), INTERRUPT_SESSION((short)2, "interrupt_session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // QUERY_SESSION return QUERY_SESSION; case 2: // INTERRUPT_SESSION return INTERRUPT_SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.QUERY_SESSION, new org.apache.thrift.meta_data.FieldMetaData("query_session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.INTERRUPT_SESSION, new org.apache.thrift.meta_data.FieldMetaData("interrupt_session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(interrupt_args.class, metaDataMap); } public interrupt_args() { } public interrupt_args( java.lang.String query_session, java.lang.String interrupt_session) { this(); this.query_session = query_session; this.interrupt_session = interrupt_session; } /** * Performs a deep copy on <i>other</i>. */ public interrupt_args(interrupt_args other) { if (other.isSetQuery_session()) { this.query_session = other.query_session; } if (other.isSetInterrupt_session()) { this.interrupt_session = other.interrupt_session; } } public interrupt_args deepCopy() { return new interrupt_args(this); } @Override public void clear() { this.query_session = null; this.interrupt_session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getQuery_session() { return this.query_session; } public interrupt_args setQuery_session(@org.apache.thrift.annotation.Nullable java.lang.String query_session) { this.query_session = query_session; return this; } public void unsetQuery_session() { this.query_session = null; } /** Returns true if field query_session is set (has been assigned a value) and false otherwise */ public boolean isSetQuery_session() { return this.query_session != null; } public void setQuery_sessionIsSet(boolean value) { if (!value) { this.query_session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getInterrupt_session() { return this.interrupt_session; } public interrupt_args setInterrupt_session(@org.apache.thrift.annotation.Nullable java.lang.String interrupt_session) { this.interrupt_session = interrupt_session; return this; } public void unsetInterrupt_session() { this.interrupt_session = null; } /** Returns true if field interrupt_session is set (has been assigned a value) and false otherwise */ public boolean isSetInterrupt_session() { return this.interrupt_session != null; } public void setInterrupt_sessionIsSet(boolean value) { if (!value) { this.interrupt_session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case QUERY_SESSION: if (value == null) { unsetQuery_session(); } else { setQuery_session((java.lang.String)value); } break; case INTERRUPT_SESSION: if (value == null) { unsetInterrupt_session(); } else { setInterrupt_session((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case QUERY_SESSION: return getQuery_session(); case INTERRUPT_SESSION: return getInterrupt_session(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case QUERY_SESSION: return isSetQuery_session(); case INTERRUPT_SESSION: return isSetInterrupt_session(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof interrupt_args) return this.equals((interrupt_args)that); return false; } public boolean equals(interrupt_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_query_session = true && this.isSetQuery_session(); boolean that_present_query_session = true && that.isSetQuery_session(); if (this_present_query_session || that_present_query_session) { if (!(this_present_query_session && that_present_query_session)) return false; if (!this.query_session.equals(that.query_session)) return false; } boolean this_present_interrupt_session = true && this.isSetInterrupt_session(); boolean that_present_interrupt_session = true && that.isSetInterrupt_session(); if (this_present_interrupt_session || that_present_interrupt_session) { if (!(this_present_interrupt_session && that_present_interrupt_session)) return false; if (!this.interrupt_session.equals(that.interrupt_session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetQuery_session()) ? 131071 : 524287); if (isSetQuery_session()) hashCode = hashCode * 8191 + query_session.hashCode(); hashCode = hashCode * 8191 + ((isSetInterrupt_session()) ? 131071 : 524287); if (isSetInterrupt_session()) hashCode = hashCode * 8191 + interrupt_session.hashCode(); return hashCode; } @Override public int compareTo(interrupt_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetQuery_session(), other.isSetQuery_session()); if (lastComparison != 0) { return lastComparison; } if (isSetQuery_session()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query_session, other.query_session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetInterrupt_session(), other.isSetInterrupt_session()); if (lastComparison != 0) { return lastComparison; } if (isSetInterrupt_session()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.interrupt_session, other.interrupt_session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("interrupt_args("); boolean first = true; sb.append("query_session:"); if (this.query_session == null) { sb.append("null"); } else { sb.append(this.query_session); } first = false; if (!first) sb.append(", "); sb.append("interrupt_session:"); if (this.interrupt_session == null) { sb.append("null"); } else { sb.append(this.interrupt_session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class interrupt_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public interrupt_argsStandardScheme getScheme() { return new interrupt_argsStandardScheme(); } } private static class interrupt_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<interrupt_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, interrupt_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // QUERY_SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.query_session = iprot.readString(); struct.setQuery_sessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // INTERRUPT_SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.interrupt_session = iprot.readString(); struct.setInterrupt_sessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, interrupt_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.query_session != null) { oprot.writeFieldBegin(QUERY_SESSION_FIELD_DESC); oprot.writeString(struct.query_session); oprot.writeFieldEnd(); } if (struct.interrupt_session != null) { oprot.writeFieldBegin(INTERRUPT_SESSION_FIELD_DESC); oprot.writeString(struct.interrupt_session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class interrupt_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public interrupt_argsTupleScheme getScheme() { return new interrupt_argsTupleScheme(); } } private static class interrupt_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<interrupt_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, interrupt_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetQuery_session()) { optionals.set(0); } if (struct.isSetInterrupt_session()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetQuery_session()) { oprot.writeString(struct.query_session); } if (struct.isSetInterrupt_session()) { oprot.writeString(struct.interrupt_session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, interrupt_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.query_session = iprot.readString(); struct.setQuery_sessionIsSet(true); } if (incoming.get(1)) { struct.interrupt_session = iprot.readString(); struct.setInterrupt_sessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class interrupt_result implements org.apache.thrift.TBase<interrupt_result, interrupt_result._Fields>, java.io.Serializable, Cloneable, Comparable<interrupt_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("interrupt_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new interrupt_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new interrupt_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(interrupt_result.class, metaDataMap); } public interrupt_result() { } public interrupt_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public interrupt_result(interrupt_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public interrupt_result deepCopy() { return new interrupt_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public interrupt_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof interrupt_result) return this.equals((interrupt_result)that); return false; } public boolean equals(interrupt_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(interrupt_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("interrupt_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class interrupt_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public interrupt_resultStandardScheme getScheme() { return new interrupt_resultStandardScheme(); } } private static class interrupt_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<interrupt_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, interrupt_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, interrupt_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class interrupt_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public interrupt_resultTupleScheme getScheme() { return new interrupt_resultTupleScheme(); } } private static class interrupt_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<interrupt_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, interrupt_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, interrupt_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class sql_validate_args implements org.apache.thrift.TBase<sql_validate_args, sql_validate_args._Fields>, java.io.Serializable, Cloneable, Comparable<sql_validate_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sql_validate_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sql_validate_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sql_validate_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String query; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), QUERY((short)2, "query"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // QUERY return QUERY; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sql_validate_args.class, metaDataMap); } public sql_validate_args() { } public sql_validate_args( java.lang.String session, java.lang.String query) { this(); this.session = session; this.query = query; } /** * Performs a deep copy on <i>other</i>. */ public sql_validate_args(sql_validate_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetQuery()) { this.query = other.query; } } public sql_validate_args deepCopy() { return new sql_validate_args(this); } @Override public void clear() { this.session = null; this.query = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public sql_validate_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getQuery() { return this.query; } public sql_validate_args setQuery(@org.apache.thrift.annotation.Nullable java.lang.String query) { this.query = query; return this; } public void unsetQuery() { this.query = null; } /** Returns true if field query is set (has been assigned a value) and false otherwise */ public boolean isSetQuery() { return this.query != null; } public void setQueryIsSet(boolean value) { if (!value) { this.query = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case QUERY: if (value == null) { unsetQuery(); } else { setQuery((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case QUERY: return getQuery(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case QUERY: return isSetQuery(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof sql_validate_args) return this.equals((sql_validate_args)that); return false; } public boolean equals(sql_validate_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_query = true && this.isSetQuery(); boolean that_present_query = true && that.isSetQuery(); if (this_present_query || that_present_query) { if (!(this_present_query && that_present_query)) return false; if (!this.query.equals(that.query)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287); if (isSetQuery()) hashCode = hashCode * 8191 + query.hashCode(); return hashCode; } @Override public int compareTo(sql_validate_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetQuery(), other.isSetQuery()); if (lastComparison != 0) { return lastComparison; } if (isSetQuery()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("sql_validate_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("query:"); if (this.query == null) { sb.append("null"); } else { sb.append(this.query); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class sql_validate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_validate_argsStandardScheme getScheme() { return new sql_validate_argsStandardScheme(); } } private static class sql_validate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<sql_validate_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, sql_validate_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // QUERY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sql_validate_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.query != null) { oprot.writeFieldBegin(QUERY_FIELD_DESC); oprot.writeString(struct.query); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sql_validate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_validate_argsTupleScheme getScheme() { return new sql_validate_argsTupleScheme(); } } private static class sql_validate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<sql_validate_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sql_validate_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetQuery()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetQuery()) { oprot.writeString(struct.query); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sql_validate_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class sql_validate_result implements org.apache.thrift.TBase<sql_validate_result, sql_validate_result._Fields>, java.io.Serializable, Cloneable, Comparable<sql_validate_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sql_validate_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sql_validate_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sql_validate_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TColumnType> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "TRowDescriptor"))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sql_validate_result.class, metaDataMap); } public sql_validate_result() { } public sql_validate_result( java.util.List<TColumnType> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public sql_validate_result(sql_validate_result other) { if (other.isSetSuccess()) { java.util.List<TColumnType> __this__success = new java.util.ArrayList<TColumnType>(other.success.size()); for (TColumnType other_element : other.success) { __this__success.add(new TColumnType(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public sql_validate_result deepCopy() { return new sql_validate_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TColumnType> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TColumnType elem) { if (this.success == null) { this.success = new java.util.ArrayList<TColumnType>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TColumnType> getSuccess() { return this.success; } public sql_validate_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TColumnType> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public sql_validate_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TColumnType>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof sql_validate_result) return this.equals((sql_validate_result)that); return false; } public boolean equals(sql_validate_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(sql_validate_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("sql_validate_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class sql_validate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_validate_resultStandardScheme getScheme() { return new sql_validate_resultStandardScheme(); } } private static class sql_validate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<sql_validate_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, sql_validate_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list410 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TColumnType>(_list410.size); @org.apache.thrift.annotation.Nullable TColumnType _elem411; for (int _i412 = 0; _i412 < _list410.size; ++_i412) { _elem411 = new TColumnType(); _elem411.read(iprot); struct.success.add(_elem411); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sql_validate_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TColumnType _iter413 : struct.success) { _iter413.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sql_validate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public sql_validate_resultTupleScheme getScheme() { return new sql_validate_resultTupleScheme(); } } private static class sql_validate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<sql_validate_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sql_validate_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TColumnType _iter414 : struct.success) { _iter414.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sql_validate_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list415 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TColumnType>(_list415.size); @org.apache.thrift.annotation.Nullable TColumnType _elem416; for (int _i417 = 0; _i417 < _list415.size; ++_i417) { _elem416 = new TColumnType(); _elem416.read(iprot); struct.success.add(_elem416); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_completion_hints_args implements org.apache.thrift.TBase<get_completion_hints_args, get_completion_hints_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_completion_hints_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_completion_hints_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField SQL_FIELD_DESC = new org.apache.thrift.protocol.TField("sql", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField CURSOR_FIELD_DESC = new org.apache.thrift.protocol.TField("cursor", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_completion_hints_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_completion_hints_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String sql; // required public int cursor; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), SQL((short)2, "sql"), CURSOR((short)3, "cursor"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // SQL return SQL; case 3: // CURSOR return CURSOR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __CURSOR_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.SQL, new org.apache.thrift.meta_data.FieldMetaData("sql", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CURSOR, new org.apache.thrift.meta_data.FieldMetaData("cursor", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_completion_hints_args.class, metaDataMap); } public get_completion_hints_args() { } public get_completion_hints_args( java.lang.String session, java.lang.String sql, int cursor) { this(); this.session = session; this.sql = sql; this.cursor = cursor; setCursorIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public get_completion_hints_args(get_completion_hints_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } if (other.isSetSql()) { this.sql = other.sql; } this.cursor = other.cursor; } public get_completion_hints_args deepCopy() { return new get_completion_hints_args(this); } @Override public void clear() { this.session = null; this.sql = null; setCursorIsSet(false); this.cursor = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_completion_hints_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getSql() { return this.sql; } public get_completion_hints_args setSql(@org.apache.thrift.annotation.Nullable java.lang.String sql) { this.sql = sql; return this; } public void unsetSql() { this.sql = null; } /** Returns true if field sql is set (has been assigned a value) and false otherwise */ public boolean isSetSql() { return this.sql != null; } public void setSqlIsSet(boolean value) { if (!value) { this.sql = null; } } public int getCursor() { return this.cursor; } public get_completion_hints_args setCursor(int cursor) { this.cursor = cursor; setCursorIsSet(true); return this; } public void unsetCursor() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CURSOR_ISSET_ID); } /** Returns true if field cursor is set (has been assigned a value) and false otherwise */ public boolean isSetCursor() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CURSOR_ISSET_ID); } public void setCursorIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CURSOR_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case SQL: if (value == null) { unsetSql(); } else { setSql((java.lang.String)value); } break; case CURSOR: if (value == null) { unsetCursor(); } else { setCursor((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case SQL: return getSql(); case CURSOR: return getCursor(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case SQL: return isSetSql(); case CURSOR: return isSetCursor(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_completion_hints_args) return this.equals((get_completion_hints_args)that); return false; } public boolean equals(get_completion_hints_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_sql = true && this.isSetSql(); boolean that_present_sql = true && that.isSetSql(); if (this_present_sql || that_present_sql) { if (!(this_present_sql && that_present_sql)) return false; if (!this.sql.equals(that.sql)) return false; } boolean this_present_cursor = true; boolean that_present_cursor = true; if (this_present_cursor || that_present_cursor) { if (!(this_present_cursor && that_present_cursor)) return false; if (this.cursor != that.cursor) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetSql()) ? 131071 : 524287); if (isSetSql()) hashCode = hashCode * 8191 + sql.hashCode(); hashCode = hashCode * 8191 + cursor; return hashCode; } @Override public int compareTo(get_completion_hints_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSql(), other.isSetSql()); if (lastComparison != 0) { return lastComparison; } if (isSetSql()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sql, other.sql); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCursor(), other.isSetCursor()); if (lastComparison != 0) { return lastComparison; } if (isSetCursor()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cursor, other.cursor); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_completion_hints_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("sql:"); if (this.sql == null) { sb.append("null"); } else { sb.append(this.sql); } first = false; if (!first) sb.append(", "); sb.append("cursor:"); sb.append(this.cursor); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_completion_hints_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_completion_hints_argsStandardScheme getScheme() { return new get_completion_hints_argsStandardScheme(); } } private static class get_completion_hints_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_completion_hints_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_completion_hints_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SQL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.sql = iprot.readString(); struct.setSqlIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // CURSOR if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.cursor = iprot.readI32(); struct.setCursorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_completion_hints_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.sql != null) { oprot.writeFieldBegin(SQL_FIELD_DESC); oprot.writeString(struct.sql); oprot.writeFieldEnd(); } oprot.writeFieldBegin(CURSOR_FIELD_DESC); oprot.writeI32(struct.cursor); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_completion_hints_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_completion_hints_argsTupleScheme getScheme() { return new get_completion_hints_argsTupleScheme(); } } private static class get_completion_hints_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_completion_hints_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_completion_hints_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetSql()) { optionals.set(1); } if (struct.isSetCursor()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetSql()) { oprot.writeString(struct.sql); } if (struct.isSetCursor()) { oprot.writeI32(struct.cursor); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_completion_hints_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.sql = iprot.readString(); struct.setSqlIsSet(true); } if (incoming.get(2)) { struct.cursor = iprot.readI32(); struct.setCursorIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_completion_hints_result implements org.apache.thrift.TBase<get_completion_hints_result, get_completion_hints_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_completion_hints_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_completion_hints_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_completion_hints_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_completion_hints_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ai.heavy.thrift.calciteserver.TCompletionHint.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_completion_hints_result.class, metaDataMap); } public get_completion_hints_result() { } public get_completion_hints_result( java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_completion_hints_result(get_completion_hints_result other) { if (other.isSetSuccess()) { java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> __this__success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TCompletionHint>(other.success.size()); for (ai.heavy.thrift.calciteserver.TCompletionHint other_element : other.success) { __this__success.add(new ai.heavy.thrift.calciteserver.TCompletionHint(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_completion_hints_result deepCopy() { return new get_completion_hints_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<ai.heavy.thrift.calciteserver.TCompletionHint> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(ai.heavy.thrift.calciteserver.TCompletionHint elem) { if (this.success == null) { this.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TCompletionHint>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> getSuccess() { return this.success; } public get_completion_hints_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_completion_hints_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<ai.heavy.thrift.calciteserver.TCompletionHint>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_completion_hints_result) return this.equals((get_completion_hints_result)that); return false; } public boolean equals(get_completion_hints_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_completion_hints_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_completion_hints_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_completion_hints_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_completion_hints_resultStandardScheme getScheme() { return new get_completion_hints_resultStandardScheme(); } } private static class get_completion_hints_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_completion_hints_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_completion_hints_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list418 = iprot.readListBegin(); struct.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TCompletionHint>(_list418.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TCompletionHint _elem419; for (int _i420 = 0; _i420 < _list418.size; ++_i420) { _elem419 = new ai.heavy.thrift.calciteserver.TCompletionHint(); _elem419.read(iprot); struct.success.add(_elem419); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_completion_hints_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (ai.heavy.thrift.calciteserver.TCompletionHint _iter421 : struct.success) { _iter421.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_completion_hints_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_completion_hints_resultTupleScheme getScheme() { return new get_completion_hints_resultTupleScheme(); } } private static class get_completion_hints_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_completion_hints_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_completion_hints_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (ai.heavy.thrift.calciteserver.TCompletionHint _iter422 : struct.success) { _iter422.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_completion_hints_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list423 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TCompletionHint>(_list423.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TCompletionHint _elem424; for (int _i425 = 0; _i425 < _list423.size; ++_i425) { _elem424 = new ai.heavy.thrift.calciteserver.TCompletionHint(); _elem424.read(iprot); struct.success.add(_elem424); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_execution_mode_args implements org.apache.thrift.TBase<set_execution_mode_args, set_execution_mode_args._Fields>, java.io.Serializable, Cloneable, Comparable<set_execution_mode_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_execution_mode_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("mode", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_execution_mode_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_execution_mode_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** * * @see TExecuteMode */ public @org.apache.thrift.annotation.Nullable TExecuteMode mode; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), /** * * @see TExecuteMode */ MODE((short)2, "mode"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // MODE return MODE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.MODE, new org.apache.thrift.meta_data.FieldMetaData("mode", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TExecuteMode.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_execution_mode_args.class, metaDataMap); } public set_execution_mode_args() { } public set_execution_mode_args( java.lang.String session, TExecuteMode mode) { this(); this.session = session; this.mode = mode; } /** * Performs a deep copy on <i>other</i>. */ public set_execution_mode_args(set_execution_mode_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetMode()) { this.mode = other.mode; } } public set_execution_mode_args deepCopy() { return new set_execution_mode_args(this); } @Override public void clear() { this.session = null; this.mode = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public set_execution_mode_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } /** * * @see TExecuteMode */ @org.apache.thrift.annotation.Nullable public TExecuteMode getMode() { return this.mode; } /** * * @see TExecuteMode */ public set_execution_mode_args setMode(@org.apache.thrift.annotation.Nullable TExecuteMode mode) { this.mode = mode; return this; } public void unsetMode() { this.mode = null; } /** Returns true if field mode is set (has been assigned a value) and false otherwise */ public boolean isSetMode() { return this.mode != null; } public void setModeIsSet(boolean value) { if (!value) { this.mode = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case MODE: if (value == null) { unsetMode(); } else { setMode((TExecuteMode)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case MODE: return getMode(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case MODE: return isSetMode(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_execution_mode_args) return this.equals((set_execution_mode_args)that); return false; } public boolean equals(set_execution_mode_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_mode = true && this.isSetMode(); boolean that_present_mode = true && that.isSetMode(); if (this_present_mode || that_present_mode) { if (!(this_present_mode && that_present_mode)) return false; if (!this.mode.equals(that.mode)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetMode()) ? 131071 : 524287); if (isSetMode()) hashCode = hashCode * 8191 + mode.getValue(); return hashCode; } @Override public int compareTo(set_execution_mode_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetMode(), other.isSetMode()); if (lastComparison != 0) { return lastComparison; } if (isSetMode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mode, other.mode); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_execution_mode_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("mode:"); if (this.mode == null) { sb.append("null"); } else { sb.append(this.mode); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_execution_mode_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_execution_mode_argsStandardScheme getScheme() { return new set_execution_mode_argsStandardScheme(); } } private static class set_execution_mode_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_execution_mode_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_execution_mode_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // MODE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.mode = ai.heavy.thrift.server.TExecuteMode.findByValue(iprot.readI32()); struct.setModeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_execution_mode_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.mode != null) { oprot.writeFieldBegin(MODE_FIELD_DESC); oprot.writeI32(struct.mode.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_execution_mode_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_execution_mode_argsTupleScheme getScheme() { return new set_execution_mode_argsTupleScheme(); } } private static class set_execution_mode_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_execution_mode_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_execution_mode_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetMode()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetMode()) { oprot.writeI32(struct.mode.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_execution_mode_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.mode = ai.heavy.thrift.server.TExecuteMode.findByValue(iprot.readI32()); struct.setModeIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_execution_mode_result implements org.apache.thrift.TBase<set_execution_mode_result, set_execution_mode_result._Fields>, java.io.Serializable, Cloneable, Comparable<set_execution_mode_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_execution_mode_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_execution_mode_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_execution_mode_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_execution_mode_result.class, metaDataMap); } public set_execution_mode_result() { } public set_execution_mode_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public set_execution_mode_result(set_execution_mode_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public set_execution_mode_result deepCopy() { return new set_execution_mode_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public set_execution_mode_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_execution_mode_result) return this.equals((set_execution_mode_result)that); return false; } public boolean equals(set_execution_mode_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(set_execution_mode_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_execution_mode_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_execution_mode_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_execution_mode_resultStandardScheme getScheme() { return new set_execution_mode_resultStandardScheme(); } } private static class set_execution_mode_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_execution_mode_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_execution_mode_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_execution_mode_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_execution_mode_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_execution_mode_resultTupleScheme getScheme() { return new set_execution_mode_resultTupleScheme(); } } private static class set_execution_mode_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_execution_mode_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_execution_mode_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_execution_mode_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class render_vega_args implements org.apache.thrift.TBase<render_vega_args, render_vega_args._Fields>, java.io.Serializable, Cloneable, Comparable<render_vega_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("render_vega_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField WIDGET_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("widget_id", org.apache.thrift.protocol.TType.I64, (short)2); private static final org.apache.thrift.protocol.TField VEGA_JSON_FIELD_DESC = new org.apache.thrift.protocol.TField("vega_json", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField COMPRESSION_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("compression_level", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.protocol.TField NONCE_FIELD_DESC = new org.apache.thrift.protocol.TField("nonce", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new render_vega_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new render_vega_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public long widget_id; // required public @org.apache.thrift.annotation.Nullable java.lang.String vega_json; // required public int compression_level; // required public @org.apache.thrift.annotation.Nullable java.lang.String nonce; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), WIDGET_ID((short)2, "widget_id"), VEGA_JSON((short)3, "vega_json"), COMPRESSION_LEVEL((short)4, "compression_level"), NONCE((short)5, "nonce"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // WIDGET_ID return WIDGET_ID; case 3: // VEGA_JSON return VEGA_JSON; case 4: // COMPRESSION_LEVEL return COMPRESSION_LEVEL; case 5: // NONCE return NONCE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __WIDGET_ID_ISSET_ID = 0; private static final int __COMPRESSION_LEVEL_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.WIDGET_ID, new org.apache.thrift.meta_data.FieldMetaData("widget_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.VEGA_JSON, new org.apache.thrift.meta_data.FieldMetaData("vega_json", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COMPRESSION_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("compression_level", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.NONCE, new org.apache.thrift.meta_data.FieldMetaData("nonce", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(render_vega_args.class, metaDataMap); } public render_vega_args() { } public render_vega_args( java.lang.String session, long widget_id, java.lang.String vega_json, int compression_level, java.lang.String nonce) { this(); this.session = session; this.widget_id = widget_id; setWidget_idIsSet(true); this.vega_json = vega_json; this.compression_level = compression_level; setCompression_levelIsSet(true); this.nonce = nonce; } /** * Performs a deep copy on <i>other</i>. */ public render_vega_args(render_vega_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.widget_id = other.widget_id; if (other.isSetVega_json()) { this.vega_json = other.vega_json; } this.compression_level = other.compression_level; if (other.isSetNonce()) { this.nonce = other.nonce; } } public render_vega_args deepCopy() { return new render_vega_args(this); } @Override public void clear() { this.session = null; setWidget_idIsSet(false); this.widget_id = 0; this.vega_json = null; setCompression_levelIsSet(false); this.compression_level = 0; this.nonce = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public render_vega_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public long getWidget_id() { return this.widget_id; } public render_vega_args setWidget_id(long widget_id) { this.widget_id = widget_id; setWidget_idIsSet(true); return this; } public void unsetWidget_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WIDGET_ID_ISSET_ID); } /** Returns true if field widget_id is set (has been assigned a value) and false otherwise */ public boolean isSetWidget_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WIDGET_ID_ISSET_ID); } public void setWidget_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WIDGET_ID_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getVega_json() { return this.vega_json; } public render_vega_args setVega_json(@org.apache.thrift.annotation.Nullable java.lang.String vega_json) { this.vega_json = vega_json; return this; } public void unsetVega_json() { this.vega_json = null; } /** Returns true if field vega_json is set (has been assigned a value) and false otherwise */ public boolean isSetVega_json() { return this.vega_json != null; } public void setVega_jsonIsSet(boolean value) { if (!value) { this.vega_json = null; } } public int getCompression_level() { return this.compression_level; } public render_vega_args setCompression_level(int compression_level) { this.compression_level = compression_level; setCompression_levelIsSet(true); return this; } public void unsetCompression_level() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPRESSION_LEVEL_ISSET_ID); } /** Returns true if field compression_level is set (has been assigned a value) and false otherwise */ public boolean isSetCompression_level() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPRESSION_LEVEL_ISSET_ID); } public void setCompression_levelIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPRESSION_LEVEL_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getNonce() { return this.nonce; } public render_vega_args setNonce(@org.apache.thrift.annotation.Nullable java.lang.String nonce) { this.nonce = nonce; return this; } public void unsetNonce() { this.nonce = null; } /** Returns true if field nonce is set (has been assigned a value) and false otherwise */ public boolean isSetNonce() { return this.nonce != null; } public void setNonceIsSet(boolean value) { if (!value) { this.nonce = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case WIDGET_ID: if (value == null) { unsetWidget_id(); } else { setWidget_id((java.lang.Long)value); } break; case VEGA_JSON: if (value == null) { unsetVega_json(); } else { setVega_json((java.lang.String)value); } break; case COMPRESSION_LEVEL: if (value == null) { unsetCompression_level(); } else { setCompression_level((java.lang.Integer)value); } break; case NONCE: if (value == null) { unsetNonce(); } else { setNonce((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case WIDGET_ID: return getWidget_id(); case VEGA_JSON: return getVega_json(); case COMPRESSION_LEVEL: return getCompression_level(); case NONCE: return getNonce(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case WIDGET_ID: return isSetWidget_id(); case VEGA_JSON: return isSetVega_json(); case COMPRESSION_LEVEL: return isSetCompression_level(); case NONCE: return isSetNonce(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof render_vega_args) return this.equals((render_vega_args)that); return false; } public boolean equals(render_vega_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_widget_id = true; boolean that_present_widget_id = true; if (this_present_widget_id || that_present_widget_id) { if (!(this_present_widget_id && that_present_widget_id)) return false; if (this.widget_id != that.widget_id) return false; } boolean this_present_vega_json = true && this.isSetVega_json(); boolean that_present_vega_json = true && that.isSetVega_json(); if (this_present_vega_json || that_present_vega_json) { if (!(this_present_vega_json && that_present_vega_json)) return false; if (!this.vega_json.equals(that.vega_json)) return false; } boolean this_present_compression_level = true; boolean that_present_compression_level = true; if (this_present_compression_level || that_present_compression_level) { if (!(this_present_compression_level && that_present_compression_level)) return false; if (this.compression_level != that.compression_level) return false; } boolean this_present_nonce = true && this.isSetNonce(); boolean that_present_nonce = true && that.isSetNonce(); if (this_present_nonce || that_present_nonce) { if (!(this_present_nonce && that_present_nonce)) return false; if (!this.nonce.equals(that.nonce)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(widget_id); hashCode = hashCode * 8191 + ((isSetVega_json()) ? 131071 : 524287); if (isSetVega_json()) hashCode = hashCode * 8191 + vega_json.hashCode(); hashCode = hashCode * 8191 + compression_level; hashCode = hashCode * 8191 + ((isSetNonce()) ? 131071 : 524287); if (isSetNonce()) hashCode = hashCode * 8191 + nonce.hashCode(); return hashCode; } @Override public int compareTo(render_vega_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetWidget_id(), other.isSetWidget_id()); if (lastComparison != 0) { return lastComparison; } if (isSetWidget_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.widget_id, other.widget_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetVega_json(), other.isSetVega_json()); if (lastComparison != 0) { return lastComparison; } if (isSetVega_json()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vega_json, other.vega_json); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCompression_level(), other.isSetCompression_level()); if (lastComparison != 0) { return lastComparison; } if (isSetCompression_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compression_level, other.compression_level); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNonce(), other.isSetNonce()); if (lastComparison != 0) { return lastComparison; } if (isSetNonce()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonce, other.nonce); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("render_vega_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("widget_id:"); sb.append(this.widget_id); first = false; if (!first) sb.append(", "); sb.append("vega_json:"); if (this.vega_json == null) { sb.append("null"); } else { sb.append(this.vega_json); } first = false; if (!first) sb.append(", "); sb.append("compression_level:"); sb.append(this.compression_level); first = false; if (!first) sb.append(", "); sb.append("nonce:"); if (this.nonce == null) { sb.append("null"); } else { sb.append(this.nonce); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class render_vega_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public render_vega_argsStandardScheme getScheme() { return new render_vega_argsStandardScheme(); } } private static class render_vega_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<render_vega_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, render_vega_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // WIDGET_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.widget_id = iprot.readI64(); struct.setWidget_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // VEGA_JSON if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.vega_json = iprot.readString(); struct.setVega_jsonIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // COMPRESSION_LEVEL if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.compression_level = iprot.readI32(); struct.setCompression_levelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // NONCE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.nonce = iprot.readString(); struct.setNonceIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, render_vega_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC); oprot.writeI64(struct.widget_id); oprot.writeFieldEnd(); if (struct.vega_json != null) { oprot.writeFieldBegin(VEGA_JSON_FIELD_DESC); oprot.writeString(struct.vega_json); oprot.writeFieldEnd(); } oprot.writeFieldBegin(COMPRESSION_LEVEL_FIELD_DESC); oprot.writeI32(struct.compression_level); oprot.writeFieldEnd(); if (struct.nonce != null) { oprot.writeFieldBegin(NONCE_FIELD_DESC); oprot.writeString(struct.nonce); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class render_vega_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public render_vega_argsTupleScheme getScheme() { return new render_vega_argsTupleScheme(); } } private static class render_vega_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<render_vega_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, render_vega_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetWidget_id()) { optionals.set(1); } if (struct.isSetVega_json()) { optionals.set(2); } if (struct.isSetCompression_level()) { optionals.set(3); } if (struct.isSetNonce()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetWidget_id()) { oprot.writeI64(struct.widget_id); } if (struct.isSetVega_json()) { oprot.writeString(struct.vega_json); } if (struct.isSetCompression_level()) { oprot.writeI32(struct.compression_level); } if (struct.isSetNonce()) { oprot.writeString(struct.nonce); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, render_vega_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.widget_id = iprot.readI64(); struct.setWidget_idIsSet(true); } if (incoming.get(2)) { struct.vega_json = iprot.readString(); struct.setVega_jsonIsSet(true); } if (incoming.get(3)) { struct.compression_level = iprot.readI32(); struct.setCompression_levelIsSet(true); } if (incoming.get(4)) { struct.nonce = iprot.readString(); struct.setNonceIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class render_vega_result implements org.apache.thrift.TBase<render_vega_result, render_vega_result._Fields>, java.io.Serializable, Cloneable, Comparable<render_vega_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("render_vega_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new render_vega_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new render_vega_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TRenderResult success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRenderResult.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(render_vega_result.class, metaDataMap); } public render_vega_result() { } public render_vega_result( TRenderResult success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public render_vega_result(render_vega_result other) { if (other.isSetSuccess()) { this.success = new TRenderResult(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public render_vega_result deepCopy() { return new render_vega_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TRenderResult getSuccess() { return this.success; } public render_vega_result setSuccess(@org.apache.thrift.annotation.Nullable TRenderResult success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public render_vega_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TRenderResult)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof render_vega_result) return this.equals((render_vega_result)that); return false; } public boolean equals(render_vega_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(render_vega_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("render_vega_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class render_vega_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public render_vega_resultStandardScheme getScheme() { return new render_vega_resultStandardScheme(); } } private static class render_vega_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<render_vega_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, render_vega_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TRenderResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, render_vega_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class render_vega_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public render_vega_resultTupleScheme getScheme() { return new render_vega_resultTupleScheme(); } } private static class render_vega_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<render_vega_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, render_vega_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, render_vega_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TRenderResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_result_row_for_pixel_args implements org.apache.thrift.TBase<get_result_row_for_pixel_args, get_result_row_for_pixel_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_result_row_for_pixel_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result_row_for_pixel_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField WIDGET_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("widget_id", org.apache.thrift.protocol.TType.I64, (short)2); private static final org.apache.thrift.protocol.TField PIXEL_FIELD_DESC = new org.apache.thrift.protocol.TField("pixel", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField TABLE_COL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("table_col_names", org.apache.thrift.protocol.TType.MAP, (short)4); private static final org.apache.thrift.protocol.TField COLUMN_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("column_format", org.apache.thrift.protocol.TType.BOOL, (short)5); private static final org.apache.thrift.protocol.TField PIXEL_RADIUS_FIELD_DESC = new org.apache.thrift.protocol.TField("pixelRadius", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.protocol.TField NONCE_FIELD_DESC = new org.apache.thrift.protocol.TField("nonce", org.apache.thrift.protocol.TType.STRING, (short)7); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_result_row_for_pixel_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_result_row_for_pixel_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public long widget_id; // required public @org.apache.thrift.annotation.Nullable TPixel pixel; // required public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.util.List<java.lang.String>> table_col_names; // required public boolean column_format; // required public int pixelRadius; // required public @org.apache.thrift.annotation.Nullable java.lang.String nonce; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), WIDGET_ID((short)2, "widget_id"), PIXEL((short)3, "pixel"), TABLE_COL_NAMES((short)4, "table_col_names"), COLUMN_FORMAT((short)5, "column_format"), PIXEL_RADIUS((short)6, "pixelRadius"), NONCE((short)7, "nonce"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // WIDGET_ID return WIDGET_ID; case 3: // PIXEL return PIXEL; case 4: // TABLE_COL_NAMES return TABLE_COL_NAMES; case 5: // COLUMN_FORMAT return COLUMN_FORMAT; case 6: // PIXEL_RADIUS return PIXEL_RADIUS; case 7: // NONCE return NONCE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __WIDGET_ID_ISSET_ID = 0; private static final int __COLUMN_FORMAT_ISSET_ID = 1; private static final int __PIXELRADIUS_ISSET_ID = 2; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.WIDGET_ID, new org.apache.thrift.meta_data.FieldMetaData("widget_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.PIXEL, new org.apache.thrift.meta_data.FieldMetaData("pixel", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPixel.class))); tmpMap.put(_Fields.TABLE_COL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("table_col_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); tmpMap.put(_Fields.COLUMN_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("column_format", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.PIXEL_RADIUS, new org.apache.thrift.meta_data.FieldMetaData("pixelRadius", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.NONCE, new org.apache.thrift.meta_data.FieldMetaData("nonce", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result_row_for_pixel_args.class, metaDataMap); } public get_result_row_for_pixel_args() { } public get_result_row_for_pixel_args( java.lang.String session, long widget_id, TPixel pixel, java.util.Map<java.lang.String,java.util.List<java.lang.String>> table_col_names, boolean column_format, int pixelRadius, java.lang.String nonce) { this(); this.session = session; this.widget_id = widget_id; setWidget_idIsSet(true); this.pixel = pixel; this.table_col_names = table_col_names; this.column_format = column_format; setColumn_formatIsSet(true); this.pixelRadius = pixelRadius; setPixelRadiusIsSet(true); this.nonce = nonce; } /** * Performs a deep copy on <i>other</i>. */ public get_result_row_for_pixel_args(get_result_row_for_pixel_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.widget_id = other.widget_id; if (other.isSetPixel()) { this.pixel = new TPixel(other.pixel); } if (other.isSetTable_col_names()) { java.util.Map<java.lang.String,java.util.List<java.lang.String>> __this__table_col_names = new java.util.HashMap<java.lang.String,java.util.List<java.lang.String>>(other.table_col_names.size()); for (java.util.Map.Entry<java.lang.String, java.util.List<java.lang.String>> other_element : other.table_col_names.entrySet()) { java.lang.String other_element_key = other_element.getKey(); java.util.List<java.lang.String> other_element_value = other_element.getValue(); java.lang.String __this__table_col_names_copy_key = other_element_key; java.util.List<java.lang.String> __this__table_col_names_copy_value = new java.util.ArrayList<java.lang.String>(other_element_value); __this__table_col_names.put(__this__table_col_names_copy_key, __this__table_col_names_copy_value); } this.table_col_names = __this__table_col_names; } this.column_format = other.column_format; this.pixelRadius = other.pixelRadius; if (other.isSetNonce()) { this.nonce = other.nonce; } } public get_result_row_for_pixel_args deepCopy() { return new get_result_row_for_pixel_args(this); } @Override public void clear() { this.session = null; setWidget_idIsSet(false); this.widget_id = 0; this.pixel = null; this.table_col_names = null; setColumn_formatIsSet(false); this.column_format = false; setPixelRadiusIsSet(false); this.pixelRadius = 0; this.nonce = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_result_row_for_pixel_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public long getWidget_id() { return this.widget_id; } public get_result_row_for_pixel_args setWidget_id(long widget_id) { this.widget_id = widget_id; setWidget_idIsSet(true); return this; } public void unsetWidget_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WIDGET_ID_ISSET_ID); } /** Returns true if field widget_id is set (has been assigned a value) and false otherwise */ public boolean isSetWidget_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WIDGET_ID_ISSET_ID); } public void setWidget_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WIDGET_ID_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public TPixel getPixel() { return this.pixel; } public get_result_row_for_pixel_args setPixel(@org.apache.thrift.annotation.Nullable TPixel pixel) { this.pixel = pixel; return this; } public void unsetPixel() { this.pixel = null; } /** Returns true if field pixel is set (has been assigned a value) and false otherwise */ public boolean isSetPixel() { return this.pixel != null; } public void setPixelIsSet(boolean value) { if (!value) { this.pixel = null; } } public int getTable_col_namesSize() { return (this.table_col_names == null) ? 0 : this.table_col_names.size(); } public void putToTable_col_names(java.lang.String key, java.util.List<java.lang.String> val) { if (this.table_col_names == null) { this.table_col_names = new java.util.HashMap<java.lang.String,java.util.List<java.lang.String>>(); } this.table_col_names.put(key, val); } @org.apache.thrift.annotation.Nullable public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getTable_col_names() { return this.table_col_names; } public get_result_row_for_pixel_args setTable_col_names(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.util.List<java.lang.String>> table_col_names) { this.table_col_names = table_col_names; return this; } public void unsetTable_col_names() { this.table_col_names = null; } /** Returns true if field table_col_names is set (has been assigned a value) and false otherwise */ public boolean isSetTable_col_names() { return this.table_col_names != null; } public void setTable_col_namesIsSet(boolean value) { if (!value) { this.table_col_names = null; } } public boolean isColumn_format() { return this.column_format; } public get_result_row_for_pixel_args setColumn_format(boolean column_format) { this.column_format = column_format; setColumn_formatIsSet(true); return this; } public void unsetColumn_format() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMN_FORMAT_ISSET_ID); } /** Returns true if field column_format is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_format() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMN_FORMAT_ISSET_ID); } public void setColumn_formatIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMN_FORMAT_ISSET_ID, value); } public int getPixelRadius() { return this.pixelRadius; } public get_result_row_for_pixel_args setPixelRadius(int pixelRadius) { this.pixelRadius = pixelRadius; setPixelRadiusIsSet(true); return this; } public void unsetPixelRadius() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PIXELRADIUS_ISSET_ID); } /** Returns true if field pixelRadius is set (has been assigned a value) and false otherwise */ public boolean isSetPixelRadius() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PIXELRADIUS_ISSET_ID); } public void setPixelRadiusIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PIXELRADIUS_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getNonce() { return this.nonce; } public get_result_row_for_pixel_args setNonce(@org.apache.thrift.annotation.Nullable java.lang.String nonce) { this.nonce = nonce; return this; } public void unsetNonce() { this.nonce = null; } /** Returns true if field nonce is set (has been assigned a value) and false otherwise */ public boolean isSetNonce() { return this.nonce != null; } public void setNonceIsSet(boolean value) { if (!value) { this.nonce = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case WIDGET_ID: if (value == null) { unsetWidget_id(); } else { setWidget_id((java.lang.Long)value); } break; case PIXEL: if (value == null) { unsetPixel(); } else { setPixel((TPixel)value); } break; case TABLE_COL_NAMES: if (value == null) { unsetTable_col_names(); } else { setTable_col_names((java.util.Map<java.lang.String,java.util.List<java.lang.String>>)value); } break; case COLUMN_FORMAT: if (value == null) { unsetColumn_format(); } else { setColumn_format((java.lang.Boolean)value); } break; case PIXEL_RADIUS: if (value == null) { unsetPixelRadius(); } else { setPixelRadius((java.lang.Integer)value); } break; case NONCE: if (value == null) { unsetNonce(); } else { setNonce((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case WIDGET_ID: return getWidget_id(); case PIXEL: return getPixel(); case TABLE_COL_NAMES: return getTable_col_names(); case COLUMN_FORMAT: return isColumn_format(); case PIXEL_RADIUS: return getPixelRadius(); case NONCE: return getNonce(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case WIDGET_ID: return isSetWidget_id(); case PIXEL: return isSetPixel(); case TABLE_COL_NAMES: return isSetTable_col_names(); case COLUMN_FORMAT: return isSetColumn_format(); case PIXEL_RADIUS: return isSetPixelRadius(); case NONCE: return isSetNonce(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_result_row_for_pixel_args) return this.equals((get_result_row_for_pixel_args)that); return false; } public boolean equals(get_result_row_for_pixel_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_widget_id = true; boolean that_present_widget_id = true; if (this_present_widget_id || that_present_widget_id) { if (!(this_present_widget_id && that_present_widget_id)) return false; if (this.widget_id != that.widget_id) return false; } boolean this_present_pixel = true && this.isSetPixel(); boolean that_present_pixel = true && that.isSetPixel(); if (this_present_pixel || that_present_pixel) { if (!(this_present_pixel && that_present_pixel)) return false; if (!this.pixel.equals(that.pixel)) return false; } boolean this_present_table_col_names = true && this.isSetTable_col_names(); boolean that_present_table_col_names = true && that.isSetTable_col_names(); if (this_present_table_col_names || that_present_table_col_names) { if (!(this_present_table_col_names && that_present_table_col_names)) return false; if (!this.table_col_names.equals(that.table_col_names)) return false; } boolean this_present_column_format = true; boolean that_present_column_format = true; if (this_present_column_format || that_present_column_format) { if (!(this_present_column_format && that_present_column_format)) return false; if (this.column_format != that.column_format) return false; } boolean this_present_pixelRadius = true; boolean that_present_pixelRadius = true; if (this_present_pixelRadius || that_present_pixelRadius) { if (!(this_present_pixelRadius && that_present_pixelRadius)) return false; if (this.pixelRadius != that.pixelRadius) return false; } boolean this_present_nonce = true && this.isSetNonce(); boolean that_present_nonce = true && that.isSetNonce(); if (this_present_nonce || that_present_nonce) { if (!(this_present_nonce && that_present_nonce)) return false; if (!this.nonce.equals(that.nonce)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(widget_id); hashCode = hashCode * 8191 + ((isSetPixel()) ? 131071 : 524287); if (isSetPixel()) hashCode = hashCode * 8191 + pixel.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_col_names()) ? 131071 : 524287); if (isSetTable_col_names()) hashCode = hashCode * 8191 + table_col_names.hashCode(); hashCode = hashCode * 8191 + ((column_format) ? 131071 : 524287); hashCode = hashCode * 8191 + pixelRadius; hashCode = hashCode * 8191 + ((isSetNonce()) ? 131071 : 524287); if (isSetNonce()) hashCode = hashCode * 8191 + nonce.hashCode(); return hashCode; } @Override public int compareTo(get_result_row_for_pixel_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetWidget_id(), other.isSetWidget_id()); if (lastComparison != 0) { return lastComparison; } if (isSetWidget_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.widget_id, other.widget_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPixel(), other.isSetPixel()); if (lastComparison != 0) { return lastComparison; } if (isSetPixel()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pixel, other.pixel); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_col_names(), other.isSetTable_col_names()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_col_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_col_names, other.table_col_names); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetColumn_format(), other.isSetColumn_format()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_format()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_format, other.column_format); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPixelRadius(), other.isSetPixelRadius()); if (lastComparison != 0) { return lastComparison; } if (isSetPixelRadius()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pixelRadius, other.pixelRadius); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNonce(), other.isSetNonce()); if (lastComparison != 0) { return lastComparison; } if (isSetNonce()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonce, other.nonce); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_result_row_for_pixel_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("widget_id:"); sb.append(this.widget_id); first = false; if (!first) sb.append(", "); sb.append("pixel:"); if (this.pixel == null) { sb.append("null"); } else { sb.append(this.pixel); } first = false; if (!first) sb.append(", "); sb.append("table_col_names:"); if (this.table_col_names == null) { sb.append("null"); } else { sb.append(this.table_col_names); } first = false; if (!first) sb.append(", "); sb.append("column_format:"); sb.append(this.column_format); first = false; if (!first) sb.append(", "); sb.append("pixelRadius:"); sb.append(this.pixelRadius); first = false; if (!first) sb.append(", "); sb.append("nonce:"); if (this.nonce == null) { sb.append("null"); } else { sb.append(this.nonce); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (pixel != null) { pixel.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_result_row_for_pixel_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_result_row_for_pixel_argsStandardScheme getScheme() { return new get_result_row_for_pixel_argsStandardScheme(); } } private static class get_result_row_for_pixel_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_result_row_for_pixel_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_result_row_for_pixel_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // WIDGET_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.widget_id = iprot.readI64(); struct.setWidget_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PIXEL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.pixel = new TPixel(); struct.pixel.read(iprot); struct.setPixelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // TABLE_COL_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map426 = iprot.readMapBegin(); struct.table_col_names = new java.util.HashMap<java.lang.String,java.util.List<java.lang.String>>(2*_map426.size); @org.apache.thrift.annotation.Nullable java.lang.String _key427; @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _val428; for (int _i429 = 0; _i429 < _map426.size; ++_i429) { _key427 = iprot.readString(); { org.apache.thrift.protocol.TList _list430 = iprot.readListBegin(); _val428 = new java.util.ArrayList<java.lang.String>(_list430.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem431; for (int _i432 = 0; _i432 < _list430.size; ++_i432) { _elem431 = iprot.readString(); _val428.add(_elem431); } iprot.readListEnd(); } struct.table_col_names.put(_key427, _val428); } iprot.readMapEnd(); } struct.setTable_col_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // COLUMN_FORMAT if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.column_format = iprot.readBool(); struct.setColumn_formatIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // PIXEL_RADIUS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.pixelRadius = iprot.readI32(); struct.setPixelRadiusIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // NONCE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.nonce = iprot.readString(); struct.setNonceIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_result_row_for_pixel_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC); oprot.writeI64(struct.widget_id); oprot.writeFieldEnd(); if (struct.pixel != null) { oprot.writeFieldBegin(PIXEL_FIELD_DESC); struct.pixel.write(oprot); oprot.writeFieldEnd(); } if (struct.table_col_names != null) { oprot.writeFieldBegin(TABLE_COL_NAMES_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.table_col_names.size())); for (java.util.Map.Entry<java.lang.String, java.util.List<java.lang.String>> _iter433 : struct.table_col_names.entrySet()) { oprot.writeString(_iter433.getKey()); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter433.getValue().size())); for (java.lang.String _iter434 : _iter433.getValue()) { oprot.writeString(_iter434); } oprot.writeListEnd(); } } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(COLUMN_FORMAT_FIELD_DESC); oprot.writeBool(struct.column_format); oprot.writeFieldEnd(); oprot.writeFieldBegin(PIXEL_RADIUS_FIELD_DESC); oprot.writeI32(struct.pixelRadius); oprot.writeFieldEnd(); if (struct.nonce != null) { oprot.writeFieldBegin(NONCE_FIELD_DESC); oprot.writeString(struct.nonce); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_result_row_for_pixel_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_result_row_for_pixel_argsTupleScheme getScheme() { return new get_result_row_for_pixel_argsTupleScheme(); } } private static class get_result_row_for_pixel_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_result_row_for_pixel_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_result_row_for_pixel_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetWidget_id()) { optionals.set(1); } if (struct.isSetPixel()) { optionals.set(2); } if (struct.isSetTable_col_names()) { optionals.set(3); } if (struct.isSetColumn_format()) { optionals.set(4); } if (struct.isSetPixelRadius()) { optionals.set(5); } if (struct.isSetNonce()) { optionals.set(6); } oprot.writeBitSet(optionals, 7); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetWidget_id()) { oprot.writeI64(struct.widget_id); } if (struct.isSetPixel()) { struct.pixel.write(oprot); } if (struct.isSetTable_col_names()) { { oprot.writeI32(struct.table_col_names.size()); for (java.util.Map.Entry<java.lang.String, java.util.List<java.lang.String>> _iter435 : struct.table_col_names.entrySet()) { oprot.writeString(_iter435.getKey()); { oprot.writeI32(_iter435.getValue().size()); for (java.lang.String _iter436 : _iter435.getValue()) { oprot.writeString(_iter436); } } } } } if (struct.isSetColumn_format()) { oprot.writeBool(struct.column_format); } if (struct.isSetPixelRadius()) { oprot.writeI32(struct.pixelRadius); } if (struct.isSetNonce()) { oprot.writeString(struct.nonce); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_result_row_for_pixel_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.widget_id = iprot.readI64(); struct.setWidget_idIsSet(true); } if (incoming.get(2)) { struct.pixel = new TPixel(); struct.pixel.read(iprot); struct.setPixelIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TMap _map437 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST); struct.table_col_names = new java.util.HashMap<java.lang.String,java.util.List<java.lang.String>>(2*_map437.size); @org.apache.thrift.annotation.Nullable java.lang.String _key438; @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _val439; for (int _i440 = 0; _i440 < _map437.size; ++_i440) { _key438 = iprot.readString(); { org.apache.thrift.protocol.TList _list441 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); _val439 = new java.util.ArrayList<java.lang.String>(_list441.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem442; for (int _i443 = 0; _i443 < _list441.size; ++_i443) { _elem442 = iprot.readString(); _val439.add(_elem442); } } struct.table_col_names.put(_key438, _val439); } } struct.setTable_col_namesIsSet(true); } if (incoming.get(4)) { struct.column_format = iprot.readBool(); struct.setColumn_formatIsSet(true); } if (incoming.get(5)) { struct.pixelRadius = iprot.readI32(); struct.setPixelRadiusIsSet(true); } if (incoming.get(6)) { struct.nonce = iprot.readString(); struct.setNonceIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_result_row_for_pixel_result implements org.apache.thrift.TBase<get_result_row_for_pixel_result, get_result_row_for_pixel_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_result_row_for_pixel_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result_row_for_pixel_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_result_row_for_pixel_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_result_row_for_pixel_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TPixelTableRowResult success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPixelTableRowResult.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result_row_for_pixel_result.class, metaDataMap); } public get_result_row_for_pixel_result() { } public get_result_row_for_pixel_result( TPixelTableRowResult success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_result_row_for_pixel_result(get_result_row_for_pixel_result other) { if (other.isSetSuccess()) { this.success = new TPixelTableRowResult(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_result_row_for_pixel_result deepCopy() { return new get_result_row_for_pixel_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TPixelTableRowResult getSuccess() { return this.success; } public get_result_row_for_pixel_result setSuccess(@org.apache.thrift.annotation.Nullable TPixelTableRowResult success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_result_row_for_pixel_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TPixelTableRowResult)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_result_row_for_pixel_result) return this.equals((get_result_row_for_pixel_result)that); return false; } public boolean equals(get_result_row_for_pixel_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_result_row_for_pixel_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_result_row_for_pixel_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_result_row_for_pixel_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_result_row_for_pixel_resultStandardScheme getScheme() { return new get_result_row_for_pixel_resultStandardScheme(); } } private static class get_result_row_for_pixel_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_result_row_for_pixel_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_result_row_for_pixel_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TPixelTableRowResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_result_row_for_pixel_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_result_row_for_pixel_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_result_row_for_pixel_resultTupleScheme getScheme() { return new get_result_row_for_pixel_resultTupleScheme(); } } private static class get_result_row_for_pixel_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_result_row_for_pixel_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_result_row_for_pixel_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_result_row_for_pixel_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TPixelTableRowResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class create_custom_expression_args implements org.apache.thrift.TBase<create_custom_expression_args, create_custom_expression_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_custom_expression_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_custom_expression_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField CUSTOM_EXPRESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("custom_expression", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_custom_expression_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_custom_expression_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable TCustomExpression custom_expression; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), CUSTOM_EXPRESSION((short)2, "custom_expression"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // CUSTOM_EXPRESSION return CUSTOM_EXPRESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.CUSTOM_EXPRESSION, new org.apache.thrift.meta_data.FieldMetaData("custom_expression", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCustomExpression.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_custom_expression_args.class, metaDataMap); } public create_custom_expression_args() { } public create_custom_expression_args( java.lang.String session, TCustomExpression custom_expression) { this(); this.session = session; this.custom_expression = custom_expression; } /** * Performs a deep copy on <i>other</i>. */ public create_custom_expression_args(create_custom_expression_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetCustom_expression()) { this.custom_expression = new TCustomExpression(other.custom_expression); } } public create_custom_expression_args deepCopy() { return new create_custom_expression_args(this); } @Override public void clear() { this.session = null; this.custom_expression = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public create_custom_expression_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public TCustomExpression getCustom_expression() { return this.custom_expression; } public create_custom_expression_args setCustom_expression(@org.apache.thrift.annotation.Nullable TCustomExpression custom_expression) { this.custom_expression = custom_expression; return this; } public void unsetCustom_expression() { this.custom_expression = null; } /** Returns true if field custom_expression is set (has been assigned a value) and false otherwise */ public boolean isSetCustom_expression() { return this.custom_expression != null; } public void setCustom_expressionIsSet(boolean value) { if (!value) { this.custom_expression = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case CUSTOM_EXPRESSION: if (value == null) { unsetCustom_expression(); } else { setCustom_expression((TCustomExpression)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case CUSTOM_EXPRESSION: return getCustom_expression(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case CUSTOM_EXPRESSION: return isSetCustom_expression(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof create_custom_expression_args) return this.equals((create_custom_expression_args)that); return false; } public boolean equals(create_custom_expression_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_custom_expression = true && this.isSetCustom_expression(); boolean that_present_custom_expression = true && that.isSetCustom_expression(); if (this_present_custom_expression || that_present_custom_expression) { if (!(this_present_custom_expression && that_present_custom_expression)) return false; if (!this.custom_expression.equals(that.custom_expression)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetCustom_expression()) ? 131071 : 524287); if (isSetCustom_expression()) hashCode = hashCode * 8191 + custom_expression.hashCode(); return hashCode; } @Override public int compareTo(create_custom_expression_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCustom_expression(), other.isSetCustom_expression()); if (lastComparison != 0) { return lastComparison; } if (isSetCustom_expression()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.custom_expression, other.custom_expression); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("create_custom_expression_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("custom_expression:"); if (this.custom_expression == null) { sb.append("null"); } else { sb.append(this.custom_expression); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (custom_expression != null) { custom_expression.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_custom_expression_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_custom_expression_argsStandardScheme getScheme() { return new create_custom_expression_argsStandardScheme(); } } private static class create_custom_expression_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<create_custom_expression_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, create_custom_expression_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // CUSTOM_EXPRESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.custom_expression = new TCustomExpression(); struct.custom_expression.read(iprot); struct.setCustom_expressionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_custom_expression_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.custom_expression != null) { oprot.writeFieldBegin(CUSTOM_EXPRESSION_FIELD_DESC); struct.custom_expression.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_custom_expression_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_custom_expression_argsTupleScheme getScheme() { return new create_custom_expression_argsTupleScheme(); } } private static class create_custom_expression_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<create_custom_expression_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_custom_expression_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetCustom_expression()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetCustom_expression()) { struct.custom_expression.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_custom_expression_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.custom_expression = new TCustomExpression(); struct.custom_expression.read(iprot); struct.setCustom_expressionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class create_custom_expression_result implements org.apache.thrift.TBase<create_custom_expression_result, create_custom_expression_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_custom_expression_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_custom_expression_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_custom_expression_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_custom_expression_resultTupleSchemeFactory(); public int success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_custom_expression_result.class, metaDataMap); } public create_custom_expression_result() { } public create_custom_expression_result( int success, TDBException e) { this(); this.success = success; setSuccessIsSet(true); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public create_custom_expression_result(create_custom_expression_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetE()) { this.e = new TDBException(other.e); } } public create_custom_expression_result deepCopy() { return new create_custom_expression_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.e = null; } public int getSuccess() { return this.success; } public create_custom_expression_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public create_custom_expression_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.Integer)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof create_custom_expression_result) return this.equals((create_custom_expression_result)that); return false; } public boolean equals(create_custom_expression_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + success; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(create_custom_expression_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("create_custom_expression_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_custom_expression_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_custom_expression_resultStandardScheme getScheme() { return new create_custom_expression_resultStandardScheme(); } } private static class create_custom_expression_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<create_custom_expression_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, create_custom_expression_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_custom_expression_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_custom_expression_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_custom_expression_resultTupleScheme getScheme() { return new create_custom_expression_resultTupleScheme(); } } private static class create_custom_expression_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<create_custom_expression_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_custom_expression_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_custom_expression_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_custom_expressions_args implements org.apache.thrift.TBase<get_custom_expressions_args, get_custom_expressions_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_custom_expressions_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_custom_expressions_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_custom_expressions_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_custom_expressions_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_custom_expressions_args.class, metaDataMap); } public get_custom_expressions_args() { } public get_custom_expressions_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_custom_expressions_args(get_custom_expressions_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_custom_expressions_args deepCopy() { return new get_custom_expressions_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_custom_expressions_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_custom_expressions_args) return this.equals((get_custom_expressions_args)that); return false; } public boolean equals(get_custom_expressions_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_custom_expressions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_custom_expressions_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_custom_expressions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_custom_expressions_argsStandardScheme getScheme() { return new get_custom_expressions_argsStandardScheme(); } } private static class get_custom_expressions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_custom_expressions_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_custom_expressions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_custom_expressions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_custom_expressions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_custom_expressions_argsTupleScheme getScheme() { return new get_custom_expressions_argsTupleScheme(); } } private static class get_custom_expressions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_custom_expressions_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_custom_expressions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_custom_expressions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_custom_expressions_result implements org.apache.thrift.TBase<get_custom_expressions_result, get_custom_expressions_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_custom_expressions_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_custom_expressions_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_custom_expressions_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_custom_expressions_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TCustomExpression> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCustomExpression.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_custom_expressions_result.class, metaDataMap); } public get_custom_expressions_result() { } public get_custom_expressions_result( java.util.List<TCustomExpression> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_custom_expressions_result(get_custom_expressions_result other) { if (other.isSetSuccess()) { java.util.List<TCustomExpression> __this__success = new java.util.ArrayList<TCustomExpression>(other.success.size()); for (TCustomExpression other_element : other.success) { __this__success.add(new TCustomExpression(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_custom_expressions_result deepCopy() { return new get_custom_expressions_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TCustomExpression> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TCustomExpression elem) { if (this.success == null) { this.success = new java.util.ArrayList<TCustomExpression>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TCustomExpression> getSuccess() { return this.success; } public get_custom_expressions_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TCustomExpression> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_custom_expressions_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TCustomExpression>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_custom_expressions_result) return this.equals((get_custom_expressions_result)that); return false; } public boolean equals(get_custom_expressions_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_custom_expressions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_custom_expressions_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_custom_expressions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_custom_expressions_resultStandardScheme getScheme() { return new get_custom_expressions_resultStandardScheme(); } } private static class get_custom_expressions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_custom_expressions_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_custom_expressions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list444 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TCustomExpression>(_list444.size); @org.apache.thrift.annotation.Nullable TCustomExpression _elem445; for (int _i446 = 0; _i446 < _list444.size; ++_i446) { _elem445 = new TCustomExpression(); _elem445.read(iprot); struct.success.add(_elem445); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_custom_expressions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TCustomExpression _iter447 : struct.success) { _iter447.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_custom_expressions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_custom_expressions_resultTupleScheme getScheme() { return new get_custom_expressions_resultTupleScheme(); } } private static class get_custom_expressions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_custom_expressions_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_custom_expressions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TCustomExpression _iter448 : struct.success) { _iter448.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_custom_expressions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list449 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TCustomExpression>(_list449.size); @org.apache.thrift.annotation.Nullable TCustomExpression _elem450; for (int _i451 = 0; _i451 < _list449.size; ++_i451) { _elem450 = new TCustomExpression(); _elem450.read(iprot); struct.success.add(_elem450); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class update_custom_expression_args implements org.apache.thrift.TBase<update_custom_expression_args, update_custom_expression_args._Fields>, java.io.Serializable, Cloneable, Comparable<update_custom_expression_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_custom_expression_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField EXPRESSION_JSON_FIELD_DESC = new org.apache.thrift.protocol.TField("expression_json", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new update_custom_expression_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new update_custom_expression_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int id; // required public @org.apache.thrift.annotation.Nullable java.lang.String expression_json; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), ID((short)2, "id"), EXPRESSION_JSON((short)3, "expression_json"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // ID return ID; case 3: // EXPRESSION_JSON return EXPRESSION_JSON; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.EXPRESSION_JSON, new org.apache.thrift.meta_data.FieldMetaData("expression_json", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_custom_expression_args.class, metaDataMap); } public update_custom_expression_args() { } public update_custom_expression_args( java.lang.String session, int id, java.lang.String expression_json) { this(); this.session = session; this.id = id; setIdIsSet(true); this.expression_json = expression_json; } /** * Performs a deep copy on <i>other</i>. */ public update_custom_expression_args(update_custom_expression_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.id = other.id; if (other.isSetExpression_json()) { this.expression_json = other.expression_json; } } public update_custom_expression_args deepCopy() { return new update_custom_expression_args(this); } @Override public void clear() { this.session = null; setIdIsSet(false); this.id = 0; this.expression_json = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public update_custom_expression_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getId() { return this.id; } public update_custom_expression_args setId(int id) { this.id = id; setIdIsSet(true); return this; } public void unsetId() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); } /** Returns true if field id is set (has been assigned a value) and false otherwise */ public boolean isSetId() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); } public void setIdIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getExpression_json() { return this.expression_json; } public update_custom_expression_args setExpression_json(@org.apache.thrift.annotation.Nullable java.lang.String expression_json) { this.expression_json = expression_json; return this; } public void unsetExpression_json() { this.expression_json = null; } /** Returns true if field expression_json is set (has been assigned a value) and false otherwise */ public boolean isSetExpression_json() { return this.expression_json != null; } public void setExpression_jsonIsSet(boolean value) { if (!value) { this.expression_json = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case ID: if (value == null) { unsetId(); } else { setId((java.lang.Integer)value); } break; case EXPRESSION_JSON: if (value == null) { unsetExpression_json(); } else { setExpression_json((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case ID: return getId(); case EXPRESSION_JSON: return getExpression_json(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case ID: return isSetId(); case EXPRESSION_JSON: return isSetExpression_json(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof update_custom_expression_args) return this.equals((update_custom_expression_args)that); return false; } public boolean equals(update_custom_expression_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_id = true; boolean that_present_id = true; if (this_present_id || that_present_id) { if (!(this_present_id && that_present_id)) return false; if (this.id != that.id) return false; } boolean this_present_expression_json = true && this.isSetExpression_json(); boolean that_present_expression_json = true && that.isSetExpression_json(); if (this_present_expression_json || that_present_expression_json) { if (!(this_present_expression_json && that_present_expression_json)) return false; if (!this.expression_json.equals(that.expression_json)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + id; hashCode = hashCode * 8191 + ((isSetExpression_json()) ? 131071 : 524287); if (isSetExpression_json()) hashCode = hashCode * 8191 + expression_json.hashCode(); return hashCode; } @Override public int compareTo(update_custom_expression_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetId(), other.isSetId()); if (lastComparison != 0) { return lastComparison; } if (isSetId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetExpression_json(), other.isSetExpression_json()); if (lastComparison != 0) { return lastComparison; } if (isSetExpression_json()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expression_json, other.expression_json); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("update_custom_expression_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("id:"); sb.append(this.id); first = false; if (!first) sb.append(", "); sb.append("expression_json:"); if (this.expression_json == null) { sb.append("null"); } else { sb.append(this.expression_json); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class update_custom_expression_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public update_custom_expression_argsStandardScheme getScheme() { return new update_custom_expression_argsStandardScheme(); } } private static class update_custom_expression_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<update_custom_expression_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, update_custom_expression_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.id = iprot.readI32(); struct.setIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // EXPRESSION_JSON if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.expression_json = iprot.readString(); struct.setExpression_jsonIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, update_custom_expression_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI32(struct.id); oprot.writeFieldEnd(); if (struct.expression_json != null) { oprot.writeFieldBegin(EXPRESSION_JSON_FIELD_DESC); oprot.writeString(struct.expression_json); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class update_custom_expression_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public update_custom_expression_argsTupleScheme getScheme() { return new update_custom_expression_argsTupleScheme(); } } private static class update_custom_expression_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<update_custom_expression_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, update_custom_expression_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetId()) { optionals.set(1); } if (struct.isSetExpression_json()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetId()) { oprot.writeI32(struct.id); } if (struct.isSetExpression_json()) { oprot.writeString(struct.expression_json); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, update_custom_expression_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.id = iprot.readI32(); struct.setIdIsSet(true); } if (incoming.get(2)) { struct.expression_json = iprot.readString(); struct.setExpression_jsonIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class update_custom_expression_result implements org.apache.thrift.TBase<update_custom_expression_result, update_custom_expression_result._Fields>, java.io.Serializable, Cloneable, Comparable<update_custom_expression_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_custom_expression_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new update_custom_expression_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new update_custom_expression_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_custom_expression_result.class, metaDataMap); } public update_custom_expression_result() { } public update_custom_expression_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public update_custom_expression_result(update_custom_expression_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public update_custom_expression_result deepCopy() { return new update_custom_expression_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public update_custom_expression_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof update_custom_expression_result) return this.equals((update_custom_expression_result)that); return false; } public boolean equals(update_custom_expression_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(update_custom_expression_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("update_custom_expression_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class update_custom_expression_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public update_custom_expression_resultStandardScheme getScheme() { return new update_custom_expression_resultStandardScheme(); } } private static class update_custom_expression_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<update_custom_expression_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, update_custom_expression_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, update_custom_expression_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class update_custom_expression_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public update_custom_expression_resultTupleScheme getScheme() { return new update_custom_expression_resultTupleScheme(); } } private static class update_custom_expression_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<update_custom_expression_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, update_custom_expression_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, update_custom_expression_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class delete_custom_expressions_args implements org.apache.thrift.TBase<delete_custom_expressions_args, delete_custom_expressions_args._Fields>, java.io.Serializable, Cloneable, Comparable<delete_custom_expressions_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_custom_expressions_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField CUSTOM_EXPRESSION_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("custom_expression_ids", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField DO_SOFT_DELETE_FIELD_DESC = new org.apache.thrift.protocol.TField("do_soft_delete", org.apache.thrift.protocol.TType.BOOL, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new delete_custom_expressions_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new delete_custom_expressions_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> custom_expression_ids; // required public boolean do_soft_delete; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), CUSTOM_EXPRESSION_IDS((short)2, "custom_expression_ids"), DO_SOFT_DELETE((short)3, "do_soft_delete"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // CUSTOM_EXPRESSION_IDS return CUSTOM_EXPRESSION_IDS; case 3: // DO_SOFT_DELETE return DO_SOFT_DELETE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DO_SOFT_DELETE_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.CUSTOM_EXPRESSION_IDS, new org.apache.thrift.meta_data.FieldMetaData("custom_expression_ids", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); tmpMap.put(_Fields.DO_SOFT_DELETE, new org.apache.thrift.meta_data.FieldMetaData("do_soft_delete", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_custom_expressions_args.class, metaDataMap); } public delete_custom_expressions_args() { } public delete_custom_expressions_args( java.lang.String session, java.util.List<java.lang.Integer> custom_expression_ids, boolean do_soft_delete) { this(); this.session = session; this.custom_expression_ids = custom_expression_ids; this.do_soft_delete = do_soft_delete; setDo_soft_deleteIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public delete_custom_expressions_args(delete_custom_expressions_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } if (other.isSetCustom_expression_ids()) { java.util.List<java.lang.Integer> __this__custom_expression_ids = new java.util.ArrayList<java.lang.Integer>(other.custom_expression_ids); this.custom_expression_ids = __this__custom_expression_ids; } this.do_soft_delete = other.do_soft_delete; } public delete_custom_expressions_args deepCopy() { return new delete_custom_expressions_args(this); } @Override public void clear() { this.session = null; this.custom_expression_ids = null; setDo_soft_deleteIsSet(false); this.do_soft_delete = false; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public delete_custom_expressions_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getCustom_expression_idsSize() { return (this.custom_expression_ids == null) ? 0 : this.custom_expression_ids.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.Integer> getCustom_expression_idsIterator() { return (this.custom_expression_ids == null) ? null : this.custom_expression_ids.iterator(); } public void addToCustom_expression_ids(int elem) { if (this.custom_expression_ids == null) { this.custom_expression_ids = new java.util.ArrayList<java.lang.Integer>(); } this.custom_expression_ids.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.Integer> getCustom_expression_ids() { return this.custom_expression_ids; } public delete_custom_expressions_args setCustom_expression_ids(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> custom_expression_ids) { this.custom_expression_ids = custom_expression_ids; return this; } public void unsetCustom_expression_ids() { this.custom_expression_ids = null; } /** Returns true if field custom_expression_ids is set (has been assigned a value) and false otherwise */ public boolean isSetCustom_expression_ids() { return this.custom_expression_ids != null; } public void setCustom_expression_idsIsSet(boolean value) { if (!value) { this.custom_expression_ids = null; } } public boolean isDo_soft_delete() { return this.do_soft_delete; } public delete_custom_expressions_args setDo_soft_delete(boolean do_soft_delete) { this.do_soft_delete = do_soft_delete; setDo_soft_deleteIsSet(true); return this; } public void unsetDo_soft_delete() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DO_SOFT_DELETE_ISSET_ID); } /** Returns true if field do_soft_delete is set (has been assigned a value) and false otherwise */ public boolean isSetDo_soft_delete() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DO_SOFT_DELETE_ISSET_ID); } public void setDo_soft_deleteIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DO_SOFT_DELETE_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case CUSTOM_EXPRESSION_IDS: if (value == null) { unsetCustom_expression_ids(); } else { setCustom_expression_ids((java.util.List<java.lang.Integer>)value); } break; case DO_SOFT_DELETE: if (value == null) { unsetDo_soft_delete(); } else { setDo_soft_delete((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case CUSTOM_EXPRESSION_IDS: return getCustom_expression_ids(); case DO_SOFT_DELETE: return isDo_soft_delete(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case CUSTOM_EXPRESSION_IDS: return isSetCustom_expression_ids(); case DO_SOFT_DELETE: return isSetDo_soft_delete(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof delete_custom_expressions_args) return this.equals((delete_custom_expressions_args)that); return false; } public boolean equals(delete_custom_expressions_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_custom_expression_ids = true && this.isSetCustom_expression_ids(); boolean that_present_custom_expression_ids = true && that.isSetCustom_expression_ids(); if (this_present_custom_expression_ids || that_present_custom_expression_ids) { if (!(this_present_custom_expression_ids && that_present_custom_expression_ids)) return false; if (!this.custom_expression_ids.equals(that.custom_expression_ids)) return false; } boolean this_present_do_soft_delete = true; boolean that_present_do_soft_delete = true; if (this_present_do_soft_delete || that_present_do_soft_delete) { if (!(this_present_do_soft_delete && that_present_do_soft_delete)) return false; if (this.do_soft_delete != that.do_soft_delete) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetCustom_expression_ids()) ? 131071 : 524287); if (isSetCustom_expression_ids()) hashCode = hashCode * 8191 + custom_expression_ids.hashCode(); hashCode = hashCode * 8191 + ((do_soft_delete) ? 131071 : 524287); return hashCode; } @Override public int compareTo(delete_custom_expressions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCustom_expression_ids(), other.isSetCustom_expression_ids()); if (lastComparison != 0) { return lastComparison; } if (isSetCustom_expression_ids()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.custom_expression_ids, other.custom_expression_ids); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDo_soft_delete(), other.isSetDo_soft_delete()); if (lastComparison != 0) { return lastComparison; } if (isSetDo_soft_delete()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.do_soft_delete, other.do_soft_delete); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("delete_custom_expressions_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("custom_expression_ids:"); if (this.custom_expression_ids == null) { sb.append("null"); } else { sb.append(this.custom_expression_ids); } first = false; if (!first) sb.append(", "); sb.append("do_soft_delete:"); sb.append(this.do_soft_delete); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_custom_expressions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_custom_expressions_argsStandardScheme getScheme() { return new delete_custom_expressions_argsStandardScheme(); } } private static class delete_custom_expressions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<delete_custom_expressions_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_custom_expressions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // CUSTOM_EXPRESSION_IDS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list452 = iprot.readListBegin(); struct.custom_expression_ids = new java.util.ArrayList<java.lang.Integer>(_list452.size); int _elem453; for (int _i454 = 0; _i454 < _list452.size; ++_i454) { _elem453 = iprot.readI32(); struct.custom_expression_ids.add(_elem453); } iprot.readListEnd(); } struct.setCustom_expression_idsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DO_SOFT_DELETE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.do_soft_delete = iprot.readBool(); struct.setDo_soft_deleteIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_custom_expressions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.custom_expression_ids != null) { oprot.writeFieldBegin(CUSTOM_EXPRESSION_IDS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.custom_expression_ids.size())); for (int _iter455 : struct.custom_expression_ids) { oprot.writeI32(_iter455); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(DO_SOFT_DELETE_FIELD_DESC); oprot.writeBool(struct.do_soft_delete); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_custom_expressions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_custom_expressions_argsTupleScheme getScheme() { return new delete_custom_expressions_argsTupleScheme(); } } private static class delete_custom_expressions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<delete_custom_expressions_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_custom_expressions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetCustom_expression_ids()) { optionals.set(1); } if (struct.isSetDo_soft_delete()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetCustom_expression_ids()) { { oprot.writeI32(struct.custom_expression_ids.size()); for (int _iter456 : struct.custom_expression_ids) { oprot.writeI32(_iter456); } } } if (struct.isSetDo_soft_delete()) { oprot.writeBool(struct.do_soft_delete); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_custom_expressions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list457 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.custom_expression_ids = new java.util.ArrayList<java.lang.Integer>(_list457.size); int _elem458; for (int _i459 = 0; _i459 < _list457.size; ++_i459) { _elem458 = iprot.readI32(); struct.custom_expression_ids.add(_elem458); } } struct.setCustom_expression_idsIsSet(true); } if (incoming.get(2)) { struct.do_soft_delete = iprot.readBool(); struct.setDo_soft_deleteIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class delete_custom_expressions_result implements org.apache.thrift.TBase<delete_custom_expressions_result, delete_custom_expressions_result._Fields>, java.io.Serializable, Cloneable, Comparable<delete_custom_expressions_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_custom_expressions_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new delete_custom_expressions_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new delete_custom_expressions_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_custom_expressions_result.class, metaDataMap); } public delete_custom_expressions_result() { } public delete_custom_expressions_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public delete_custom_expressions_result(delete_custom_expressions_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public delete_custom_expressions_result deepCopy() { return new delete_custom_expressions_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public delete_custom_expressions_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof delete_custom_expressions_result) return this.equals((delete_custom_expressions_result)that); return false; } public boolean equals(delete_custom_expressions_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(delete_custom_expressions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("delete_custom_expressions_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_custom_expressions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_custom_expressions_resultStandardScheme getScheme() { return new delete_custom_expressions_resultStandardScheme(); } } private static class delete_custom_expressions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<delete_custom_expressions_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_custom_expressions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_custom_expressions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_custom_expressions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_custom_expressions_resultTupleScheme getScheme() { return new delete_custom_expressions_resultTupleScheme(); } } private static class delete_custom_expressions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<delete_custom_expressions_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_custom_expressions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_custom_expressions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_dashboard_args implements org.apache.thrift.TBase<get_dashboard_args, get_dashboard_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_dashboard_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_dashboard_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DASHBOARD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_dashboard_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_dashboard_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int dashboard_id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DASHBOARD_ID((short)2, "dashboard_id"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DASHBOARD_ID return DASHBOARD_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DASHBOARD_ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DASHBOARD_ID, new org.apache.thrift.meta_data.FieldMetaData("dashboard_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_dashboard_args.class, metaDataMap); } public get_dashboard_args() { } public get_dashboard_args( java.lang.String session, int dashboard_id) { this(); this.session = session; this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public get_dashboard_args(get_dashboard_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.dashboard_id = other.dashboard_id; } public get_dashboard_args deepCopy() { return new get_dashboard_args(this); } @Override public void clear() { this.session = null; setDashboard_idIsSet(false); this.dashboard_id = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_dashboard_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDashboard_id() { return this.dashboard_id; } public get_dashboard_args setDashboard_id(int dashboard_id) { this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); return this; } public void unsetDashboard_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } /** Returns true if field dashboard_id is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } public void setDashboard_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DASHBOARD_ID: if (value == null) { unsetDashboard_id(); } else { setDashboard_id((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DASHBOARD_ID: return getDashboard_id(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DASHBOARD_ID: return isSetDashboard_id(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_dashboard_args) return this.equals((get_dashboard_args)that); return false; } public boolean equals(get_dashboard_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dashboard_id = true; boolean that_present_dashboard_id = true; if (this_present_dashboard_id || that_present_dashboard_id) { if (!(this_present_dashboard_id && that_present_dashboard_id)) return false; if (this.dashboard_id != that.dashboard_id) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + dashboard_id; return hashCode; } @Override public int compareTo(get_dashboard_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_id(), other.isSetDashboard_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_id, other.dashboard_id); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_dashboard_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dashboard_id:"); sb.append(this.dashboard_id); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_dashboard_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboard_argsStandardScheme getScheme() { return new get_dashboard_argsStandardScheme(); } } private static class get_dashboard_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_dashboard_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DASHBOARD_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_dashboard_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DASHBOARD_ID_FIELD_DESC); oprot.writeI32(struct.dashboard_id); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_dashboard_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboard_argsTupleScheme getScheme() { return new get_dashboard_argsTupleScheme(); } } private static class get_dashboard_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_dashboard_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDashboard_id()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDashboard_id()) { oprot.writeI32(struct.dashboard_id); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_dashboard_result implements org.apache.thrift.TBase<get_dashboard_result, get_dashboard_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_dashboard_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_dashboard_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_dashboard_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_dashboard_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDashboard success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDashboard.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_dashboard_result.class, metaDataMap); } public get_dashboard_result() { } public get_dashboard_result( TDashboard success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_dashboard_result(get_dashboard_result other) { if (other.isSetSuccess()) { this.success = new TDashboard(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_dashboard_result deepCopy() { return new get_dashboard_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TDashboard getSuccess() { return this.success; } public get_dashboard_result setSuccess(@org.apache.thrift.annotation.Nullable TDashboard success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_dashboard_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TDashboard)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_dashboard_result) return this.equals((get_dashboard_result)that); return false; } public boolean equals(get_dashboard_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_dashboard_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_dashboard_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_dashboard_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboard_resultStandardScheme getScheme() { return new get_dashboard_resultStandardScheme(); } } private static class get_dashboard_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_dashboard_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TDashboard(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_dashboard_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_dashboard_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboard_resultTupleScheme getScheme() { return new get_dashboard_resultTupleScheme(); } } private static class get_dashboard_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_dashboard_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TDashboard(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_dashboards_args implements org.apache.thrift.TBase<get_dashboards_args, get_dashboards_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_dashboards_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_dashboards_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_dashboards_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_dashboards_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_dashboards_args.class, metaDataMap); } public get_dashboards_args() { } public get_dashboards_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_dashboards_args(get_dashboards_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_dashboards_args deepCopy() { return new get_dashboards_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_dashboards_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_dashboards_args) return this.equals((get_dashboards_args)that); return false; } public boolean equals(get_dashboards_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_dashboards_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_dashboards_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_dashboards_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboards_argsStandardScheme getScheme() { return new get_dashboards_argsStandardScheme(); } } private static class get_dashboards_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_dashboards_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_dashboards_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_dashboards_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboards_argsTupleScheme getScheme() { return new get_dashboards_argsTupleScheme(); } } private static class get_dashboards_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_dashboards_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_dashboards_result implements org.apache.thrift.TBase<get_dashboards_result, get_dashboards_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_dashboards_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_dashboards_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_dashboards_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_dashboards_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TDashboard> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDashboard.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_dashboards_result.class, metaDataMap); } public get_dashboards_result() { } public get_dashboards_result( java.util.List<TDashboard> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_dashboards_result(get_dashboards_result other) { if (other.isSetSuccess()) { java.util.List<TDashboard> __this__success = new java.util.ArrayList<TDashboard>(other.success.size()); for (TDashboard other_element : other.success) { __this__success.add(new TDashboard(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_dashboards_result deepCopy() { return new get_dashboards_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TDashboard> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TDashboard elem) { if (this.success == null) { this.success = new java.util.ArrayList<TDashboard>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TDashboard> getSuccess() { return this.success; } public get_dashboards_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TDashboard> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_dashboards_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TDashboard>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_dashboards_result) return this.equals((get_dashboards_result)that); return false; } public boolean equals(get_dashboards_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_dashboards_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_dashboards_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_dashboards_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboards_resultStandardScheme getScheme() { return new get_dashboards_resultStandardScheme(); } } private static class get_dashboards_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_dashboards_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list460 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TDashboard>(_list460.size); @org.apache.thrift.annotation.Nullable TDashboard _elem461; for (int _i462 = 0; _i462 < _list460.size; ++_i462) { _elem461 = new TDashboard(); _elem461.read(iprot); struct.success.add(_elem461); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_dashboards_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TDashboard _iter463 : struct.success) { _iter463.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_dashboards_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboards_resultTupleScheme getScheme() { return new get_dashboards_resultTupleScheme(); } } private static class get_dashboards_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_dashboards_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TDashboard _iter464 : struct.success) { _iter464.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list465 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TDashboard>(_list465.size); @org.apache.thrift.annotation.Nullable TDashboard _elem466; for (int _i467 = 0; _i467 < _list465.size; ++_i467) { _elem466 = new TDashboard(); _elem466.read(iprot); struct.success.add(_elem466); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class create_dashboard_args implements org.apache.thrift.TBase<create_dashboard_args, create_dashboard_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_dashboard_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_dashboard_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DASHBOARD_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DASHBOARD_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_state", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField IMAGE_HASH_FIELD_DESC = new org.apache.thrift.protocol.TField("image_hash", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField DASHBOARD_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_metadata", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_dashboard_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_dashboard_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String dashboard_name; // required public @org.apache.thrift.annotation.Nullable java.lang.String dashboard_state; // required public @org.apache.thrift.annotation.Nullable java.lang.String image_hash; // required public @org.apache.thrift.annotation.Nullable java.lang.String dashboard_metadata; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DASHBOARD_NAME((short)2, "dashboard_name"), DASHBOARD_STATE((short)3, "dashboard_state"), IMAGE_HASH((short)4, "image_hash"), DASHBOARD_METADATA((short)5, "dashboard_metadata"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DASHBOARD_NAME return DASHBOARD_NAME; case 3: // DASHBOARD_STATE return DASHBOARD_STATE; case 4: // IMAGE_HASH return IMAGE_HASH; case 5: // DASHBOARD_METADATA return DASHBOARD_METADATA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DASHBOARD_NAME, new org.apache.thrift.meta_data.FieldMetaData("dashboard_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DASHBOARD_STATE, new org.apache.thrift.meta_data.FieldMetaData("dashboard_state", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IMAGE_HASH, new org.apache.thrift.meta_data.FieldMetaData("image_hash", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DASHBOARD_METADATA, new org.apache.thrift.meta_data.FieldMetaData("dashboard_metadata", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_dashboard_args.class, metaDataMap); } public create_dashboard_args() { } public create_dashboard_args( java.lang.String session, java.lang.String dashboard_name, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata) { this(); this.session = session; this.dashboard_name = dashboard_name; this.dashboard_state = dashboard_state; this.image_hash = image_hash; this.dashboard_metadata = dashboard_metadata; } /** * Performs a deep copy on <i>other</i>. */ public create_dashboard_args(create_dashboard_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetDashboard_name()) { this.dashboard_name = other.dashboard_name; } if (other.isSetDashboard_state()) { this.dashboard_state = other.dashboard_state; } if (other.isSetImage_hash()) { this.image_hash = other.image_hash; } if (other.isSetDashboard_metadata()) { this.dashboard_metadata = other.dashboard_metadata; } } public create_dashboard_args deepCopy() { return new create_dashboard_args(this); } @Override public void clear() { this.session = null; this.dashboard_name = null; this.dashboard_state = null; this.image_hash = null; this.dashboard_metadata = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public create_dashboard_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDashboard_name() { return this.dashboard_name; } public create_dashboard_args setDashboard_name(@org.apache.thrift.annotation.Nullable java.lang.String dashboard_name) { this.dashboard_name = dashboard_name; return this; } public void unsetDashboard_name() { this.dashboard_name = null; } /** Returns true if field dashboard_name is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_name() { return this.dashboard_name != null; } public void setDashboard_nameIsSet(boolean value) { if (!value) { this.dashboard_name = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDashboard_state() { return this.dashboard_state; } public create_dashboard_args setDashboard_state(@org.apache.thrift.annotation.Nullable java.lang.String dashboard_state) { this.dashboard_state = dashboard_state; return this; } public void unsetDashboard_state() { this.dashboard_state = null; } /** Returns true if field dashboard_state is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_state() { return this.dashboard_state != null; } public void setDashboard_stateIsSet(boolean value) { if (!value) { this.dashboard_state = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImage_hash() { return this.image_hash; } public create_dashboard_args setImage_hash(@org.apache.thrift.annotation.Nullable java.lang.String image_hash) { this.image_hash = image_hash; return this; } public void unsetImage_hash() { this.image_hash = null; } /** Returns true if field image_hash is set (has been assigned a value) and false otherwise */ public boolean isSetImage_hash() { return this.image_hash != null; } public void setImage_hashIsSet(boolean value) { if (!value) { this.image_hash = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDashboard_metadata() { return this.dashboard_metadata; } public create_dashboard_args setDashboard_metadata(@org.apache.thrift.annotation.Nullable java.lang.String dashboard_metadata) { this.dashboard_metadata = dashboard_metadata; return this; } public void unsetDashboard_metadata() { this.dashboard_metadata = null; } /** Returns true if field dashboard_metadata is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_metadata() { return this.dashboard_metadata != null; } public void setDashboard_metadataIsSet(boolean value) { if (!value) { this.dashboard_metadata = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DASHBOARD_NAME: if (value == null) { unsetDashboard_name(); } else { setDashboard_name((java.lang.String)value); } break; case DASHBOARD_STATE: if (value == null) { unsetDashboard_state(); } else { setDashboard_state((java.lang.String)value); } break; case IMAGE_HASH: if (value == null) { unsetImage_hash(); } else { setImage_hash((java.lang.String)value); } break; case DASHBOARD_METADATA: if (value == null) { unsetDashboard_metadata(); } else { setDashboard_metadata((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DASHBOARD_NAME: return getDashboard_name(); case DASHBOARD_STATE: return getDashboard_state(); case IMAGE_HASH: return getImage_hash(); case DASHBOARD_METADATA: return getDashboard_metadata(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DASHBOARD_NAME: return isSetDashboard_name(); case DASHBOARD_STATE: return isSetDashboard_state(); case IMAGE_HASH: return isSetImage_hash(); case DASHBOARD_METADATA: return isSetDashboard_metadata(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof create_dashboard_args) return this.equals((create_dashboard_args)that); return false; } public boolean equals(create_dashboard_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dashboard_name = true && this.isSetDashboard_name(); boolean that_present_dashboard_name = true && that.isSetDashboard_name(); if (this_present_dashboard_name || that_present_dashboard_name) { if (!(this_present_dashboard_name && that_present_dashboard_name)) return false; if (!this.dashboard_name.equals(that.dashboard_name)) return false; } boolean this_present_dashboard_state = true && this.isSetDashboard_state(); boolean that_present_dashboard_state = true && that.isSetDashboard_state(); if (this_present_dashboard_state || that_present_dashboard_state) { if (!(this_present_dashboard_state && that_present_dashboard_state)) return false; if (!this.dashboard_state.equals(that.dashboard_state)) return false; } boolean this_present_image_hash = true && this.isSetImage_hash(); boolean that_present_image_hash = true && that.isSetImage_hash(); if (this_present_image_hash || that_present_image_hash) { if (!(this_present_image_hash && that_present_image_hash)) return false; if (!this.image_hash.equals(that.image_hash)) return false; } boolean this_present_dashboard_metadata = true && this.isSetDashboard_metadata(); boolean that_present_dashboard_metadata = true && that.isSetDashboard_metadata(); if (this_present_dashboard_metadata || that_present_dashboard_metadata) { if (!(this_present_dashboard_metadata && that_present_dashboard_metadata)) return false; if (!this.dashboard_metadata.equals(that.dashboard_metadata)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetDashboard_name()) ? 131071 : 524287); if (isSetDashboard_name()) hashCode = hashCode * 8191 + dashboard_name.hashCode(); hashCode = hashCode * 8191 + ((isSetDashboard_state()) ? 131071 : 524287); if (isSetDashboard_state()) hashCode = hashCode * 8191 + dashboard_state.hashCode(); hashCode = hashCode * 8191 + ((isSetImage_hash()) ? 131071 : 524287); if (isSetImage_hash()) hashCode = hashCode * 8191 + image_hash.hashCode(); hashCode = hashCode * 8191 + ((isSetDashboard_metadata()) ? 131071 : 524287); if (isSetDashboard_metadata()) hashCode = hashCode * 8191 + dashboard_metadata.hashCode(); return hashCode; } @Override public int compareTo(create_dashboard_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_name(), other.isSetDashboard_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_name, other.dashboard_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_state(), other.isSetDashboard_state()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_state()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_state, other.dashboard_state); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetImage_hash(), other.isSetImage_hash()); if (lastComparison != 0) { return lastComparison; } if (isSetImage_hash()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_hash, other.image_hash); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_metadata(), other.isSetDashboard_metadata()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_metadata()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_metadata, other.dashboard_metadata); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("create_dashboard_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dashboard_name:"); if (this.dashboard_name == null) { sb.append("null"); } else { sb.append(this.dashboard_name); } first = false; if (!first) sb.append(", "); sb.append("dashboard_state:"); if (this.dashboard_state == null) { sb.append("null"); } else { sb.append(this.dashboard_state); } first = false; if (!first) sb.append(", "); sb.append("image_hash:"); if (this.image_hash == null) { sb.append("null"); } else { sb.append(this.image_hash); } first = false; if (!first) sb.append(", "); sb.append("dashboard_metadata:"); if (this.dashboard_metadata == null) { sb.append("null"); } else { sb.append(this.dashboard_metadata); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_dashboard_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_dashboard_argsStandardScheme getScheme() { return new create_dashboard_argsStandardScheme(); } } private static class create_dashboard_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<create_dashboard_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, create_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DASHBOARD_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dashboard_name = iprot.readString(); struct.setDashboard_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DASHBOARD_STATE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dashboard_state = iprot.readString(); struct.setDashboard_stateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // IMAGE_HASH if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.image_hash = iprot.readString(); struct.setImage_hashIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // DASHBOARD_METADATA if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dashboard_metadata = iprot.readString(); struct.setDashboard_metadataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_dashboard_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.dashboard_name != null) { oprot.writeFieldBegin(DASHBOARD_NAME_FIELD_DESC); oprot.writeString(struct.dashboard_name); oprot.writeFieldEnd(); } if (struct.dashboard_state != null) { oprot.writeFieldBegin(DASHBOARD_STATE_FIELD_DESC); oprot.writeString(struct.dashboard_state); oprot.writeFieldEnd(); } if (struct.image_hash != null) { oprot.writeFieldBegin(IMAGE_HASH_FIELD_DESC); oprot.writeString(struct.image_hash); oprot.writeFieldEnd(); } if (struct.dashboard_metadata != null) { oprot.writeFieldBegin(DASHBOARD_METADATA_FIELD_DESC); oprot.writeString(struct.dashboard_metadata); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_dashboard_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_dashboard_argsTupleScheme getScheme() { return new create_dashboard_argsTupleScheme(); } } private static class create_dashboard_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<create_dashboard_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDashboard_name()) { optionals.set(1); } if (struct.isSetDashboard_state()) { optionals.set(2); } if (struct.isSetImage_hash()) { optionals.set(3); } if (struct.isSetDashboard_metadata()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDashboard_name()) { oprot.writeString(struct.dashboard_name); } if (struct.isSetDashboard_state()) { oprot.writeString(struct.dashboard_state); } if (struct.isSetImage_hash()) { oprot.writeString(struct.image_hash); } if (struct.isSetDashboard_metadata()) { oprot.writeString(struct.dashboard_metadata); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.dashboard_name = iprot.readString(); struct.setDashboard_nameIsSet(true); } if (incoming.get(2)) { struct.dashboard_state = iprot.readString(); struct.setDashboard_stateIsSet(true); } if (incoming.get(3)) { struct.image_hash = iprot.readString(); struct.setImage_hashIsSet(true); } if (incoming.get(4)) { struct.dashboard_metadata = iprot.readString(); struct.setDashboard_metadataIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class create_dashboard_result implements org.apache.thrift.TBase<create_dashboard_result, create_dashboard_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_dashboard_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_dashboard_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_dashboard_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_dashboard_resultTupleSchemeFactory(); public int success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_dashboard_result.class, metaDataMap); } public create_dashboard_result() { } public create_dashboard_result( int success, TDBException e) { this(); this.success = success; setSuccessIsSet(true); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public create_dashboard_result(create_dashboard_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetE()) { this.e = new TDBException(other.e); } } public create_dashboard_result deepCopy() { return new create_dashboard_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.e = null; } public int getSuccess() { return this.success; } public create_dashboard_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public create_dashboard_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.Integer)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof create_dashboard_result) return this.equals((create_dashboard_result)that); return false; } public boolean equals(create_dashboard_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + success; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(create_dashboard_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("create_dashboard_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_dashboard_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_dashboard_resultStandardScheme getScheme() { return new create_dashboard_resultStandardScheme(); } } private static class create_dashboard_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<create_dashboard_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, create_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_dashboard_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_dashboard_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_dashboard_resultTupleScheme getScheme() { return new create_dashboard_resultTupleScheme(); } } private static class create_dashboard_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<create_dashboard_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class replace_dashboard_args implements org.apache.thrift.TBase<replace_dashboard_args, replace_dashboard_args._Fields>, java.io.Serializable, Cloneable, Comparable<replace_dashboard_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("replace_dashboard_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DASHBOARD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField DASHBOARD_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField DASHBOARD_OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_owner", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField DASHBOARD_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_state", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.protocol.TField IMAGE_HASH_FIELD_DESC = new org.apache.thrift.protocol.TField("image_hash", org.apache.thrift.protocol.TType.STRING, (short)6); private static final org.apache.thrift.protocol.TField DASHBOARD_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_metadata", org.apache.thrift.protocol.TType.STRING, (short)7); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new replace_dashboard_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new replace_dashboard_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int dashboard_id; // required public @org.apache.thrift.annotation.Nullable java.lang.String dashboard_name; // required public @org.apache.thrift.annotation.Nullable java.lang.String dashboard_owner; // required public @org.apache.thrift.annotation.Nullable java.lang.String dashboard_state; // required public @org.apache.thrift.annotation.Nullable java.lang.String image_hash; // required public @org.apache.thrift.annotation.Nullable java.lang.String dashboard_metadata; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DASHBOARD_ID((short)2, "dashboard_id"), DASHBOARD_NAME((short)3, "dashboard_name"), DASHBOARD_OWNER((short)4, "dashboard_owner"), DASHBOARD_STATE((short)5, "dashboard_state"), IMAGE_HASH((short)6, "image_hash"), DASHBOARD_METADATA((short)7, "dashboard_metadata"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DASHBOARD_ID return DASHBOARD_ID; case 3: // DASHBOARD_NAME return DASHBOARD_NAME; case 4: // DASHBOARD_OWNER return DASHBOARD_OWNER; case 5: // DASHBOARD_STATE return DASHBOARD_STATE; case 6: // IMAGE_HASH return IMAGE_HASH; case 7: // DASHBOARD_METADATA return DASHBOARD_METADATA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DASHBOARD_ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DASHBOARD_ID, new org.apache.thrift.meta_data.FieldMetaData("dashboard_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.DASHBOARD_NAME, new org.apache.thrift.meta_data.FieldMetaData("dashboard_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DASHBOARD_OWNER, new org.apache.thrift.meta_data.FieldMetaData("dashboard_owner", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DASHBOARD_STATE, new org.apache.thrift.meta_data.FieldMetaData("dashboard_state", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IMAGE_HASH, new org.apache.thrift.meta_data.FieldMetaData("image_hash", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DASHBOARD_METADATA, new org.apache.thrift.meta_data.FieldMetaData("dashboard_metadata", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(replace_dashboard_args.class, metaDataMap); } public replace_dashboard_args() { } public replace_dashboard_args( java.lang.String session, int dashboard_id, java.lang.String dashboard_name, java.lang.String dashboard_owner, java.lang.String dashboard_state, java.lang.String image_hash, java.lang.String dashboard_metadata) { this(); this.session = session; this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); this.dashboard_name = dashboard_name; this.dashboard_owner = dashboard_owner; this.dashboard_state = dashboard_state; this.image_hash = image_hash; this.dashboard_metadata = dashboard_metadata; } /** * Performs a deep copy on <i>other</i>. */ public replace_dashboard_args(replace_dashboard_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.dashboard_id = other.dashboard_id; if (other.isSetDashboard_name()) { this.dashboard_name = other.dashboard_name; } if (other.isSetDashboard_owner()) { this.dashboard_owner = other.dashboard_owner; } if (other.isSetDashboard_state()) { this.dashboard_state = other.dashboard_state; } if (other.isSetImage_hash()) { this.image_hash = other.image_hash; } if (other.isSetDashboard_metadata()) { this.dashboard_metadata = other.dashboard_metadata; } } public replace_dashboard_args deepCopy() { return new replace_dashboard_args(this); } @Override public void clear() { this.session = null; setDashboard_idIsSet(false); this.dashboard_id = 0; this.dashboard_name = null; this.dashboard_owner = null; this.dashboard_state = null; this.image_hash = null; this.dashboard_metadata = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public replace_dashboard_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDashboard_id() { return this.dashboard_id; } public replace_dashboard_args setDashboard_id(int dashboard_id) { this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); return this; } public void unsetDashboard_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } /** Returns true if field dashboard_id is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } public void setDashboard_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getDashboard_name() { return this.dashboard_name; } public replace_dashboard_args setDashboard_name(@org.apache.thrift.annotation.Nullable java.lang.String dashboard_name) { this.dashboard_name = dashboard_name; return this; } public void unsetDashboard_name() { this.dashboard_name = null; } /** Returns true if field dashboard_name is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_name() { return this.dashboard_name != null; } public void setDashboard_nameIsSet(boolean value) { if (!value) { this.dashboard_name = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDashboard_owner() { return this.dashboard_owner; } public replace_dashboard_args setDashboard_owner(@org.apache.thrift.annotation.Nullable java.lang.String dashboard_owner) { this.dashboard_owner = dashboard_owner; return this; } public void unsetDashboard_owner() { this.dashboard_owner = null; } /** Returns true if field dashboard_owner is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_owner() { return this.dashboard_owner != null; } public void setDashboard_ownerIsSet(boolean value) { if (!value) { this.dashboard_owner = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDashboard_state() { return this.dashboard_state; } public replace_dashboard_args setDashboard_state(@org.apache.thrift.annotation.Nullable java.lang.String dashboard_state) { this.dashboard_state = dashboard_state; return this; } public void unsetDashboard_state() { this.dashboard_state = null; } /** Returns true if field dashboard_state is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_state() { return this.dashboard_state != null; } public void setDashboard_stateIsSet(boolean value) { if (!value) { this.dashboard_state = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImage_hash() { return this.image_hash; } public replace_dashboard_args setImage_hash(@org.apache.thrift.annotation.Nullable java.lang.String image_hash) { this.image_hash = image_hash; return this; } public void unsetImage_hash() { this.image_hash = null; } /** Returns true if field image_hash is set (has been assigned a value) and false otherwise */ public boolean isSetImage_hash() { return this.image_hash != null; } public void setImage_hashIsSet(boolean value) { if (!value) { this.image_hash = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDashboard_metadata() { return this.dashboard_metadata; } public replace_dashboard_args setDashboard_metadata(@org.apache.thrift.annotation.Nullable java.lang.String dashboard_metadata) { this.dashboard_metadata = dashboard_metadata; return this; } public void unsetDashboard_metadata() { this.dashboard_metadata = null; } /** Returns true if field dashboard_metadata is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_metadata() { return this.dashboard_metadata != null; } public void setDashboard_metadataIsSet(boolean value) { if (!value) { this.dashboard_metadata = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DASHBOARD_ID: if (value == null) { unsetDashboard_id(); } else { setDashboard_id((java.lang.Integer)value); } break; case DASHBOARD_NAME: if (value == null) { unsetDashboard_name(); } else { setDashboard_name((java.lang.String)value); } break; case DASHBOARD_OWNER: if (value == null) { unsetDashboard_owner(); } else { setDashboard_owner((java.lang.String)value); } break; case DASHBOARD_STATE: if (value == null) { unsetDashboard_state(); } else { setDashboard_state((java.lang.String)value); } break; case IMAGE_HASH: if (value == null) { unsetImage_hash(); } else { setImage_hash((java.lang.String)value); } break; case DASHBOARD_METADATA: if (value == null) { unsetDashboard_metadata(); } else { setDashboard_metadata((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DASHBOARD_ID: return getDashboard_id(); case DASHBOARD_NAME: return getDashboard_name(); case DASHBOARD_OWNER: return getDashboard_owner(); case DASHBOARD_STATE: return getDashboard_state(); case IMAGE_HASH: return getImage_hash(); case DASHBOARD_METADATA: return getDashboard_metadata(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DASHBOARD_ID: return isSetDashboard_id(); case DASHBOARD_NAME: return isSetDashboard_name(); case DASHBOARD_OWNER: return isSetDashboard_owner(); case DASHBOARD_STATE: return isSetDashboard_state(); case IMAGE_HASH: return isSetImage_hash(); case DASHBOARD_METADATA: return isSetDashboard_metadata(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof replace_dashboard_args) return this.equals((replace_dashboard_args)that); return false; } public boolean equals(replace_dashboard_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dashboard_id = true; boolean that_present_dashboard_id = true; if (this_present_dashboard_id || that_present_dashboard_id) { if (!(this_present_dashboard_id && that_present_dashboard_id)) return false; if (this.dashboard_id != that.dashboard_id) return false; } boolean this_present_dashboard_name = true && this.isSetDashboard_name(); boolean that_present_dashboard_name = true && that.isSetDashboard_name(); if (this_present_dashboard_name || that_present_dashboard_name) { if (!(this_present_dashboard_name && that_present_dashboard_name)) return false; if (!this.dashboard_name.equals(that.dashboard_name)) return false; } boolean this_present_dashboard_owner = true && this.isSetDashboard_owner(); boolean that_present_dashboard_owner = true && that.isSetDashboard_owner(); if (this_present_dashboard_owner || that_present_dashboard_owner) { if (!(this_present_dashboard_owner && that_present_dashboard_owner)) return false; if (!this.dashboard_owner.equals(that.dashboard_owner)) return false; } boolean this_present_dashboard_state = true && this.isSetDashboard_state(); boolean that_present_dashboard_state = true && that.isSetDashboard_state(); if (this_present_dashboard_state || that_present_dashboard_state) { if (!(this_present_dashboard_state && that_present_dashboard_state)) return false; if (!this.dashboard_state.equals(that.dashboard_state)) return false; } boolean this_present_image_hash = true && this.isSetImage_hash(); boolean that_present_image_hash = true && that.isSetImage_hash(); if (this_present_image_hash || that_present_image_hash) { if (!(this_present_image_hash && that_present_image_hash)) return false; if (!this.image_hash.equals(that.image_hash)) return false; } boolean this_present_dashboard_metadata = true && this.isSetDashboard_metadata(); boolean that_present_dashboard_metadata = true && that.isSetDashboard_metadata(); if (this_present_dashboard_metadata || that_present_dashboard_metadata) { if (!(this_present_dashboard_metadata && that_present_dashboard_metadata)) return false; if (!this.dashboard_metadata.equals(that.dashboard_metadata)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + dashboard_id; hashCode = hashCode * 8191 + ((isSetDashboard_name()) ? 131071 : 524287); if (isSetDashboard_name()) hashCode = hashCode * 8191 + dashboard_name.hashCode(); hashCode = hashCode * 8191 + ((isSetDashboard_owner()) ? 131071 : 524287); if (isSetDashboard_owner()) hashCode = hashCode * 8191 + dashboard_owner.hashCode(); hashCode = hashCode * 8191 + ((isSetDashboard_state()) ? 131071 : 524287); if (isSetDashboard_state()) hashCode = hashCode * 8191 + dashboard_state.hashCode(); hashCode = hashCode * 8191 + ((isSetImage_hash()) ? 131071 : 524287); if (isSetImage_hash()) hashCode = hashCode * 8191 + image_hash.hashCode(); hashCode = hashCode * 8191 + ((isSetDashboard_metadata()) ? 131071 : 524287); if (isSetDashboard_metadata()) hashCode = hashCode * 8191 + dashboard_metadata.hashCode(); return hashCode; } @Override public int compareTo(replace_dashboard_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_id(), other.isSetDashboard_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_id, other.dashboard_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_name(), other.isSetDashboard_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_name, other.dashboard_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_owner(), other.isSetDashboard_owner()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_owner()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_owner, other.dashboard_owner); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_state(), other.isSetDashboard_state()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_state()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_state, other.dashboard_state); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetImage_hash(), other.isSetImage_hash()); if (lastComparison != 0) { return lastComparison; } if (isSetImage_hash()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_hash, other.image_hash); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_metadata(), other.isSetDashboard_metadata()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_metadata()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_metadata, other.dashboard_metadata); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("replace_dashboard_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dashboard_id:"); sb.append(this.dashboard_id); first = false; if (!first) sb.append(", "); sb.append("dashboard_name:"); if (this.dashboard_name == null) { sb.append("null"); } else { sb.append(this.dashboard_name); } first = false; if (!first) sb.append(", "); sb.append("dashboard_owner:"); if (this.dashboard_owner == null) { sb.append("null"); } else { sb.append(this.dashboard_owner); } first = false; if (!first) sb.append(", "); sb.append("dashboard_state:"); if (this.dashboard_state == null) { sb.append("null"); } else { sb.append(this.dashboard_state); } first = false; if (!first) sb.append(", "); sb.append("image_hash:"); if (this.image_hash == null) { sb.append("null"); } else { sb.append(this.image_hash); } first = false; if (!first) sb.append(", "); sb.append("dashboard_metadata:"); if (this.dashboard_metadata == null) { sb.append("null"); } else { sb.append(this.dashboard_metadata); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class replace_dashboard_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public replace_dashboard_argsStandardScheme getScheme() { return new replace_dashboard_argsStandardScheme(); } } private static class replace_dashboard_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<replace_dashboard_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, replace_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DASHBOARD_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DASHBOARD_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dashboard_name = iprot.readString(); struct.setDashboard_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DASHBOARD_OWNER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dashboard_owner = iprot.readString(); struct.setDashboard_ownerIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // DASHBOARD_STATE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dashboard_state = iprot.readString(); struct.setDashboard_stateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // IMAGE_HASH if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.image_hash = iprot.readString(); struct.setImage_hashIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // DASHBOARD_METADATA if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dashboard_metadata = iprot.readString(); struct.setDashboard_metadataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, replace_dashboard_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DASHBOARD_ID_FIELD_DESC); oprot.writeI32(struct.dashboard_id); oprot.writeFieldEnd(); if (struct.dashboard_name != null) { oprot.writeFieldBegin(DASHBOARD_NAME_FIELD_DESC); oprot.writeString(struct.dashboard_name); oprot.writeFieldEnd(); } if (struct.dashboard_owner != null) { oprot.writeFieldBegin(DASHBOARD_OWNER_FIELD_DESC); oprot.writeString(struct.dashboard_owner); oprot.writeFieldEnd(); } if (struct.dashboard_state != null) { oprot.writeFieldBegin(DASHBOARD_STATE_FIELD_DESC); oprot.writeString(struct.dashboard_state); oprot.writeFieldEnd(); } if (struct.image_hash != null) { oprot.writeFieldBegin(IMAGE_HASH_FIELD_DESC); oprot.writeString(struct.image_hash); oprot.writeFieldEnd(); } if (struct.dashboard_metadata != null) { oprot.writeFieldBegin(DASHBOARD_METADATA_FIELD_DESC); oprot.writeString(struct.dashboard_metadata); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class replace_dashboard_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public replace_dashboard_argsTupleScheme getScheme() { return new replace_dashboard_argsTupleScheme(); } } private static class replace_dashboard_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<replace_dashboard_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, replace_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDashboard_id()) { optionals.set(1); } if (struct.isSetDashboard_name()) { optionals.set(2); } if (struct.isSetDashboard_owner()) { optionals.set(3); } if (struct.isSetDashboard_state()) { optionals.set(4); } if (struct.isSetImage_hash()) { optionals.set(5); } if (struct.isSetDashboard_metadata()) { optionals.set(6); } oprot.writeBitSet(optionals, 7); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDashboard_id()) { oprot.writeI32(struct.dashboard_id); } if (struct.isSetDashboard_name()) { oprot.writeString(struct.dashboard_name); } if (struct.isSetDashboard_owner()) { oprot.writeString(struct.dashboard_owner); } if (struct.isSetDashboard_state()) { oprot.writeString(struct.dashboard_state); } if (struct.isSetImage_hash()) { oprot.writeString(struct.image_hash); } if (struct.isSetDashboard_metadata()) { oprot.writeString(struct.dashboard_metadata); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, replace_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } if (incoming.get(2)) { struct.dashboard_name = iprot.readString(); struct.setDashboard_nameIsSet(true); } if (incoming.get(3)) { struct.dashboard_owner = iprot.readString(); struct.setDashboard_ownerIsSet(true); } if (incoming.get(4)) { struct.dashboard_state = iprot.readString(); struct.setDashboard_stateIsSet(true); } if (incoming.get(5)) { struct.image_hash = iprot.readString(); struct.setImage_hashIsSet(true); } if (incoming.get(6)) { struct.dashboard_metadata = iprot.readString(); struct.setDashboard_metadataIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class replace_dashboard_result implements org.apache.thrift.TBase<replace_dashboard_result, replace_dashboard_result._Fields>, java.io.Serializable, Cloneable, Comparable<replace_dashboard_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("replace_dashboard_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new replace_dashboard_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new replace_dashboard_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(replace_dashboard_result.class, metaDataMap); } public replace_dashboard_result() { } public replace_dashboard_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public replace_dashboard_result(replace_dashboard_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public replace_dashboard_result deepCopy() { return new replace_dashboard_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public replace_dashboard_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof replace_dashboard_result) return this.equals((replace_dashboard_result)that); return false; } public boolean equals(replace_dashboard_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(replace_dashboard_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("replace_dashboard_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class replace_dashboard_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public replace_dashboard_resultStandardScheme getScheme() { return new replace_dashboard_resultStandardScheme(); } } private static class replace_dashboard_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<replace_dashboard_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, replace_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, replace_dashboard_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class replace_dashboard_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public replace_dashboard_resultTupleScheme getScheme() { return new replace_dashboard_resultTupleScheme(); } } private static class replace_dashboard_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<replace_dashboard_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, replace_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, replace_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class delete_dashboard_args implements org.apache.thrift.TBase<delete_dashboard_args, delete_dashboard_args._Fields>, java.io.Serializable, Cloneable, Comparable<delete_dashboard_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_dashboard_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DASHBOARD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new delete_dashboard_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new delete_dashboard_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int dashboard_id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DASHBOARD_ID((short)2, "dashboard_id"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DASHBOARD_ID return DASHBOARD_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DASHBOARD_ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DASHBOARD_ID, new org.apache.thrift.meta_data.FieldMetaData("dashboard_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_dashboard_args.class, metaDataMap); } public delete_dashboard_args() { } public delete_dashboard_args( java.lang.String session, int dashboard_id) { this(); this.session = session; this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public delete_dashboard_args(delete_dashboard_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.dashboard_id = other.dashboard_id; } public delete_dashboard_args deepCopy() { return new delete_dashboard_args(this); } @Override public void clear() { this.session = null; setDashboard_idIsSet(false); this.dashboard_id = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public delete_dashboard_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDashboard_id() { return this.dashboard_id; } public delete_dashboard_args setDashboard_id(int dashboard_id) { this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); return this; } public void unsetDashboard_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } /** Returns true if field dashboard_id is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } public void setDashboard_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DASHBOARD_ID: if (value == null) { unsetDashboard_id(); } else { setDashboard_id((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DASHBOARD_ID: return getDashboard_id(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DASHBOARD_ID: return isSetDashboard_id(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof delete_dashboard_args) return this.equals((delete_dashboard_args)that); return false; } public boolean equals(delete_dashboard_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dashboard_id = true; boolean that_present_dashboard_id = true; if (this_present_dashboard_id || that_present_dashboard_id) { if (!(this_present_dashboard_id && that_present_dashboard_id)) return false; if (this.dashboard_id != that.dashboard_id) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + dashboard_id; return hashCode; } @Override public int compareTo(delete_dashboard_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_id(), other.isSetDashboard_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_id, other.dashboard_id); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("delete_dashboard_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dashboard_id:"); sb.append(this.dashboard_id); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_dashboard_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_dashboard_argsStandardScheme getScheme() { return new delete_dashboard_argsStandardScheme(); } } private static class delete_dashboard_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<delete_dashboard_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DASHBOARD_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_dashboard_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DASHBOARD_ID_FIELD_DESC); oprot.writeI32(struct.dashboard_id); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_dashboard_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_dashboard_argsTupleScheme getScheme() { return new delete_dashboard_argsTupleScheme(); } } private static class delete_dashboard_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<delete_dashboard_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDashboard_id()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDashboard_id()) { oprot.writeI32(struct.dashboard_id); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class delete_dashboard_result implements org.apache.thrift.TBase<delete_dashboard_result, delete_dashboard_result._Fields>, java.io.Serializable, Cloneable, Comparable<delete_dashboard_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_dashboard_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new delete_dashboard_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new delete_dashboard_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_dashboard_result.class, metaDataMap); } public delete_dashboard_result() { } public delete_dashboard_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public delete_dashboard_result(delete_dashboard_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public delete_dashboard_result deepCopy() { return new delete_dashboard_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public delete_dashboard_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof delete_dashboard_result) return this.equals((delete_dashboard_result)that); return false; } public boolean equals(delete_dashboard_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(delete_dashboard_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("delete_dashboard_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_dashboard_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_dashboard_resultStandardScheme getScheme() { return new delete_dashboard_resultStandardScheme(); } } private static class delete_dashboard_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<delete_dashboard_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_dashboard_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_dashboard_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_dashboard_resultTupleScheme getScheme() { return new delete_dashboard_resultTupleScheme(); } } private static class delete_dashboard_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<delete_dashboard_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class share_dashboards_args implements org.apache.thrift.TBase<share_dashboards_args, share_dashboards_args._Fields>, java.io.Serializable, Cloneable, Comparable<share_dashboards_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("share_dashboards_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DASHBOARD_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_ids", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("groups", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new share_dashboards_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new share_dashboards_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> dashboard_ids; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> groups; // required public @org.apache.thrift.annotation.Nullable TDashboardPermissions permissions; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DASHBOARD_IDS((short)2, "dashboard_ids"), GROUPS((short)3, "groups"), PERMISSIONS((short)4, "permissions"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DASHBOARD_IDS return DASHBOARD_IDS; case 3: // GROUPS return GROUPS; case 4: // PERMISSIONS return PERMISSIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DASHBOARD_IDS, new org.apache.thrift.meta_data.FieldMetaData("dashboard_ids", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); tmpMap.put(_Fields.GROUPS, new org.apache.thrift.meta_data.FieldMetaData("groups", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDashboardPermissions.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(share_dashboards_args.class, metaDataMap); } public share_dashboards_args() { } public share_dashboards_args( java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions) { this(); this.session = session; this.dashboard_ids = dashboard_ids; this.groups = groups; this.permissions = permissions; } /** * Performs a deep copy on <i>other</i>. */ public share_dashboards_args(share_dashboards_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetDashboard_ids()) { java.util.List<java.lang.Integer> __this__dashboard_ids = new java.util.ArrayList<java.lang.Integer>(other.dashboard_ids); this.dashboard_ids = __this__dashboard_ids; } if (other.isSetGroups()) { java.util.List<java.lang.String> __this__groups = new java.util.ArrayList<java.lang.String>(other.groups); this.groups = __this__groups; } if (other.isSetPermissions()) { this.permissions = new TDashboardPermissions(other.permissions); } } public share_dashboards_args deepCopy() { return new share_dashboards_args(this); } @Override public void clear() { this.session = null; this.dashboard_ids = null; this.groups = null; this.permissions = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public share_dashboards_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDashboard_idsSize() { return (this.dashboard_ids == null) ? 0 : this.dashboard_ids.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.Integer> getDashboard_idsIterator() { return (this.dashboard_ids == null) ? null : this.dashboard_ids.iterator(); } public void addToDashboard_ids(int elem) { if (this.dashboard_ids == null) { this.dashboard_ids = new java.util.ArrayList<java.lang.Integer>(); } this.dashboard_ids.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.Integer> getDashboard_ids() { return this.dashboard_ids; } public share_dashboards_args setDashboard_ids(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> dashboard_ids) { this.dashboard_ids = dashboard_ids; return this; } public void unsetDashboard_ids() { this.dashboard_ids = null; } /** Returns true if field dashboard_ids is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_ids() { return this.dashboard_ids != null; } public void setDashboard_idsIsSet(boolean value) { if (!value) { this.dashboard_ids = null; } } public int getGroupsSize() { return (this.groups == null) ? 0 : this.groups.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getGroupsIterator() { return (this.groups == null) ? null : this.groups.iterator(); } public void addToGroups(java.lang.String elem) { if (this.groups == null) { this.groups = new java.util.ArrayList<java.lang.String>(); } this.groups.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getGroups() { return this.groups; } public share_dashboards_args setGroups(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> groups) { this.groups = groups; return this; } public void unsetGroups() { this.groups = null; } /** Returns true if field groups is set (has been assigned a value) and false otherwise */ public boolean isSetGroups() { return this.groups != null; } public void setGroupsIsSet(boolean value) { if (!value) { this.groups = null; } } @org.apache.thrift.annotation.Nullable public TDashboardPermissions getPermissions() { return this.permissions; } public share_dashboards_args setPermissions(@org.apache.thrift.annotation.Nullable TDashboardPermissions permissions) { this.permissions = permissions; return this; } public void unsetPermissions() { this.permissions = null; } /** Returns true if field permissions is set (has been assigned a value) and false otherwise */ public boolean isSetPermissions() { return this.permissions != null; } public void setPermissionsIsSet(boolean value) { if (!value) { this.permissions = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DASHBOARD_IDS: if (value == null) { unsetDashboard_ids(); } else { setDashboard_ids((java.util.List<java.lang.Integer>)value); } break; case GROUPS: if (value == null) { unsetGroups(); } else { setGroups((java.util.List<java.lang.String>)value); } break; case PERMISSIONS: if (value == null) { unsetPermissions(); } else { setPermissions((TDashboardPermissions)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DASHBOARD_IDS: return getDashboard_ids(); case GROUPS: return getGroups(); case PERMISSIONS: return getPermissions(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DASHBOARD_IDS: return isSetDashboard_ids(); case GROUPS: return isSetGroups(); case PERMISSIONS: return isSetPermissions(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof share_dashboards_args) return this.equals((share_dashboards_args)that); return false; } public boolean equals(share_dashboards_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dashboard_ids = true && this.isSetDashboard_ids(); boolean that_present_dashboard_ids = true && that.isSetDashboard_ids(); if (this_present_dashboard_ids || that_present_dashboard_ids) { if (!(this_present_dashboard_ids && that_present_dashboard_ids)) return false; if (!this.dashboard_ids.equals(that.dashboard_ids)) return false; } boolean this_present_groups = true && this.isSetGroups(); boolean that_present_groups = true && that.isSetGroups(); if (this_present_groups || that_present_groups) { if (!(this_present_groups && that_present_groups)) return false; if (!this.groups.equals(that.groups)) return false; } boolean this_present_permissions = true && this.isSetPermissions(); boolean that_present_permissions = true && that.isSetPermissions(); if (this_present_permissions || that_present_permissions) { if (!(this_present_permissions && that_present_permissions)) return false; if (!this.permissions.equals(that.permissions)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetDashboard_ids()) ? 131071 : 524287); if (isSetDashboard_ids()) hashCode = hashCode * 8191 + dashboard_ids.hashCode(); hashCode = hashCode * 8191 + ((isSetGroups()) ? 131071 : 524287); if (isSetGroups()) hashCode = hashCode * 8191 + groups.hashCode(); hashCode = hashCode * 8191 + ((isSetPermissions()) ? 131071 : 524287); if (isSetPermissions()) hashCode = hashCode * 8191 + permissions.hashCode(); return hashCode; } @Override public int compareTo(share_dashboards_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_ids(), other.isSetDashboard_ids()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_ids()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_ids, other.dashboard_ids); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGroups(), other.isSetGroups()); if (lastComparison != 0) { return lastComparison; } if (isSetGroups()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groups, other.groups); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPermissions(), other.isSetPermissions()); if (lastComparison != 0) { return lastComparison; } if (isSetPermissions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("share_dashboards_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dashboard_ids:"); if (this.dashboard_ids == null) { sb.append("null"); } else { sb.append(this.dashboard_ids); } first = false; if (!first) sb.append(", "); sb.append("groups:"); if (this.groups == null) { sb.append("null"); } else { sb.append(this.groups); } first = false; if (!first) sb.append(", "); sb.append("permissions:"); if (this.permissions == null) { sb.append("null"); } else { sb.append(this.permissions); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (permissions != null) { permissions.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class share_dashboards_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public share_dashboards_argsStandardScheme getScheme() { return new share_dashboards_argsStandardScheme(); } } private static class share_dashboards_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<share_dashboards_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, share_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DASHBOARD_IDS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list468 = iprot.readListBegin(); struct.dashboard_ids = new java.util.ArrayList<java.lang.Integer>(_list468.size); int _elem469; for (int _i470 = 0; _i470 < _list468.size; ++_i470) { _elem469 = iprot.readI32(); struct.dashboard_ids.add(_elem469); } iprot.readListEnd(); } struct.setDashboard_idsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // GROUPS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list471 = iprot.readListBegin(); struct.groups = new java.util.ArrayList<java.lang.String>(_list471.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem472; for (int _i473 = 0; _i473 < _list471.size; ++_i473) { _elem472 = iprot.readString(); struct.groups.add(_elem472); } iprot.readListEnd(); } struct.setGroupsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.permissions = new TDashboardPermissions(); struct.permissions.read(iprot); struct.setPermissionsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, share_dashboards_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.dashboard_ids != null) { oprot.writeFieldBegin(DASHBOARD_IDS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.dashboard_ids.size())); for (int _iter474 : struct.dashboard_ids) { oprot.writeI32(_iter474); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.groups != null) { oprot.writeFieldBegin(GROUPS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.groups.size())); for (java.lang.String _iter475 : struct.groups) { oprot.writeString(_iter475); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.permissions != null) { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); struct.permissions.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class share_dashboards_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public share_dashboards_argsTupleScheme getScheme() { return new share_dashboards_argsTupleScheme(); } } private static class share_dashboards_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<share_dashboards_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, share_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDashboard_ids()) { optionals.set(1); } if (struct.isSetGroups()) { optionals.set(2); } if (struct.isSetPermissions()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDashboard_ids()) { { oprot.writeI32(struct.dashboard_ids.size()); for (int _iter476 : struct.dashboard_ids) { oprot.writeI32(_iter476); } } } if (struct.isSetGroups()) { { oprot.writeI32(struct.groups.size()); for (java.lang.String _iter477 : struct.groups) { oprot.writeString(_iter477); } } } if (struct.isSetPermissions()) { struct.permissions.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, share_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list478 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.dashboard_ids = new java.util.ArrayList<java.lang.Integer>(_list478.size); int _elem479; for (int _i480 = 0; _i480 < _list478.size; ++_i480) { _elem479 = iprot.readI32(); struct.dashboard_ids.add(_elem479); } } struct.setDashboard_idsIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list481 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.groups = new java.util.ArrayList<java.lang.String>(_list481.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem482; for (int _i483 = 0; _i483 < _list481.size; ++_i483) { _elem482 = iprot.readString(); struct.groups.add(_elem482); } } struct.setGroupsIsSet(true); } if (incoming.get(3)) { struct.permissions = new TDashboardPermissions(); struct.permissions.read(iprot); struct.setPermissionsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class share_dashboards_result implements org.apache.thrift.TBase<share_dashboards_result, share_dashboards_result._Fields>, java.io.Serializable, Cloneable, Comparable<share_dashboards_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("share_dashboards_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new share_dashboards_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new share_dashboards_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(share_dashboards_result.class, metaDataMap); } public share_dashboards_result() { } public share_dashboards_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public share_dashboards_result(share_dashboards_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public share_dashboards_result deepCopy() { return new share_dashboards_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public share_dashboards_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof share_dashboards_result) return this.equals((share_dashboards_result)that); return false; } public boolean equals(share_dashboards_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(share_dashboards_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("share_dashboards_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class share_dashboards_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public share_dashboards_resultStandardScheme getScheme() { return new share_dashboards_resultStandardScheme(); } } private static class share_dashboards_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<share_dashboards_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, share_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, share_dashboards_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class share_dashboards_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public share_dashboards_resultTupleScheme getScheme() { return new share_dashboards_resultTupleScheme(); } } private static class share_dashboards_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<share_dashboards_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, share_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, share_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class delete_dashboards_args implements org.apache.thrift.TBase<delete_dashboards_args, delete_dashboards_args._Fields>, java.io.Serializable, Cloneable, Comparable<delete_dashboards_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_dashboards_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DASHBOARD_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_ids", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new delete_dashboards_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new delete_dashboards_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> dashboard_ids; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DASHBOARD_IDS((short)2, "dashboard_ids"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DASHBOARD_IDS return DASHBOARD_IDS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DASHBOARD_IDS, new org.apache.thrift.meta_data.FieldMetaData("dashboard_ids", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_dashboards_args.class, metaDataMap); } public delete_dashboards_args() { } public delete_dashboards_args( java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids) { this(); this.session = session; this.dashboard_ids = dashboard_ids; } /** * Performs a deep copy on <i>other</i>. */ public delete_dashboards_args(delete_dashboards_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetDashboard_ids()) { java.util.List<java.lang.Integer> __this__dashboard_ids = new java.util.ArrayList<java.lang.Integer>(other.dashboard_ids); this.dashboard_ids = __this__dashboard_ids; } } public delete_dashboards_args deepCopy() { return new delete_dashboards_args(this); } @Override public void clear() { this.session = null; this.dashboard_ids = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public delete_dashboards_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDashboard_idsSize() { return (this.dashboard_ids == null) ? 0 : this.dashboard_ids.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.Integer> getDashboard_idsIterator() { return (this.dashboard_ids == null) ? null : this.dashboard_ids.iterator(); } public void addToDashboard_ids(int elem) { if (this.dashboard_ids == null) { this.dashboard_ids = new java.util.ArrayList<java.lang.Integer>(); } this.dashboard_ids.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.Integer> getDashboard_ids() { return this.dashboard_ids; } public delete_dashboards_args setDashboard_ids(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> dashboard_ids) { this.dashboard_ids = dashboard_ids; return this; } public void unsetDashboard_ids() { this.dashboard_ids = null; } /** Returns true if field dashboard_ids is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_ids() { return this.dashboard_ids != null; } public void setDashboard_idsIsSet(boolean value) { if (!value) { this.dashboard_ids = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DASHBOARD_IDS: if (value == null) { unsetDashboard_ids(); } else { setDashboard_ids((java.util.List<java.lang.Integer>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DASHBOARD_IDS: return getDashboard_ids(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DASHBOARD_IDS: return isSetDashboard_ids(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof delete_dashboards_args) return this.equals((delete_dashboards_args)that); return false; } public boolean equals(delete_dashboards_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dashboard_ids = true && this.isSetDashboard_ids(); boolean that_present_dashboard_ids = true && that.isSetDashboard_ids(); if (this_present_dashboard_ids || that_present_dashboard_ids) { if (!(this_present_dashboard_ids && that_present_dashboard_ids)) return false; if (!this.dashboard_ids.equals(that.dashboard_ids)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetDashboard_ids()) ? 131071 : 524287); if (isSetDashboard_ids()) hashCode = hashCode * 8191 + dashboard_ids.hashCode(); return hashCode; } @Override public int compareTo(delete_dashboards_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_ids(), other.isSetDashboard_ids()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_ids()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_ids, other.dashboard_ids); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("delete_dashboards_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dashboard_ids:"); if (this.dashboard_ids == null) { sb.append("null"); } else { sb.append(this.dashboard_ids); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_dashboards_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_dashboards_argsStandardScheme getScheme() { return new delete_dashboards_argsStandardScheme(); } } private static class delete_dashboards_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<delete_dashboards_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DASHBOARD_IDS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list484 = iprot.readListBegin(); struct.dashboard_ids = new java.util.ArrayList<java.lang.Integer>(_list484.size); int _elem485; for (int _i486 = 0; _i486 < _list484.size; ++_i486) { _elem485 = iprot.readI32(); struct.dashboard_ids.add(_elem485); } iprot.readListEnd(); } struct.setDashboard_idsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_dashboards_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.dashboard_ids != null) { oprot.writeFieldBegin(DASHBOARD_IDS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.dashboard_ids.size())); for (int _iter487 : struct.dashboard_ids) { oprot.writeI32(_iter487); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_dashboards_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_dashboards_argsTupleScheme getScheme() { return new delete_dashboards_argsTupleScheme(); } } private static class delete_dashboards_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<delete_dashboards_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDashboard_ids()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDashboard_ids()) { { oprot.writeI32(struct.dashboard_ids.size()); for (int _iter488 : struct.dashboard_ids) { oprot.writeI32(_iter488); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list489 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.dashboard_ids = new java.util.ArrayList<java.lang.Integer>(_list489.size); int _elem490; for (int _i491 = 0; _i491 < _list489.size; ++_i491) { _elem490 = iprot.readI32(); struct.dashboard_ids.add(_elem490); } } struct.setDashboard_idsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class delete_dashboards_result implements org.apache.thrift.TBase<delete_dashboards_result, delete_dashboards_result._Fields>, java.io.Serializable, Cloneable, Comparable<delete_dashboards_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_dashboards_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new delete_dashboards_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new delete_dashboards_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_dashboards_result.class, metaDataMap); } public delete_dashboards_result() { } public delete_dashboards_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public delete_dashboards_result(delete_dashboards_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public delete_dashboards_result deepCopy() { return new delete_dashboards_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public delete_dashboards_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof delete_dashboards_result) return this.equals((delete_dashboards_result)that); return false; } public boolean equals(delete_dashboards_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(delete_dashboards_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("delete_dashboards_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_dashboards_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_dashboards_resultStandardScheme getScheme() { return new delete_dashboards_resultStandardScheme(); } } private static class delete_dashboards_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<delete_dashboards_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_dashboards_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_dashboards_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public delete_dashboards_resultTupleScheme getScheme() { return new delete_dashboards_resultTupleScheme(); } } private static class delete_dashboards_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<delete_dashboards_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class share_dashboard_args implements org.apache.thrift.TBase<share_dashboard_args, share_dashboard_args._Fields>, java.io.Serializable, Cloneable, Comparable<share_dashboard_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("share_dashboard_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DASHBOARD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("groups", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField OBJECTS_FIELD_DESC = new org.apache.thrift.protocol.TField("objects", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField GRANT_ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("grant_role", org.apache.thrift.protocol.TType.BOOL, (short)6); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new share_dashboard_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new share_dashboard_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int dashboard_id; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> groups; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> objects; // required public @org.apache.thrift.annotation.Nullable TDashboardPermissions permissions; // required public boolean grant_role; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DASHBOARD_ID((short)2, "dashboard_id"), GROUPS((short)3, "groups"), OBJECTS((short)4, "objects"), PERMISSIONS((short)5, "permissions"), GRANT_ROLE((short)6, "grant_role"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DASHBOARD_ID return DASHBOARD_ID; case 3: // GROUPS return GROUPS; case 4: // OBJECTS return OBJECTS; case 5: // PERMISSIONS return PERMISSIONS; case 6: // GRANT_ROLE return GRANT_ROLE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DASHBOARD_ID_ISSET_ID = 0; private static final int __GRANT_ROLE_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DASHBOARD_ID, new org.apache.thrift.meta_data.FieldMetaData("dashboard_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.GROUPS, new org.apache.thrift.meta_data.FieldMetaData("groups", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.OBJECTS, new org.apache.thrift.meta_data.FieldMetaData("objects", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDashboardPermissions.class))); tmpMap.put(_Fields.GRANT_ROLE, new org.apache.thrift.meta_data.FieldMetaData("grant_role", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(share_dashboard_args.class, metaDataMap); } public share_dashboard_args() { this.grant_role = false; } public share_dashboard_args( java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions, boolean grant_role) { this(); this.session = session; this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); this.groups = groups; this.objects = objects; this.permissions = permissions; this.grant_role = grant_role; setGrant_roleIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public share_dashboard_args(share_dashboard_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.dashboard_id = other.dashboard_id; if (other.isSetGroups()) { java.util.List<java.lang.String> __this__groups = new java.util.ArrayList<java.lang.String>(other.groups); this.groups = __this__groups; } if (other.isSetObjects()) { java.util.List<java.lang.String> __this__objects = new java.util.ArrayList<java.lang.String>(other.objects); this.objects = __this__objects; } if (other.isSetPermissions()) { this.permissions = new TDashboardPermissions(other.permissions); } this.grant_role = other.grant_role; } public share_dashboard_args deepCopy() { return new share_dashboard_args(this); } @Override public void clear() { this.session = null; setDashboard_idIsSet(false); this.dashboard_id = 0; this.groups = null; this.objects = null; this.permissions = null; this.grant_role = false; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public share_dashboard_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDashboard_id() { return this.dashboard_id; } public share_dashboard_args setDashboard_id(int dashboard_id) { this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); return this; } public void unsetDashboard_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } /** Returns true if field dashboard_id is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } public void setDashboard_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID, value); } public int getGroupsSize() { return (this.groups == null) ? 0 : this.groups.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getGroupsIterator() { return (this.groups == null) ? null : this.groups.iterator(); } public void addToGroups(java.lang.String elem) { if (this.groups == null) { this.groups = new java.util.ArrayList<java.lang.String>(); } this.groups.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getGroups() { return this.groups; } public share_dashboard_args setGroups(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> groups) { this.groups = groups; return this; } public void unsetGroups() { this.groups = null; } /** Returns true if field groups is set (has been assigned a value) and false otherwise */ public boolean isSetGroups() { return this.groups != null; } public void setGroupsIsSet(boolean value) { if (!value) { this.groups = null; } } public int getObjectsSize() { return (this.objects == null) ? 0 : this.objects.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getObjectsIterator() { return (this.objects == null) ? null : this.objects.iterator(); } public void addToObjects(java.lang.String elem) { if (this.objects == null) { this.objects = new java.util.ArrayList<java.lang.String>(); } this.objects.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getObjects() { return this.objects; } public share_dashboard_args setObjects(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> objects) { this.objects = objects; return this; } public void unsetObjects() { this.objects = null; } /** Returns true if field objects is set (has been assigned a value) and false otherwise */ public boolean isSetObjects() { return this.objects != null; } public void setObjectsIsSet(boolean value) { if (!value) { this.objects = null; } } @org.apache.thrift.annotation.Nullable public TDashboardPermissions getPermissions() { return this.permissions; } public share_dashboard_args setPermissions(@org.apache.thrift.annotation.Nullable TDashboardPermissions permissions) { this.permissions = permissions; return this; } public void unsetPermissions() { this.permissions = null; } /** Returns true if field permissions is set (has been assigned a value) and false otherwise */ public boolean isSetPermissions() { return this.permissions != null; } public void setPermissionsIsSet(boolean value) { if (!value) { this.permissions = null; } } public boolean isGrant_role() { return this.grant_role; } public share_dashboard_args setGrant_role(boolean grant_role) { this.grant_role = grant_role; setGrant_roleIsSet(true); return this; } public void unsetGrant_role() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __GRANT_ROLE_ISSET_ID); } /** Returns true if field grant_role is set (has been assigned a value) and false otherwise */ public boolean isSetGrant_role() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __GRANT_ROLE_ISSET_ID); } public void setGrant_roleIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __GRANT_ROLE_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DASHBOARD_ID: if (value == null) { unsetDashboard_id(); } else { setDashboard_id((java.lang.Integer)value); } break; case GROUPS: if (value == null) { unsetGroups(); } else { setGroups((java.util.List<java.lang.String>)value); } break; case OBJECTS: if (value == null) { unsetObjects(); } else { setObjects((java.util.List<java.lang.String>)value); } break; case PERMISSIONS: if (value == null) { unsetPermissions(); } else { setPermissions((TDashboardPermissions)value); } break; case GRANT_ROLE: if (value == null) { unsetGrant_role(); } else { setGrant_role((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DASHBOARD_ID: return getDashboard_id(); case GROUPS: return getGroups(); case OBJECTS: return getObjects(); case PERMISSIONS: return getPermissions(); case GRANT_ROLE: return isGrant_role(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DASHBOARD_ID: return isSetDashboard_id(); case GROUPS: return isSetGroups(); case OBJECTS: return isSetObjects(); case PERMISSIONS: return isSetPermissions(); case GRANT_ROLE: return isSetGrant_role(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof share_dashboard_args) return this.equals((share_dashboard_args)that); return false; } public boolean equals(share_dashboard_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dashboard_id = true; boolean that_present_dashboard_id = true; if (this_present_dashboard_id || that_present_dashboard_id) { if (!(this_present_dashboard_id && that_present_dashboard_id)) return false; if (this.dashboard_id != that.dashboard_id) return false; } boolean this_present_groups = true && this.isSetGroups(); boolean that_present_groups = true && that.isSetGroups(); if (this_present_groups || that_present_groups) { if (!(this_present_groups && that_present_groups)) return false; if (!this.groups.equals(that.groups)) return false; } boolean this_present_objects = true && this.isSetObjects(); boolean that_present_objects = true && that.isSetObjects(); if (this_present_objects || that_present_objects) { if (!(this_present_objects && that_present_objects)) return false; if (!this.objects.equals(that.objects)) return false; } boolean this_present_permissions = true && this.isSetPermissions(); boolean that_present_permissions = true && that.isSetPermissions(); if (this_present_permissions || that_present_permissions) { if (!(this_present_permissions && that_present_permissions)) return false; if (!this.permissions.equals(that.permissions)) return false; } boolean this_present_grant_role = true; boolean that_present_grant_role = true; if (this_present_grant_role || that_present_grant_role) { if (!(this_present_grant_role && that_present_grant_role)) return false; if (this.grant_role != that.grant_role) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + dashboard_id; hashCode = hashCode * 8191 + ((isSetGroups()) ? 131071 : 524287); if (isSetGroups()) hashCode = hashCode * 8191 + groups.hashCode(); hashCode = hashCode * 8191 + ((isSetObjects()) ? 131071 : 524287); if (isSetObjects()) hashCode = hashCode * 8191 + objects.hashCode(); hashCode = hashCode * 8191 + ((isSetPermissions()) ? 131071 : 524287); if (isSetPermissions()) hashCode = hashCode * 8191 + permissions.hashCode(); hashCode = hashCode * 8191 + ((grant_role) ? 131071 : 524287); return hashCode; } @Override public int compareTo(share_dashboard_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_id(), other.isSetDashboard_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_id, other.dashboard_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGroups(), other.isSetGroups()); if (lastComparison != 0) { return lastComparison; } if (isSetGroups()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groups, other.groups); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetObjects(), other.isSetObjects()); if (lastComparison != 0) { return lastComparison; } if (isSetObjects()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objects, other.objects); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPermissions(), other.isSetPermissions()); if (lastComparison != 0) { return lastComparison; } if (isSetPermissions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGrant_role(), other.isSetGrant_role()); if (lastComparison != 0) { return lastComparison; } if (isSetGrant_role()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grant_role, other.grant_role); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("share_dashboard_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dashboard_id:"); sb.append(this.dashboard_id); first = false; if (!first) sb.append(", "); sb.append("groups:"); if (this.groups == null) { sb.append("null"); } else { sb.append(this.groups); } first = false; if (!first) sb.append(", "); sb.append("objects:"); if (this.objects == null) { sb.append("null"); } else { sb.append(this.objects); } first = false; if (!first) sb.append(", "); sb.append("permissions:"); if (this.permissions == null) { sb.append("null"); } else { sb.append(this.permissions); } first = false; if (!first) sb.append(", "); sb.append("grant_role:"); sb.append(this.grant_role); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (permissions != null) { permissions.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class share_dashboard_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public share_dashboard_argsStandardScheme getScheme() { return new share_dashboard_argsStandardScheme(); } } private static class share_dashboard_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<share_dashboard_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, share_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DASHBOARD_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // GROUPS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list492 = iprot.readListBegin(); struct.groups = new java.util.ArrayList<java.lang.String>(_list492.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem493; for (int _i494 = 0; _i494 < _list492.size; ++_i494) { _elem493 = iprot.readString(); struct.groups.add(_elem493); } iprot.readListEnd(); } struct.setGroupsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // OBJECTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list495 = iprot.readListBegin(); struct.objects = new java.util.ArrayList<java.lang.String>(_list495.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem496; for (int _i497 = 0; _i497 < _list495.size; ++_i497) { _elem496 = iprot.readString(); struct.objects.add(_elem496); } iprot.readListEnd(); } struct.setObjectsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.permissions = new TDashboardPermissions(); struct.permissions.read(iprot); struct.setPermissionsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // GRANT_ROLE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.grant_role = iprot.readBool(); struct.setGrant_roleIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, share_dashboard_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DASHBOARD_ID_FIELD_DESC); oprot.writeI32(struct.dashboard_id); oprot.writeFieldEnd(); if (struct.groups != null) { oprot.writeFieldBegin(GROUPS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.groups.size())); for (java.lang.String _iter498 : struct.groups) { oprot.writeString(_iter498); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.objects != null) { oprot.writeFieldBegin(OBJECTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.objects.size())); for (java.lang.String _iter499 : struct.objects) { oprot.writeString(_iter499); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.permissions != null) { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); struct.permissions.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(GRANT_ROLE_FIELD_DESC); oprot.writeBool(struct.grant_role); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class share_dashboard_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public share_dashboard_argsTupleScheme getScheme() { return new share_dashboard_argsTupleScheme(); } } private static class share_dashboard_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<share_dashboard_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, share_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDashboard_id()) { optionals.set(1); } if (struct.isSetGroups()) { optionals.set(2); } if (struct.isSetObjects()) { optionals.set(3); } if (struct.isSetPermissions()) { optionals.set(4); } if (struct.isSetGrant_role()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDashboard_id()) { oprot.writeI32(struct.dashboard_id); } if (struct.isSetGroups()) { { oprot.writeI32(struct.groups.size()); for (java.lang.String _iter500 : struct.groups) { oprot.writeString(_iter500); } } } if (struct.isSetObjects()) { { oprot.writeI32(struct.objects.size()); for (java.lang.String _iter501 : struct.objects) { oprot.writeString(_iter501); } } } if (struct.isSetPermissions()) { struct.permissions.write(oprot); } if (struct.isSetGrant_role()) { oprot.writeBool(struct.grant_role); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, share_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list502 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.groups = new java.util.ArrayList<java.lang.String>(_list502.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem503; for (int _i504 = 0; _i504 < _list502.size; ++_i504) { _elem503 = iprot.readString(); struct.groups.add(_elem503); } } struct.setGroupsIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list505 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.objects = new java.util.ArrayList<java.lang.String>(_list505.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem506; for (int _i507 = 0; _i507 < _list505.size; ++_i507) { _elem506 = iprot.readString(); struct.objects.add(_elem506); } } struct.setObjectsIsSet(true); } if (incoming.get(4)) { struct.permissions = new TDashboardPermissions(); struct.permissions.read(iprot); struct.setPermissionsIsSet(true); } if (incoming.get(5)) { struct.grant_role = iprot.readBool(); struct.setGrant_roleIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class share_dashboard_result implements org.apache.thrift.TBase<share_dashboard_result, share_dashboard_result._Fields>, java.io.Serializable, Cloneable, Comparable<share_dashboard_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("share_dashboard_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new share_dashboard_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new share_dashboard_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(share_dashboard_result.class, metaDataMap); } public share_dashboard_result() { } public share_dashboard_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public share_dashboard_result(share_dashboard_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public share_dashboard_result deepCopy() { return new share_dashboard_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public share_dashboard_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof share_dashboard_result) return this.equals((share_dashboard_result)that); return false; } public boolean equals(share_dashboard_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(share_dashboard_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("share_dashboard_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class share_dashboard_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public share_dashboard_resultStandardScheme getScheme() { return new share_dashboard_resultStandardScheme(); } } private static class share_dashboard_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<share_dashboard_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, share_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, share_dashboard_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class share_dashboard_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public share_dashboard_resultTupleScheme getScheme() { return new share_dashboard_resultTupleScheme(); } } private static class share_dashboard_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<share_dashboard_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, share_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, share_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class unshare_dashboard_args implements org.apache.thrift.TBase<unshare_dashboard_args, unshare_dashboard_args._Fields>, java.io.Serializable, Cloneable, Comparable<unshare_dashboard_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unshare_dashboard_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DASHBOARD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("groups", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField OBJECTS_FIELD_DESC = new org.apache.thrift.protocol.TField("objects", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new unshare_dashboard_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new unshare_dashboard_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int dashboard_id; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> groups; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> objects; // required public @org.apache.thrift.annotation.Nullable TDashboardPermissions permissions; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DASHBOARD_ID((short)2, "dashboard_id"), GROUPS((short)3, "groups"), OBJECTS((short)4, "objects"), PERMISSIONS((short)5, "permissions"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DASHBOARD_ID return DASHBOARD_ID; case 3: // GROUPS return GROUPS; case 4: // OBJECTS return OBJECTS; case 5: // PERMISSIONS return PERMISSIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DASHBOARD_ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DASHBOARD_ID, new org.apache.thrift.meta_data.FieldMetaData("dashboard_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.GROUPS, new org.apache.thrift.meta_data.FieldMetaData("groups", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.OBJECTS, new org.apache.thrift.meta_data.FieldMetaData("objects", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDashboardPermissions.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unshare_dashboard_args.class, metaDataMap); } public unshare_dashboard_args() { } public unshare_dashboard_args( java.lang.String session, int dashboard_id, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> objects, TDashboardPermissions permissions) { this(); this.session = session; this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); this.groups = groups; this.objects = objects; this.permissions = permissions; } /** * Performs a deep copy on <i>other</i>. */ public unshare_dashboard_args(unshare_dashboard_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.dashboard_id = other.dashboard_id; if (other.isSetGroups()) { java.util.List<java.lang.String> __this__groups = new java.util.ArrayList<java.lang.String>(other.groups); this.groups = __this__groups; } if (other.isSetObjects()) { java.util.List<java.lang.String> __this__objects = new java.util.ArrayList<java.lang.String>(other.objects); this.objects = __this__objects; } if (other.isSetPermissions()) { this.permissions = new TDashboardPermissions(other.permissions); } } public unshare_dashboard_args deepCopy() { return new unshare_dashboard_args(this); } @Override public void clear() { this.session = null; setDashboard_idIsSet(false); this.dashboard_id = 0; this.groups = null; this.objects = null; this.permissions = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public unshare_dashboard_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDashboard_id() { return this.dashboard_id; } public unshare_dashboard_args setDashboard_id(int dashboard_id) { this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); return this; } public void unsetDashboard_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } /** Returns true if field dashboard_id is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } public void setDashboard_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID, value); } public int getGroupsSize() { return (this.groups == null) ? 0 : this.groups.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getGroupsIterator() { return (this.groups == null) ? null : this.groups.iterator(); } public void addToGroups(java.lang.String elem) { if (this.groups == null) { this.groups = new java.util.ArrayList<java.lang.String>(); } this.groups.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getGroups() { return this.groups; } public unshare_dashboard_args setGroups(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> groups) { this.groups = groups; return this; } public void unsetGroups() { this.groups = null; } /** Returns true if field groups is set (has been assigned a value) and false otherwise */ public boolean isSetGroups() { return this.groups != null; } public void setGroupsIsSet(boolean value) { if (!value) { this.groups = null; } } public int getObjectsSize() { return (this.objects == null) ? 0 : this.objects.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getObjectsIterator() { return (this.objects == null) ? null : this.objects.iterator(); } public void addToObjects(java.lang.String elem) { if (this.objects == null) { this.objects = new java.util.ArrayList<java.lang.String>(); } this.objects.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getObjects() { return this.objects; } public unshare_dashboard_args setObjects(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> objects) { this.objects = objects; return this; } public void unsetObjects() { this.objects = null; } /** Returns true if field objects is set (has been assigned a value) and false otherwise */ public boolean isSetObjects() { return this.objects != null; } public void setObjectsIsSet(boolean value) { if (!value) { this.objects = null; } } @org.apache.thrift.annotation.Nullable public TDashboardPermissions getPermissions() { return this.permissions; } public unshare_dashboard_args setPermissions(@org.apache.thrift.annotation.Nullable TDashboardPermissions permissions) { this.permissions = permissions; return this; } public void unsetPermissions() { this.permissions = null; } /** Returns true if field permissions is set (has been assigned a value) and false otherwise */ public boolean isSetPermissions() { return this.permissions != null; } public void setPermissionsIsSet(boolean value) { if (!value) { this.permissions = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DASHBOARD_ID: if (value == null) { unsetDashboard_id(); } else { setDashboard_id((java.lang.Integer)value); } break; case GROUPS: if (value == null) { unsetGroups(); } else { setGroups((java.util.List<java.lang.String>)value); } break; case OBJECTS: if (value == null) { unsetObjects(); } else { setObjects((java.util.List<java.lang.String>)value); } break; case PERMISSIONS: if (value == null) { unsetPermissions(); } else { setPermissions((TDashboardPermissions)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DASHBOARD_ID: return getDashboard_id(); case GROUPS: return getGroups(); case OBJECTS: return getObjects(); case PERMISSIONS: return getPermissions(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DASHBOARD_ID: return isSetDashboard_id(); case GROUPS: return isSetGroups(); case OBJECTS: return isSetObjects(); case PERMISSIONS: return isSetPermissions(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof unshare_dashboard_args) return this.equals((unshare_dashboard_args)that); return false; } public boolean equals(unshare_dashboard_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dashboard_id = true; boolean that_present_dashboard_id = true; if (this_present_dashboard_id || that_present_dashboard_id) { if (!(this_present_dashboard_id && that_present_dashboard_id)) return false; if (this.dashboard_id != that.dashboard_id) return false; } boolean this_present_groups = true && this.isSetGroups(); boolean that_present_groups = true && that.isSetGroups(); if (this_present_groups || that_present_groups) { if (!(this_present_groups && that_present_groups)) return false; if (!this.groups.equals(that.groups)) return false; } boolean this_present_objects = true && this.isSetObjects(); boolean that_present_objects = true && that.isSetObjects(); if (this_present_objects || that_present_objects) { if (!(this_present_objects && that_present_objects)) return false; if (!this.objects.equals(that.objects)) return false; } boolean this_present_permissions = true && this.isSetPermissions(); boolean that_present_permissions = true && that.isSetPermissions(); if (this_present_permissions || that_present_permissions) { if (!(this_present_permissions && that_present_permissions)) return false; if (!this.permissions.equals(that.permissions)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + dashboard_id; hashCode = hashCode * 8191 + ((isSetGroups()) ? 131071 : 524287); if (isSetGroups()) hashCode = hashCode * 8191 + groups.hashCode(); hashCode = hashCode * 8191 + ((isSetObjects()) ? 131071 : 524287); if (isSetObjects()) hashCode = hashCode * 8191 + objects.hashCode(); hashCode = hashCode * 8191 + ((isSetPermissions()) ? 131071 : 524287); if (isSetPermissions()) hashCode = hashCode * 8191 + permissions.hashCode(); return hashCode; } @Override public int compareTo(unshare_dashboard_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_id(), other.isSetDashboard_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_id, other.dashboard_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGroups(), other.isSetGroups()); if (lastComparison != 0) { return lastComparison; } if (isSetGroups()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groups, other.groups); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetObjects(), other.isSetObjects()); if (lastComparison != 0) { return lastComparison; } if (isSetObjects()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objects, other.objects); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPermissions(), other.isSetPermissions()); if (lastComparison != 0) { return lastComparison; } if (isSetPermissions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("unshare_dashboard_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dashboard_id:"); sb.append(this.dashboard_id); first = false; if (!first) sb.append(", "); sb.append("groups:"); if (this.groups == null) { sb.append("null"); } else { sb.append(this.groups); } first = false; if (!first) sb.append(", "); sb.append("objects:"); if (this.objects == null) { sb.append("null"); } else { sb.append(this.objects); } first = false; if (!first) sb.append(", "); sb.append("permissions:"); if (this.permissions == null) { sb.append("null"); } else { sb.append(this.permissions); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (permissions != null) { permissions.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class unshare_dashboard_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public unshare_dashboard_argsStandardScheme getScheme() { return new unshare_dashboard_argsStandardScheme(); } } private static class unshare_dashboard_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<unshare_dashboard_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, unshare_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DASHBOARD_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // GROUPS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list508 = iprot.readListBegin(); struct.groups = new java.util.ArrayList<java.lang.String>(_list508.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem509; for (int _i510 = 0; _i510 < _list508.size; ++_i510) { _elem509 = iprot.readString(); struct.groups.add(_elem509); } iprot.readListEnd(); } struct.setGroupsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // OBJECTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list511 = iprot.readListBegin(); struct.objects = new java.util.ArrayList<java.lang.String>(_list511.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem512; for (int _i513 = 0; _i513 < _list511.size; ++_i513) { _elem512 = iprot.readString(); struct.objects.add(_elem512); } iprot.readListEnd(); } struct.setObjectsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.permissions = new TDashboardPermissions(); struct.permissions.read(iprot); struct.setPermissionsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, unshare_dashboard_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DASHBOARD_ID_FIELD_DESC); oprot.writeI32(struct.dashboard_id); oprot.writeFieldEnd(); if (struct.groups != null) { oprot.writeFieldBegin(GROUPS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.groups.size())); for (java.lang.String _iter514 : struct.groups) { oprot.writeString(_iter514); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.objects != null) { oprot.writeFieldBegin(OBJECTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.objects.size())); for (java.lang.String _iter515 : struct.objects) { oprot.writeString(_iter515); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.permissions != null) { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); struct.permissions.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class unshare_dashboard_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public unshare_dashboard_argsTupleScheme getScheme() { return new unshare_dashboard_argsTupleScheme(); } } private static class unshare_dashboard_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<unshare_dashboard_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, unshare_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDashboard_id()) { optionals.set(1); } if (struct.isSetGroups()) { optionals.set(2); } if (struct.isSetObjects()) { optionals.set(3); } if (struct.isSetPermissions()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDashboard_id()) { oprot.writeI32(struct.dashboard_id); } if (struct.isSetGroups()) { { oprot.writeI32(struct.groups.size()); for (java.lang.String _iter516 : struct.groups) { oprot.writeString(_iter516); } } } if (struct.isSetObjects()) { { oprot.writeI32(struct.objects.size()); for (java.lang.String _iter517 : struct.objects) { oprot.writeString(_iter517); } } } if (struct.isSetPermissions()) { struct.permissions.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, unshare_dashboard_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list518 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.groups = new java.util.ArrayList<java.lang.String>(_list518.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem519; for (int _i520 = 0; _i520 < _list518.size; ++_i520) { _elem519 = iprot.readString(); struct.groups.add(_elem519); } } struct.setGroupsIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list521 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.objects = new java.util.ArrayList<java.lang.String>(_list521.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem522; for (int _i523 = 0; _i523 < _list521.size; ++_i523) { _elem522 = iprot.readString(); struct.objects.add(_elem522); } } struct.setObjectsIsSet(true); } if (incoming.get(4)) { struct.permissions = new TDashboardPermissions(); struct.permissions.read(iprot); struct.setPermissionsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class unshare_dashboard_result implements org.apache.thrift.TBase<unshare_dashboard_result, unshare_dashboard_result._Fields>, java.io.Serializable, Cloneable, Comparable<unshare_dashboard_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unshare_dashboard_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new unshare_dashboard_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new unshare_dashboard_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unshare_dashboard_result.class, metaDataMap); } public unshare_dashboard_result() { } public unshare_dashboard_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public unshare_dashboard_result(unshare_dashboard_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public unshare_dashboard_result deepCopy() { return new unshare_dashboard_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public unshare_dashboard_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof unshare_dashboard_result) return this.equals((unshare_dashboard_result)that); return false; } public boolean equals(unshare_dashboard_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(unshare_dashboard_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("unshare_dashboard_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class unshare_dashboard_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public unshare_dashboard_resultStandardScheme getScheme() { return new unshare_dashboard_resultStandardScheme(); } } private static class unshare_dashboard_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<unshare_dashboard_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, unshare_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, unshare_dashboard_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class unshare_dashboard_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public unshare_dashboard_resultTupleScheme getScheme() { return new unshare_dashboard_resultTupleScheme(); } } private static class unshare_dashboard_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<unshare_dashboard_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, unshare_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, unshare_dashboard_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class unshare_dashboards_args implements org.apache.thrift.TBase<unshare_dashboards_args, unshare_dashboards_args._Fields>, java.io.Serializable, Cloneable, Comparable<unshare_dashboards_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unshare_dashboards_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DASHBOARD_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_ids", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("groups", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new unshare_dashboards_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new unshare_dashboards_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> dashboard_ids; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> groups; // required public @org.apache.thrift.annotation.Nullable TDashboardPermissions permissions; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DASHBOARD_IDS((short)2, "dashboard_ids"), GROUPS((short)3, "groups"), PERMISSIONS((short)4, "permissions"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DASHBOARD_IDS return DASHBOARD_IDS; case 3: // GROUPS return GROUPS; case 4: // PERMISSIONS return PERMISSIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DASHBOARD_IDS, new org.apache.thrift.meta_data.FieldMetaData("dashboard_ids", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); tmpMap.put(_Fields.GROUPS, new org.apache.thrift.meta_data.FieldMetaData("groups", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDashboardPermissions.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unshare_dashboards_args.class, metaDataMap); } public unshare_dashboards_args() { } public unshare_dashboards_args( java.lang.String session, java.util.List<java.lang.Integer> dashboard_ids, java.util.List<java.lang.String> groups, TDashboardPermissions permissions) { this(); this.session = session; this.dashboard_ids = dashboard_ids; this.groups = groups; this.permissions = permissions; } /** * Performs a deep copy on <i>other</i>. */ public unshare_dashboards_args(unshare_dashboards_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetDashboard_ids()) { java.util.List<java.lang.Integer> __this__dashboard_ids = new java.util.ArrayList<java.lang.Integer>(other.dashboard_ids); this.dashboard_ids = __this__dashboard_ids; } if (other.isSetGroups()) { java.util.List<java.lang.String> __this__groups = new java.util.ArrayList<java.lang.String>(other.groups); this.groups = __this__groups; } if (other.isSetPermissions()) { this.permissions = new TDashboardPermissions(other.permissions); } } public unshare_dashboards_args deepCopy() { return new unshare_dashboards_args(this); } @Override public void clear() { this.session = null; this.dashboard_ids = null; this.groups = null; this.permissions = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public unshare_dashboards_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDashboard_idsSize() { return (this.dashboard_ids == null) ? 0 : this.dashboard_ids.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.Integer> getDashboard_idsIterator() { return (this.dashboard_ids == null) ? null : this.dashboard_ids.iterator(); } public void addToDashboard_ids(int elem) { if (this.dashboard_ids == null) { this.dashboard_ids = new java.util.ArrayList<java.lang.Integer>(); } this.dashboard_ids.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.Integer> getDashboard_ids() { return this.dashboard_ids; } public unshare_dashboards_args setDashboard_ids(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> dashboard_ids) { this.dashboard_ids = dashboard_ids; return this; } public void unsetDashboard_ids() { this.dashboard_ids = null; } /** Returns true if field dashboard_ids is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_ids() { return this.dashboard_ids != null; } public void setDashboard_idsIsSet(boolean value) { if (!value) { this.dashboard_ids = null; } } public int getGroupsSize() { return (this.groups == null) ? 0 : this.groups.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getGroupsIterator() { return (this.groups == null) ? null : this.groups.iterator(); } public void addToGroups(java.lang.String elem) { if (this.groups == null) { this.groups = new java.util.ArrayList<java.lang.String>(); } this.groups.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getGroups() { return this.groups; } public unshare_dashboards_args setGroups(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> groups) { this.groups = groups; return this; } public void unsetGroups() { this.groups = null; } /** Returns true if field groups is set (has been assigned a value) and false otherwise */ public boolean isSetGroups() { return this.groups != null; } public void setGroupsIsSet(boolean value) { if (!value) { this.groups = null; } } @org.apache.thrift.annotation.Nullable public TDashboardPermissions getPermissions() { return this.permissions; } public unshare_dashboards_args setPermissions(@org.apache.thrift.annotation.Nullable TDashboardPermissions permissions) { this.permissions = permissions; return this; } public void unsetPermissions() { this.permissions = null; } /** Returns true if field permissions is set (has been assigned a value) and false otherwise */ public boolean isSetPermissions() { return this.permissions != null; } public void setPermissionsIsSet(boolean value) { if (!value) { this.permissions = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DASHBOARD_IDS: if (value == null) { unsetDashboard_ids(); } else { setDashboard_ids((java.util.List<java.lang.Integer>)value); } break; case GROUPS: if (value == null) { unsetGroups(); } else { setGroups((java.util.List<java.lang.String>)value); } break; case PERMISSIONS: if (value == null) { unsetPermissions(); } else { setPermissions((TDashboardPermissions)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DASHBOARD_IDS: return getDashboard_ids(); case GROUPS: return getGroups(); case PERMISSIONS: return getPermissions(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DASHBOARD_IDS: return isSetDashboard_ids(); case GROUPS: return isSetGroups(); case PERMISSIONS: return isSetPermissions(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof unshare_dashboards_args) return this.equals((unshare_dashboards_args)that); return false; } public boolean equals(unshare_dashboards_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dashboard_ids = true && this.isSetDashboard_ids(); boolean that_present_dashboard_ids = true && that.isSetDashboard_ids(); if (this_present_dashboard_ids || that_present_dashboard_ids) { if (!(this_present_dashboard_ids && that_present_dashboard_ids)) return false; if (!this.dashboard_ids.equals(that.dashboard_ids)) return false; } boolean this_present_groups = true && this.isSetGroups(); boolean that_present_groups = true && that.isSetGroups(); if (this_present_groups || that_present_groups) { if (!(this_present_groups && that_present_groups)) return false; if (!this.groups.equals(that.groups)) return false; } boolean this_present_permissions = true && this.isSetPermissions(); boolean that_present_permissions = true && that.isSetPermissions(); if (this_present_permissions || that_present_permissions) { if (!(this_present_permissions && that_present_permissions)) return false; if (!this.permissions.equals(that.permissions)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetDashboard_ids()) ? 131071 : 524287); if (isSetDashboard_ids()) hashCode = hashCode * 8191 + dashboard_ids.hashCode(); hashCode = hashCode * 8191 + ((isSetGroups()) ? 131071 : 524287); if (isSetGroups()) hashCode = hashCode * 8191 + groups.hashCode(); hashCode = hashCode * 8191 + ((isSetPermissions()) ? 131071 : 524287); if (isSetPermissions()) hashCode = hashCode * 8191 + permissions.hashCode(); return hashCode; } @Override public int compareTo(unshare_dashboards_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_ids(), other.isSetDashboard_ids()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_ids()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_ids, other.dashboard_ids); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGroups(), other.isSetGroups()); if (lastComparison != 0) { return lastComparison; } if (isSetGroups()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groups, other.groups); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPermissions(), other.isSetPermissions()); if (lastComparison != 0) { return lastComparison; } if (isSetPermissions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("unshare_dashboards_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dashboard_ids:"); if (this.dashboard_ids == null) { sb.append("null"); } else { sb.append(this.dashboard_ids); } first = false; if (!first) sb.append(", "); sb.append("groups:"); if (this.groups == null) { sb.append("null"); } else { sb.append(this.groups); } first = false; if (!first) sb.append(", "); sb.append("permissions:"); if (this.permissions == null) { sb.append("null"); } else { sb.append(this.permissions); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (permissions != null) { permissions.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class unshare_dashboards_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public unshare_dashboards_argsStandardScheme getScheme() { return new unshare_dashboards_argsStandardScheme(); } } private static class unshare_dashboards_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<unshare_dashboards_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, unshare_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DASHBOARD_IDS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list524 = iprot.readListBegin(); struct.dashboard_ids = new java.util.ArrayList<java.lang.Integer>(_list524.size); int _elem525; for (int _i526 = 0; _i526 < _list524.size; ++_i526) { _elem525 = iprot.readI32(); struct.dashboard_ids.add(_elem525); } iprot.readListEnd(); } struct.setDashboard_idsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // GROUPS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list527 = iprot.readListBegin(); struct.groups = new java.util.ArrayList<java.lang.String>(_list527.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem528; for (int _i529 = 0; _i529 < _list527.size; ++_i529) { _elem528 = iprot.readString(); struct.groups.add(_elem528); } iprot.readListEnd(); } struct.setGroupsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.permissions = new TDashboardPermissions(); struct.permissions.read(iprot); struct.setPermissionsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, unshare_dashboards_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.dashboard_ids != null) { oprot.writeFieldBegin(DASHBOARD_IDS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.dashboard_ids.size())); for (int _iter530 : struct.dashboard_ids) { oprot.writeI32(_iter530); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.groups != null) { oprot.writeFieldBegin(GROUPS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.groups.size())); for (java.lang.String _iter531 : struct.groups) { oprot.writeString(_iter531); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.permissions != null) { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); struct.permissions.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class unshare_dashboards_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public unshare_dashboards_argsTupleScheme getScheme() { return new unshare_dashboards_argsTupleScheme(); } } private static class unshare_dashboards_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<unshare_dashboards_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, unshare_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDashboard_ids()) { optionals.set(1); } if (struct.isSetGroups()) { optionals.set(2); } if (struct.isSetPermissions()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDashboard_ids()) { { oprot.writeI32(struct.dashboard_ids.size()); for (int _iter532 : struct.dashboard_ids) { oprot.writeI32(_iter532); } } } if (struct.isSetGroups()) { { oprot.writeI32(struct.groups.size()); for (java.lang.String _iter533 : struct.groups) { oprot.writeString(_iter533); } } } if (struct.isSetPermissions()) { struct.permissions.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, unshare_dashboards_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list534 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.dashboard_ids = new java.util.ArrayList<java.lang.Integer>(_list534.size); int _elem535; for (int _i536 = 0; _i536 < _list534.size; ++_i536) { _elem535 = iprot.readI32(); struct.dashboard_ids.add(_elem535); } } struct.setDashboard_idsIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list537 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.groups = new java.util.ArrayList<java.lang.String>(_list537.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem538; for (int _i539 = 0; _i539 < _list537.size; ++_i539) { _elem538 = iprot.readString(); struct.groups.add(_elem538); } } struct.setGroupsIsSet(true); } if (incoming.get(3)) { struct.permissions = new TDashboardPermissions(); struct.permissions.read(iprot); struct.setPermissionsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class unshare_dashboards_result implements org.apache.thrift.TBase<unshare_dashboards_result, unshare_dashboards_result._Fields>, java.io.Serializable, Cloneable, Comparable<unshare_dashboards_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unshare_dashboards_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new unshare_dashboards_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new unshare_dashboards_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unshare_dashboards_result.class, metaDataMap); } public unshare_dashboards_result() { } public unshare_dashboards_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public unshare_dashboards_result(unshare_dashboards_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public unshare_dashboards_result deepCopy() { return new unshare_dashboards_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public unshare_dashboards_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof unshare_dashboards_result) return this.equals((unshare_dashboards_result)that); return false; } public boolean equals(unshare_dashboards_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(unshare_dashboards_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("unshare_dashboards_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class unshare_dashboards_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public unshare_dashboards_resultStandardScheme getScheme() { return new unshare_dashboards_resultStandardScheme(); } } private static class unshare_dashboards_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<unshare_dashboards_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, unshare_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, unshare_dashboards_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class unshare_dashboards_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public unshare_dashboards_resultTupleScheme getScheme() { return new unshare_dashboards_resultTupleScheme(); } } private static class unshare_dashboards_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<unshare_dashboards_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, unshare_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, unshare_dashboards_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_dashboard_grantees_args implements org.apache.thrift.TBase<get_dashboard_grantees_args, get_dashboard_grantees_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_dashboard_grantees_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_dashboard_grantees_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DASHBOARD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dashboard_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_dashboard_grantees_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_dashboard_grantees_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int dashboard_id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), DASHBOARD_ID((short)2, "dashboard_id"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // DASHBOARD_ID return DASHBOARD_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DASHBOARD_ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.DASHBOARD_ID, new org.apache.thrift.meta_data.FieldMetaData("dashboard_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_dashboard_grantees_args.class, metaDataMap); } public get_dashboard_grantees_args() { } public get_dashboard_grantees_args( java.lang.String session, int dashboard_id) { this(); this.session = session; this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public get_dashboard_grantees_args(get_dashboard_grantees_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.dashboard_id = other.dashboard_id; } public get_dashboard_grantees_args deepCopy() { return new get_dashboard_grantees_args(this); } @Override public void clear() { this.session = null; setDashboard_idIsSet(false); this.dashboard_id = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_dashboard_grantees_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getDashboard_id() { return this.dashboard_id; } public get_dashboard_grantees_args setDashboard_id(int dashboard_id) { this.dashboard_id = dashboard_id; setDashboard_idIsSet(true); return this; } public void unsetDashboard_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } /** Returns true if field dashboard_id is set (has been assigned a value) and false otherwise */ public boolean isSetDashboard_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID); } public void setDashboard_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DASHBOARD_ID_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case DASHBOARD_ID: if (value == null) { unsetDashboard_id(); } else { setDashboard_id((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case DASHBOARD_ID: return getDashboard_id(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case DASHBOARD_ID: return isSetDashboard_id(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_dashboard_grantees_args) return this.equals((get_dashboard_grantees_args)that); return false; } public boolean equals(get_dashboard_grantees_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_dashboard_id = true; boolean that_present_dashboard_id = true; if (this_present_dashboard_id || that_present_dashboard_id) { if (!(this_present_dashboard_id && that_present_dashboard_id)) return false; if (this.dashboard_id != that.dashboard_id) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + dashboard_id; return hashCode; } @Override public int compareTo(get_dashboard_grantees_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDashboard_id(), other.isSetDashboard_id()); if (lastComparison != 0) { return lastComparison; } if (isSetDashboard_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dashboard_id, other.dashboard_id); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_dashboard_grantees_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("dashboard_id:"); sb.append(this.dashboard_id); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_dashboard_grantees_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboard_grantees_argsStandardScheme getScheme() { return new get_dashboard_grantees_argsStandardScheme(); } } private static class get_dashboard_grantees_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_dashboard_grantees_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_dashboard_grantees_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DASHBOARD_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_dashboard_grantees_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DASHBOARD_ID_FIELD_DESC); oprot.writeI32(struct.dashboard_id); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_dashboard_grantees_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboard_grantees_argsTupleScheme getScheme() { return new get_dashboard_grantees_argsTupleScheme(); } } private static class get_dashboard_grantees_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_dashboard_grantees_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_dashboard_grantees_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetDashboard_id()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetDashboard_id()) { oprot.writeI32(struct.dashboard_id); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_dashboard_grantees_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.dashboard_id = iprot.readI32(); struct.setDashboard_idIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_dashboard_grantees_result implements org.apache.thrift.TBase<get_dashboard_grantees_result, get_dashboard_grantees_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_dashboard_grantees_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_dashboard_grantees_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_dashboard_grantees_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_dashboard_grantees_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TDashboardGrantees> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDashboardGrantees.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_dashboard_grantees_result.class, metaDataMap); } public get_dashboard_grantees_result() { } public get_dashboard_grantees_result( java.util.List<TDashboardGrantees> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_dashboard_grantees_result(get_dashboard_grantees_result other) { if (other.isSetSuccess()) { java.util.List<TDashboardGrantees> __this__success = new java.util.ArrayList<TDashboardGrantees>(other.success.size()); for (TDashboardGrantees other_element : other.success) { __this__success.add(new TDashboardGrantees(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_dashboard_grantees_result deepCopy() { return new get_dashboard_grantees_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TDashboardGrantees> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TDashboardGrantees elem) { if (this.success == null) { this.success = new java.util.ArrayList<TDashboardGrantees>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TDashboardGrantees> getSuccess() { return this.success; } public get_dashboard_grantees_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TDashboardGrantees> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_dashboard_grantees_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TDashboardGrantees>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_dashboard_grantees_result) return this.equals((get_dashboard_grantees_result)that); return false; } public boolean equals(get_dashboard_grantees_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_dashboard_grantees_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_dashboard_grantees_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_dashboard_grantees_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboard_grantees_resultStandardScheme getScheme() { return new get_dashboard_grantees_resultStandardScheme(); } } private static class get_dashboard_grantees_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_dashboard_grantees_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_dashboard_grantees_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list540 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TDashboardGrantees>(_list540.size); @org.apache.thrift.annotation.Nullable TDashboardGrantees _elem541; for (int _i542 = 0; _i542 < _list540.size; ++_i542) { _elem541 = new TDashboardGrantees(); _elem541.read(iprot); struct.success.add(_elem541); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_dashboard_grantees_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TDashboardGrantees _iter543 : struct.success) { _iter543.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_dashboard_grantees_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_dashboard_grantees_resultTupleScheme getScheme() { return new get_dashboard_grantees_resultTupleScheme(); } } private static class get_dashboard_grantees_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_dashboard_grantees_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_dashboard_grantees_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TDashboardGrantees _iter544 : struct.success) { _iter544.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_dashboard_grantees_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list545 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TDashboardGrantees>(_list545.size); @org.apache.thrift.annotation.Nullable TDashboardGrantees _elem546; for (int _i547 = 0; _i547 < _list545.size; ++_i547) { _elem546 = new TDashboardGrantees(); _elem546.read(iprot); struct.success.add(_elem546); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_link_view_args implements org.apache.thrift.TBase<get_link_view_args, get_link_view_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_link_view_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_link_view_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField LINK_FIELD_DESC = new org.apache.thrift.protocol.TField("link", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_link_view_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_link_view_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String link; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), LINK((short)2, "link"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // LINK return LINK; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.LINK, new org.apache.thrift.meta_data.FieldMetaData("link", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_link_view_args.class, metaDataMap); } public get_link_view_args() { } public get_link_view_args( java.lang.String session, java.lang.String link) { this(); this.session = session; this.link = link; } /** * Performs a deep copy on <i>other</i>. */ public get_link_view_args(get_link_view_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetLink()) { this.link = other.link; } } public get_link_view_args deepCopy() { return new get_link_view_args(this); } @Override public void clear() { this.session = null; this.link = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_link_view_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLink() { return this.link; } public get_link_view_args setLink(@org.apache.thrift.annotation.Nullable java.lang.String link) { this.link = link; return this; } public void unsetLink() { this.link = null; } /** Returns true if field link is set (has been assigned a value) and false otherwise */ public boolean isSetLink() { return this.link != null; } public void setLinkIsSet(boolean value) { if (!value) { this.link = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case LINK: if (value == null) { unsetLink(); } else { setLink((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case LINK: return getLink(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case LINK: return isSetLink(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_link_view_args) return this.equals((get_link_view_args)that); return false; } public boolean equals(get_link_view_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_link = true && this.isSetLink(); boolean that_present_link = true && that.isSetLink(); if (this_present_link || that_present_link) { if (!(this_present_link && that_present_link)) return false; if (!this.link.equals(that.link)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetLink()) ? 131071 : 524287); if (isSetLink()) hashCode = hashCode * 8191 + link.hashCode(); return hashCode; } @Override public int compareTo(get_link_view_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetLink(), other.isSetLink()); if (lastComparison != 0) { return lastComparison; } if (isSetLink()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.link, other.link); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_link_view_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("link:"); if (this.link == null) { sb.append("null"); } else { sb.append(this.link); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_link_view_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_link_view_argsStandardScheme getScheme() { return new get_link_view_argsStandardScheme(); } } private static class get_link_view_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_link_view_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_link_view_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // LINK if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.link = iprot.readString(); struct.setLinkIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_link_view_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.link != null) { oprot.writeFieldBegin(LINK_FIELD_DESC); oprot.writeString(struct.link); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_link_view_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_link_view_argsTupleScheme getScheme() { return new get_link_view_argsTupleScheme(); } } private static class get_link_view_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_link_view_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_link_view_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetLink()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetLink()) { oprot.writeString(struct.link); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_link_view_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.link = iprot.readString(); struct.setLinkIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_link_view_result implements org.apache.thrift.TBase<get_link_view_result, get_link_view_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_link_view_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_link_view_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_link_view_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_link_view_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TFrontendView success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFrontendView.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_link_view_result.class, metaDataMap); } public get_link_view_result() { } public get_link_view_result( TFrontendView success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_link_view_result(get_link_view_result other) { if (other.isSetSuccess()) { this.success = new TFrontendView(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_link_view_result deepCopy() { return new get_link_view_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TFrontendView getSuccess() { return this.success; } public get_link_view_result setSuccess(@org.apache.thrift.annotation.Nullable TFrontendView success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_link_view_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TFrontendView)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_link_view_result) return this.equals((get_link_view_result)that); return false; } public boolean equals(get_link_view_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_link_view_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_link_view_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_link_view_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_link_view_resultStandardScheme getScheme() { return new get_link_view_resultStandardScheme(); } } private static class get_link_view_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_link_view_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_link_view_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TFrontendView(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_link_view_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_link_view_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_link_view_resultTupleScheme getScheme() { return new get_link_view_resultTupleScheme(); } } private static class get_link_view_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_link_view_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_link_view_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_link_view_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TFrontendView(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class create_link_args implements org.apache.thrift.TBase<create_link_args, create_link_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_link_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_link_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField VIEW_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("view_state", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField VIEW_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("view_metadata", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_link_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_link_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String view_state; // required public @org.apache.thrift.annotation.Nullable java.lang.String view_metadata; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), VIEW_STATE((short)2, "view_state"), VIEW_METADATA((short)3, "view_metadata"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // VIEW_STATE return VIEW_STATE; case 3: // VIEW_METADATA return VIEW_METADATA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.VIEW_STATE, new org.apache.thrift.meta_data.FieldMetaData("view_state", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VIEW_METADATA, new org.apache.thrift.meta_data.FieldMetaData("view_metadata", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_link_args.class, metaDataMap); } public create_link_args() { } public create_link_args( java.lang.String session, java.lang.String view_state, java.lang.String view_metadata) { this(); this.session = session; this.view_state = view_state; this.view_metadata = view_metadata; } /** * Performs a deep copy on <i>other</i>. */ public create_link_args(create_link_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetView_state()) { this.view_state = other.view_state; } if (other.isSetView_metadata()) { this.view_metadata = other.view_metadata; } } public create_link_args deepCopy() { return new create_link_args(this); } @Override public void clear() { this.session = null; this.view_state = null; this.view_metadata = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public create_link_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getView_state() { return this.view_state; } public create_link_args setView_state(@org.apache.thrift.annotation.Nullable java.lang.String view_state) { this.view_state = view_state; return this; } public void unsetView_state() { this.view_state = null; } /** Returns true if field view_state is set (has been assigned a value) and false otherwise */ public boolean isSetView_state() { return this.view_state != null; } public void setView_stateIsSet(boolean value) { if (!value) { this.view_state = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getView_metadata() { return this.view_metadata; } public create_link_args setView_metadata(@org.apache.thrift.annotation.Nullable java.lang.String view_metadata) { this.view_metadata = view_metadata; return this; } public void unsetView_metadata() { this.view_metadata = null; } /** Returns true if field view_metadata is set (has been assigned a value) and false otherwise */ public boolean isSetView_metadata() { return this.view_metadata != null; } public void setView_metadataIsSet(boolean value) { if (!value) { this.view_metadata = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case VIEW_STATE: if (value == null) { unsetView_state(); } else { setView_state((java.lang.String)value); } break; case VIEW_METADATA: if (value == null) { unsetView_metadata(); } else { setView_metadata((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case VIEW_STATE: return getView_state(); case VIEW_METADATA: return getView_metadata(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case VIEW_STATE: return isSetView_state(); case VIEW_METADATA: return isSetView_metadata(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof create_link_args) return this.equals((create_link_args)that); return false; } public boolean equals(create_link_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_view_state = true && this.isSetView_state(); boolean that_present_view_state = true && that.isSetView_state(); if (this_present_view_state || that_present_view_state) { if (!(this_present_view_state && that_present_view_state)) return false; if (!this.view_state.equals(that.view_state)) return false; } boolean this_present_view_metadata = true && this.isSetView_metadata(); boolean that_present_view_metadata = true && that.isSetView_metadata(); if (this_present_view_metadata || that_present_view_metadata) { if (!(this_present_view_metadata && that_present_view_metadata)) return false; if (!this.view_metadata.equals(that.view_metadata)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetView_state()) ? 131071 : 524287); if (isSetView_state()) hashCode = hashCode * 8191 + view_state.hashCode(); hashCode = hashCode * 8191 + ((isSetView_metadata()) ? 131071 : 524287); if (isSetView_metadata()) hashCode = hashCode * 8191 + view_metadata.hashCode(); return hashCode; } @Override public int compareTo(create_link_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetView_state(), other.isSetView_state()); if (lastComparison != 0) { return lastComparison; } if (isSetView_state()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.view_state, other.view_state); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetView_metadata(), other.isSetView_metadata()); if (lastComparison != 0) { return lastComparison; } if (isSetView_metadata()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.view_metadata, other.view_metadata); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("create_link_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("view_state:"); if (this.view_state == null) { sb.append("null"); } else { sb.append(this.view_state); } first = false; if (!first) sb.append(", "); sb.append("view_metadata:"); if (this.view_metadata == null) { sb.append("null"); } else { sb.append(this.view_metadata); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_link_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_link_argsStandardScheme getScheme() { return new create_link_argsStandardScheme(); } } private static class create_link_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<create_link_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, create_link_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // VIEW_STATE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.view_state = iprot.readString(); struct.setView_stateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // VIEW_METADATA if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.view_metadata = iprot.readString(); struct.setView_metadataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_link_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.view_state != null) { oprot.writeFieldBegin(VIEW_STATE_FIELD_DESC); oprot.writeString(struct.view_state); oprot.writeFieldEnd(); } if (struct.view_metadata != null) { oprot.writeFieldBegin(VIEW_METADATA_FIELD_DESC); oprot.writeString(struct.view_metadata); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_link_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_link_argsTupleScheme getScheme() { return new create_link_argsTupleScheme(); } } private static class create_link_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<create_link_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_link_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetView_state()) { optionals.set(1); } if (struct.isSetView_metadata()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetView_state()) { oprot.writeString(struct.view_state); } if (struct.isSetView_metadata()) { oprot.writeString(struct.view_metadata); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_link_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.view_state = iprot.readString(); struct.setView_stateIsSet(true); } if (incoming.get(2)) { struct.view_metadata = iprot.readString(); struct.setView_metadataIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class create_link_result implements org.apache.thrift.TBase<create_link_result, create_link_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_link_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_link_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_link_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_link_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_link_result.class, metaDataMap); } public create_link_result() { } public create_link_result( java.lang.String success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public create_link_result(create_link_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public create_link_result deepCopy() { return new create_link_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public create_link_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public create_link_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof create_link_result) return this.equals((create_link_result)that); return false; } public boolean equals(create_link_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(create_link_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("create_link_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_link_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_link_resultStandardScheme getScheme() { return new create_link_resultStandardScheme(); } } private static class create_link_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<create_link_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, create_link_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_link_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_link_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_link_resultTupleScheme getScheme() { return new create_link_resultTupleScheme(); } } private static class create_link_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<create_link_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_link_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_link_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class load_table_binary_args implements org.apache.thrift.TBase<load_table_binary_args, load_table_binary_args._Fields>, java.io.Serializable, Cloneable, Comparable<load_table_binary_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_table_binary_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField COLUMN_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("column_names", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_table_binary_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_table_binary_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public @org.apache.thrift.annotation.Nullable java.util.List<TRow> rows; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), ROWS((short)3, "rows"), COLUMN_NAMES((short)4, "column_names"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // ROWS return ROWS; case 4: // COLUMN_NAMES return COLUMN_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRow.class)))); tmpMap.put(_Fields.COLUMN_NAMES, new org.apache.thrift.meta_data.FieldMetaData("column_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_table_binary_args.class, metaDataMap); } public load_table_binary_args() { this.column_names = new java.util.ArrayList<java.lang.String>(); } public load_table_binary_args( java.lang.String session, java.lang.String table_name, java.util.List<TRow> rows, java.util.List<java.lang.String> column_names) { this(); this.session = session; this.table_name = table_name; this.rows = rows; this.column_names = column_names; } /** * Performs a deep copy on <i>other</i>. */ public load_table_binary_args(load_table_binary_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetRows()) { java.util.List<TRow> __this__rows = new java.util.ArrayList<TRow>(other.rows.size()); for (TRow other_element : other.rows) { __this__rows.add(new TRow(other_element)); } this.rows = __this__rows; } if (other.isSetColumn_names()) { java.util.List<java.lang.String> __this__column_names = new java.util.ArrayList<java.lang.String>(other.column_names); this.column_names = __this__column_names; } } public load_table_binary_args deepCopy() { return new load_table_binary_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.rows = null; this.column_names = new java.util.ArrayList<java.lang.String>(); } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public load_table_binary_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public load_table_binary_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public int getRowsSize() { return (this.rows == null) ? 0 : this.rows.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TRow> getRowsIterator() { return (this.rows == null) ? null : this.rows.iterator(); } public void addToRows(TRow elem) { if (this.rows == null) { this.rows = new java.util.ArrayList<TRow>(); } this.rows.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TRow> getRows() { return this.rows; } public load_table_binary_args setRows(@org.apache.thrift.annotation.Nullable java.util.List<TRow> rows) { this.rows = rows; return this; } public void unsetRows() { this.rows = null; } /** Returns true if field rows is set (has been assigned a value) and false otherwise */ public boolean isSetRows() { return this.rows != null; } public void setRowsIsSet(boolean value) { if (!value) { this.rows = null; } } public int getColumn_namesSize() { return (this.column_names == null) ? 0 : this.column_names.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getColumn_namesIterator() { return (this.column_names == null) ? null : this.column_names.iterator(); } public void addToColumn_names(java.lang.String elem) { if (this.column_names == null) { this.column_names = new java.util.ArrayList<java.lang.String>(); } this.column_names.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getColumn_names() { return this.column_names; } public load_table_binary_args setColumn_names(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names) { this.column_names = column_names; return this; } public void unsetColumn_names() { this.column_names = null; } /** Returns true if field column_names is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_names() { return this.column_names != null; } public void setColumn_namesIsSet(boolean value) { if (!value) { this.column_names = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case ROWS: if (value == null) { unsetRows(); } else { setRows((java.util.List<TRow>)value); } break; case COLUMN_NAMES: if (value == null) { unsetColumn_names(); } else { setColumn_names((java.util.List<java.lang.String>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case ROWS: return getRows(); case COLUMN_NAMES: return getColumn_names(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case ROWS: return isSetRows(); case COLUMN_NAMES: return isSetColumn_names(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof load_table_binary_args) return this.equals((load_table_binary_args)that); return false; } public boolean equals(load_table_binary_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_rows = true && this.isSetRows(); boolean that_present_rows = true && that.isSetRows(); if (this_present_rows || that_present_rows) { if (!(this_present_rows && that_present_rows)) return false; if (!this.rows.equals(that.rows)) return false; } boolean this_present_column_names = true && this.isSetColumn_names(); boolean that_present_column_names = true && that.isSetColumn_names(); if (this_present_column_names || that_present_column_names) { if (!(this_present_column_names && that_present_column_names)) return false; if (!this.column_names.equals(that.column_names)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((isSetRows()) ? 131071 : 524287); if (isSetRows()) hashCode = hashCode * 8191 + rows.hashCode(); hashCode = hashCode * 8191 + ((isSetColumn_names()) ? 131071 : 524287); if (isSetColumn_names()) hashCode = hashCode * 8191 + column_names.hashCode(); return hashCode; } @Override public int compareTo(load_table_binary_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRows(), other.isSetRows()); if (lastComparison != 0) { return lastComparison; } if (isSetRows()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, other.rows); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetColumn_names(), other.isSetColumn_names()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_names, other.column_names); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("load_table_binary_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("rows:"); if (this.rows == null) { sb.append("null"); } else { sb.append(this.rows); } first = false; if (!first) sb.append(", "); sb.append("column_names:"); if (this.column_names == null) { sb.append("null"); } else { sb.append(this.column_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class load_table_binary_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_argsStandardScheme getScheme() { return new load_table_binary_argsStandardScheme(); } } private static class load_table_binary_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_table_binary_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, load_table_binary_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ROWS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list548 = iprot.readListBegin(); struct.rows = new java.util.ArrayList<TRow>(_list548.size); @org.apache.thrift.annotation.Nullable TRow _elem549; for (int _i550 = 0; _i550 < _list548.size; ++_i550) { _elem549 = new TRow(); _elem549.read(iprot); struct.rows.add(_elem549); } iprot.readListEnd(); } struct.setRowsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // COLUMN_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list551 = iprot.readListBegin(); struct.column_names = new java.util.ArrayList<java.lang.String>(_list551.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem552; for (int _i553 = 0; _i553 < _list551.size; ++_i553) { _elem552 = iprot.readString(); struct.column_names.add(_elem552); } iprot.readListEnd(); } struct.setColumn_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, load_table_binary_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.rows != null) { oprot.writeFieldBegin(ROWS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.rows.size())); for (TRow _iter554 : struct.rows) { _iter554.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.column_names != null) { oprot.writeFieldBegin(COLUMN_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.column_names.size())); for (java.lang.String _iter555 : struct.column_names) { oprot.writeString(_iter555); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class load_table_binary_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_argsTupleScheme getScheme() { return new load_table_binary_argsTupleScheme(); } } private static class load_table_binary_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_table_binary_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, load_table_binary_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetRows()) { optionals.set(2); } if (struct.isSetColumn_names()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetRows()) { { oprot.writeI32(struct.rows.size()); for (TRow _iter556 : struct.rows) { _iter556.write(oprot); } } } if (struct.isSetColumn_names()) { { oprot.writeI32(struct.column_names.size()); for (java.lang.String _iter557 : struct.column_names) { oprot.writeString(_iter557); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, load_table_binary_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list558 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.rows = new java.util.ArrayList<TRow>(_list558.size); @org.apache.thrift.annotation.Nullable TRow _elem559; for (int _i560 = 0; _i560 < _list558.size; ++_i560) { _elem559 = new TRow(); _elem559.read(iprot); struct.rows.add(_elem559); } } struct.setRowsIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list561 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.column_names = new java.util.ArrayList<java.lang.String>(_list561.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem562; for (int _i563 = 0; _i563 < _list561.size; ++_i563) { _elem562 = iprot.readString(); struct.column_names.add(_elem562); } } struct.setColumn_namesIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class load_table_binary_result implements org.apache.thrift.TBase<load_table_binary_result, load_table_binary_result._Fields>, java.io.Serializable, Cloneable, Comparable<load_table_binary_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_table_binary_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_table_binary_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_table_binary_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_table_binary_result.class, metaDataMap); } public load_table_binary_result() { } public load_table_binary_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public load_table_binary_result(load_table_binary_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public load_table_binary_result deepCopy() { return new load_table_binary_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public load_table_binary_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof load_table_binary_result) return this.equals((load_table_binary_result)that); return false; } public boolean equals(load_table_binary_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(load_table_binary_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("load_table_binary_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class load_table_binary_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_resultStandardScheme getScheme() { return new load_table_binary_resultStandardScheme(); } } private static class load_table_binary_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_table_binary_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, load_table_binary_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, load_table_binary_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class load_table_binary_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_resultTupleScheme getScheme() { return new load_table_binary_resultTupleScheme(); } } private static class load_table_binary_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_table_binary_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, load_table_binary_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, load_table_binary_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class load_table_binary_columnar_args implements org.apache.thrift.TBase<load_table_binary_columnar_args, load_table_binary_columnar_args._Fields>, java.io.Serializable, Cloneable, Comparable<load_table_binary_columnar_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_table_binary_columnar_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("cols", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField COLUMN_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("column_names", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_table_binary_columnar_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_table_binary_columnar_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public @org.apache.thrift.annotation.Nullable java.util.List<TColumn> cols; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), COLS((short)3, "cols"), COLUMN_NAMES((short)4, "column_names"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // COLS return COLS; case 4: // COLUMN_NAMES return COLUMN_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLS, new org.apache.thrift.meta_data.FieldMetaData("cols", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumn.class)))); tmpMap.put(_Fields.COLUMN_NAMES, new org.apache.thrift.meta_data.FieldMetaData("column_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_table_binary_columnar_args.class, metaDataMap); } public load_table_binary_columnar_args() { this.column_names = new java.util.ArrayList<java.lang.String>(); } public load_table_binary_columnar_args( java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names) { this(); this.session = session; this.table_name = table_name; this.cols = cols; this.column_names = column_names; } /** * Performs a deep copy on <i>other</i>. */ public load_table_binary_columnar_args(load_table_binary_columnar_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetCols()) { java.util.List<TColumn> __this__cols = new java.util.ArrayList<TColumn>(other.cols.size()); for (TColumn other_element : other.cols) { __this__cols.add(new TColumn(other_element)); } this.cols = __this__cols; } if (other.isSetColumn_names()) { java.util.List<java.lang.String> __this__column_names = new java.util.ArrayList<java.lang.String>(other.column_names); this.column_names = __this__column_names; } } public load_table_binary_columnar_args deepCopy() { return new load_table_binary_columnar_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.cols = null; this.column_names = new java.util.ArrayList<java.lang.String>(); } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public load_table_binary_columnar_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public load_table_binary_columnar_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public int getColsSize() { return (this.cols == null) ? 0 : this.cols.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TColumn> getColsIterator() { return (this.cols == null) ? null : this.cols.iterator(); } public void addToCols(TColumn elem) { if (this.cols == null) { this.cols = new java.util.ArrayList<TColumn>(); } this.cols.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TColumn> getCols() { return this.cols; } public load_table_binary_columnar_args setCols(@org.apache.thrift.annotation.Nullable java.util.List<TColumn> cols) { this.cols = cols; return this; } public void unsetCols() { this.cols = null; } /** Returns true if field cols is set (has been assigned a value) and false otherwise */ public boolean isSetCols() { return this.cols != null; } public void setColsIsSet(boolean value) { if (!value) { this.cols = null; } } public int getColumn_namesSize() { return (this.column_names == null) ? 0 : this.column_names.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getColumn_namesIterator() { return (this.column_names == null) ? null : this.column_names.iterator(); } public void addToColumn_names(java.lang.String elem) { if (this.column_names == null) { this.column_names = new java.util.ArrayList<java.lang.String>(); } this.column_names.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getColumn_names() { return this.column_names; } public load_table_binary_columnar_args setColumn_names(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names) { this.column_names = column_names; return this; } public void unsetColumn_names() { this.column_names = null; } /** Returns true if field column_names is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_names() { return this.column_names != null; } public void setColumn_namesIsSet(boolean value) { if (!value) { this.column_names = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case COLS: if (value == null) { unsetCols(); } else { setCols((java.util.List<TColumn>)value); } break; case COLUMN_NAMES: if (value == null) { unsetColumn_names(); } else { setColumn_names((java.util.List<java.lang.String>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case COLS: return getCols(); case COLUMN_NAMES: return getColumn_names(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case COLS: return isSetCols(); case COLUMN_NAMES: return isSetColumn_names(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof load_table_binary_columnar_args) return this.equals((load_table_binary_columnar_args)that); return false; } public boolean equals(load_table_binary_columnar_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_cols = true && this.isSetCols(); boolean that_present_cols = true && that.isSetCols(); if (this_present_cols || that_present_cols) { if (!(this_present_cols && that_present_cols)) return false; if (!this.cols.equals(that.cols)) return false; } boolean this_present_column_names = true && this.isSetColumn_names(); boolean that_present_column_names = true && that.isSetColumn_names(); if (this_present_column_names || that_present_column_names) { if (!(this_present_column_names && that_present_column_names)) return false; if (!this.column_names.equals(that.column_names)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((isSetCols()) ? 131071 : 524287); if (isSetCols()) hashCode = hashCode * 8191 + cols.hashCode(); hashCode = hashCode * 8191 + ((isSetColumn_names()) ? 131071 : 524287); if (isSetColumn_names()) hashCode = hashCode * 8191 + column_names.hashCode(); return hashCode; } @Override public int compareTo(load_table_binary_columnar_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCols(), other.isSetCols()); if (lastComparison != 0) { return lastComparison; } if (isSetCols()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cols, other.cols); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetColumn_names(), other.isSetColumn_names()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_names, other.column_names); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("load_table_binary_columnar_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("cols:"); if (this.cols == null) { sb.append("null"); } else { sb.append(this.cols); } first = false; if (!first) sb.append(", "); sb.append("column_names:"); if (this.column_names == null) { sb.append("null"); } else { sb.append(this.column_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class load_table_binary_columnar_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_columnar_argsStandardScheme getScheme() { return new load_table_binary_columnar_argsStandardScheme(); } } private static class load_table_binary_columnar_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_table_binary_columnar_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, load_table_binary_columnar_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COLS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list564 = iprot.readListBegin(); struct.cols = new java.util.ArrayList<TColumn>(_list564.size); @org.apache.thrift.annotation.Nullable TColumn _elem565; for (int _i566 = 0; _i566 < _list564.size; ++_i566) { _elem565 = new TColumn(); _elem565.read(iprot); struct.cols.add(_elem565); } iprot.readListEnd(); } struct.setColsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // COLUMN_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list567 = iprot.readListBegin(); struct.column_names = new java.util.ArrayList<java.lang.String>(_list567.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem568; for (int _i569 = 0; _i569 < _list567.size; ++_i569) { _elem568 = iprot.readString(); struct.column_names.add(_elem568); } iprot.readListEnd(); } struct.setColumn_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, load_table_binary_columnar_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.cols != null) { oprot.writeFieldBegin(COLS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.cols.size())); for (TColumn _iter570 : struct.cols) { _iter570.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.column_names != null) { oprot.writeFieldBegin(COLUMN_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.column_names.size())); for (java.lang.String _iter571 : struct.column_names) { oprot.writeString(_iter571); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class load_table_binary_columnar_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_columnar_argsTupleScheme getScheme() { return new load_table_binary_columnar_argsTupleScheme(); } } private static class load_table_binary_columnar_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_table_binary_columnar_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, load_table_binary_columnar_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetCols()) { optionals.set(2); } if (struct.isSetColumn_names()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetCols()) { { oprot.writeI32(struct.cols.size()); for (TColumn _iter572 : struct.cols) { _iter572.write(oprot); } } } if (struct.isSetColumn_names()) { { oprot.writeI32(struct.column_names.size()); for (java.lang.String _iter573 : struct.column_names) { oprot.writeString(_iter573); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, load_table_binary_columnar_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list574 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.cols = new java.util.ArrayList<TColumn>(_list574.size); @org.apache.thrift.annotation.Nullable TColumn _elem575; for (int _i576 = 0; _i576 < _list574.size; ++_i576) { _elem575 = new TColumn(); _elem575.read(iprot); struct.cols.add(_elem575); } } struct.setColsIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list577 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.column_names = new java.util.ArrayList<java.lang.String>(_list577.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem578; for (int _i579 = 0; _i579 < _list577.size; ++_i579) { _elem578 = iprot.readString(); struct.column_names.add(_elem578); } } struct.setColumn_namesIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class load_table_binary_columnar_result implements org.apache.thrift.TBase<load_table_binary_columnar_result, load_table_binary_columnar_result._Fields>, java.io.Serializable, Cloneable, Comparable<load_table_binary_columnar_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_table_binary_columnar_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_table_binary_columnar_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_table_binary_columnar_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_table_binary_columnar_result.class, metaDataMap); } public load_table_binary_columnar_result() { } public load_table_binary_columnar_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public load_table_binary_columnar_result(load_table_binary_columnar_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public load_table_binary_columnar_result deepCopy() { return new load_table_binary_columnar_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public load_table_binary_columnar_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof load_table_binary_columnar_result) return this.equals((load_table_binary_columnar_result)that); return false; } public boolean equals(load_table_binary_columnar_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(load_table_binary_columnar_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("load_table_binary_columnar_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class load_table_binary_columnar_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_columnar_resultStandardScheme getScheme() { return new load_table_binary_columnar_resultStandardScheme(); } } private static class load_table_binary_columnar_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_table_binary_columnar_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, load_table_binary_columnar_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, load_table_binary_columnar_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class load_table_binary_columnar_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_columnar_resultTupleScheme getScheme() { return new load_table_binary_columnar_resultTupleScheme(); } } private static class load_table_binary_columnar_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_table_binary_columnar_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, load_table_binary_columnar_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, load_table_binary_columnar_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class load_table_binary_columnar_polys_args implements org.apache.thrift.TBase<load_table_binary_columnar_polys_args, load_table_binary_columnar_polys_args._Fields>, java.io.Serializable, Cloneable, Comparable<load_table_binary_columnar_polys_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_table_binary_columnar_polys_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("cols", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField COLUMN_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("column_names", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.protocol.TField ASSIGN_RENDER_GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("assign_render_groups", org.apache.thrift.protocol.TType.BOOL, (short)5); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_table_binary_columnar_polys_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_table_binary_columnar_polys_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public @org.apache.thrift.annotation.Nullable java.util.List<TColumn> cols; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names; // required public boolean assign_render_groups; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), COLS((short)3, "cols"), COLUMN_NAMES((short)4, "column_names"), ASSIGN_RENDER_GROUPS((short)5, "assign_render_groups"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // COLS return COLS; case 4: // COLUMN_NAMES return COLUMN_NAMES; case 5: // ASSIGN_RENDER_GROUPS return ASSIGN_RENDER_GROUPS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __ASSIGN_RENDER_GROUPS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLS, new org.apache.thrift.meta_data.FieldMetaData("cols", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumn.class)))); tmpMap.put(_Fields.COLUMN_NAMES, new org.apache.thrift.meta_data.FieldMetaData("column_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.ASSIGN_RENDER_GROUPS, new org.apache.thrift.meta_data.FieldMetaData("assign_render_groups", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_table_binary_columnar_polys_args.class, metaDataMap); } public load_table_binary_columnar_polys_args() { this.column_names = new java.util.ArrayList<java.lang.String>(); this.assign_render_groups = true; } public load_table_binary_columnar_polys_args( java.lang.String session, java.lang.String table_name, java.util.List<TColumn> cols, java.util.List<java.lang.String> column_names, boolean assign_render_groups) { this(); this.session = session; this.table_name = table_name; this.cols = cols; this.column_names = column_names; this.assign_render_groups = assign_render_groups; setAssign_render_groupsIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public load_table_binary_columnar_polys_args(load_table_binary_columnar_polys_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetCols()) { java.util.List<TColumn> __this__cols = new java.util.ArrayList<TColumn>(other.cols.size()); for (TColumn other_element : other.cols) { __this__cols.add(new TColumn(other_element)); } this.cols = __this__cols; } if (other.isSetColumn_names()) { java.util.List<java.lang.String> __this__column_names = new java.util.ArrayList<java.lang.String>(other.column_names); this.column_names = __this__column_names; } this.assign_render_groups = other.assign_render_groups; } public load_table_binary_columnar_polys_args deepCopy() { return new load_table_binary_columnar_polys_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.cols = null; this.column_names = new java.util.ArrayList<java.lang.String>(); this.assign_render_groups = true; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public load_table_binary_columnar_polys_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public load_table_binary_columnar_polys_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public int getColsSize() { return (this.cols == null) ? 0 : this.cols.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TColumn> getColsIterator() { return (this.cols == null) ? null : this.cols.iterator(); } public void addToCols(TColumn elem) { if (this.cols == null) { this.cols = new java.util.ArrayList<TColumn>(); } this.cols.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TColumn> getCols() { return this.cols; } public load_table_binary_columnar_polys_args setCols(@org.apache.thrift.annotation.Nullable java.util.List<TColumn> cols) { this.cols = cols; return this; } public void unsetCols() { this.cols = null; } /** Returns true if field cols is set (has been assigned a value) and false otherwise */ public boolean isSetCols() { return this.cols != null; } public void setColsIsSet(boolean value) { if (!value) { this.cols = null; } } public int getColumn_namesSize() { return (this.column_names == null) ? 0 : this.column_names.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getColumn_namesIterator() { return (this.column_names == null) ? null : this.column_names.iterator(); } public void addToColumn_names(java.lang.String elem) { if (this.column_names == null) { this.column_names = new java.util.ArrayList<java.lang.String>(); } this.column_names.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getColumn_names() { return this.column_names; } public load_table_binary_columnar_polys_args setColumn_names(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names) { this.column_names = column_names; return this; } public void unsetColumn_names() { this.column_names = null; } /** Returns true if field column_names is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_names() { return this.column_names != null; } public void setColumn_namesIsSet(boolean value) { if (!value) { this.column_names = null; } } public boolean isAssign_render_groups() { return this.assign_render_groups; } public load_table_binary_columnar_polys_args setAssign_render_groups(boolean assign_render_groups) { this.assign_render_groups = assign_render_groups; setAssign_render_groupsIsSet(true); return this; } public void unsetAssign_render_groups() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGN_RENDER_GROUPS_ISSET_ID); } /** Returns true if field assign_render_groups is set (has been assigned a value) and false otherwise */ public boolean isSetAssign_render_groups() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGN_RENDER_GROUPS_ISSET_ID); } public void setAssign_render_groupsIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGN_RENDER_GROUPS_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case COLS: if (value == null) { unsetCols(); } else { setCols((java.util.List<TColumn>)value); } break; case COLUMN_NAMES: if (value == null) { unsetColumn_names(); } else { setColumn_names((java.util.List<java.lang.String>)value); } break; case ASSIGN_RENDER_GROUPS: if (value == null) { unsetAssign_render_groups(); } else { setAssign_render_groups((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case COLS: return getCols(); case COLUMN_NAMES: return getColumn_names(); case ASSIGN_RENDER_GROUPS: return isAssign_render_groups(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case COLS: return isSetCols(); case COLUMN_NAMES: return isSetColumn_names(); case ASSIGN_RENDER_GROUPS: return isSetAssign_render_groups(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof load_table_binary_columnar_polys_args) return this.equals((load_table_binary_columnar_polys_args)that); return false; } public boolean equals(load_table_binary_columnar_polys_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_cols = true && this.isSetCols(); boolean that_present_cols = true && that.isSetCols(); if (this_present_cols || that_present_cols) { if (!(this_present_cols && that_present_cols)) return false; if (!this.cols.equals(that.cols)) return false; } boolean this_present_column_names = true && this.isSetColumn_names(); boolean that_present_column_names = true && that.isSetColumn_names(); if (this_present_column_names || that_present_column_names) { if (!(this_present_column_names && that_present_column_names)) return false; if (!this.column_names.equals(that.column_names)) return false; } boolean this_present_assign_render_groups = true; boolean that_present_assign_render_groups = true; if (this_present_assign_render_groups || that_present_assign_render_groups) { if (!(this_present_assign_render_groups && that_present_assign_render_groups)) return false; if (this.assign_render_groups != that.assign_render_groups) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((isSetCols()) ? 131071 : 524287); if (isSetCols()) hashCode = hashCode * 8191 + cols.hashCode(); hashCode = hashCode * 8191 + ((isSetColumn_names()) ? 131071 : 524287); if (isSetColumn_names()) hashCode = hashCode * 8191 + column_names.hashCode(); hashCode = hashCode * 8191 + ((assign_render_groups) ? 131071 : 524287); return hashCode; } @Override public int compareTo(load_table_binary_columnar_polys_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCols(), other.isSetCols()); if (lastComparison != 0) { return lastComparison; } if (isSetCols()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cols, other.cols); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetColumn_names(), other.isSetColumn_names()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_names, other.column_names); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetAssign_render_groups(), other.isSetAssign_render_groups()); if (lastComparison != 0) { return lastComparison; } if (isSetAssign_render_groups()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.assign_render_groups, other.assign_render_groups); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("load_table_binary_columnar_polys_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("cols:"); if (this.cols == null) { sb.append("null"); } else { sb.append(this.cols); } first = false; if (!first) sb.append(", "); sb.append("column_names:"); if (this.column_names == null) { sb.append("null"); } else { sb.append(this.column_names); } first = false; if (!first) sb.append(", "); sb.append("assign_render_groups:"); sb.append(this.assign_render_groups); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class load_table_binary_columnar_polys_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_columnar_polys_argsStandardScheme getScheme() { return new load_table_binary_columnar_polys_argsStandardScheme(); } } private static class load_table_binary_columnar_polys_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_table_binary_columnar_polys_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, load_table_binary_columnar_polys_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COLS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list580 = iprot.readListBegin(); struct.cols = new java.util.ArrayList<TColumn>(_list580.size); @org.apache.thrift.annotation.Nullable TColumn _elem581; for (int _i582 = 0; _i582 < _list580.size; ++_i582) { _elem581 = new TColumn(); _elem581.read(iprot); struct.cols.add(_elem581); } iprot.readListEnd(); } struct.setColsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // COLUMN_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list583 = iprot.readListBegin(); struct.column_names = new java.util.ArrayList<java.lang.String>(_list583.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem584; for (int _i585 = 0; _i585 < _list583.size; ++_i585) { _elem584 = iprot.readString(); struct.column_names.add(_elem584); } iprot.readListEnd(); } struct.setColumn_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // ASSIGN_RENDER_GROUPS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.assign_render_groups = iprot.readBool(); struct.setAssign_render_groupsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, load_table_binary_columnar_polys_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.cols != null) { oprot.writeFieldBegin(COLS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.cols.size())); for (TColumn _iter586 : struct.cols) { _iter586.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.column_names != null) { oprot.writeFieldBegin(COLUMN_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.column_names.size())); for (java.lang.String _iter587 : struct.column_names) { oprot.writeString(_iter587); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(ASSIGN_RENDER_GROUPS_FIELD_DESC); oprot.writeBool(struct.assign_render_groups); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class load_table_binary_columnar_polys_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_columnar_polys_argsTupleScheme getScheme() { return new load_table_binary_columnar_polys_argsTupleScheme(); } } private static class load_table_binary_columnar_polys_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_table_binary_columnar_polys_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, load_table_binary_columnar_polys_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetCols()) { optionals.set(2); } if (struct.isSetColumn_names()) { optionals.set(3); } if (struct.isSetAssign_render_groups()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetCols()) { { oprot.writeI32(struct.cols.size()); for (TColumn _iter588 : struct.cols) { _iter588.write(oprot); } } } if (struct.isSetColumn_names()) { { oprot.writeI32(struct.column_names.size()); for (java.lang.String _iter589 : struct.column_names) { oprot.writeString(_iter589); } } } if (struct.isSetAssign_render_groups()) { oprot.writeBool(struct.assign_render_groups); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, load_table_binary_columnar_polys_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list590 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.cols = new java.util.ArrayList<TColumn>(_list590.size); @org.apache.thrift.annotation.Nullable TColumn _elem591; for (int _i592 = 0; _i592 < _list590.size; ++_i592) { _elem591 = new TColumn(); _elem591.read(iprot); struct.cols.add(_elem591); } } struct.setColsIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list593 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.column_names = new java.util.ArrayList<java.lang.String>(_list593.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem594; for (int _i595 = 0; _i595 < _list593.size; ++_i595) { _elem594 = iprot.readString(); struct.column_names.add(_elem594); } } struct.setColumn_namesIsSet(true); } if (incoming.get(4)) { struct.assign_render_groups = iprot.readBool(); struct.setAssign_render_groupsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class load_table_binary_columnar_polys_result implements org.apache.thrift.TBase<load_table_binary_columnar_polys_result, load_table_binary_columnar_polys_result._Fields>, java.io.Serializable, Cloneable, Comparable<load_table_binary_columnar_polys_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_table_binary_columnar_polys_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_table_binary_columnar_polys_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_table_binary_columnar_polys_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_table_binary_columnar_polys_result.class, metaDataMap); } public load_table_binary_columnar_polys_result() { } public load_table_binary_columnar_polys_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public load_table_binary_columnar_polys_result(load_table_binary_columnar_polys_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public load_table_binary_columnar_polys_result deepCopy() { return new load_table_binary_columnar_polys_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public load_table_binary_columnar_polys_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof load_table_binary_columnar_polys_result) return this.equals((load_table_binary_columnar_polys_result)that); return false; } public boolean equals(load_table_binary_columnar_polys_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(load_table_binary_columnar_polys_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("load_table_binary_columnar_polys_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class load_table_binary_columnar_polys_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_columnar_polys_resultStandardScheme getScheme() { return new load_table_binary_columnar_polys_resultStandardScheme(); } } private static class load_table_binary_columnar_polys_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_table_binary_columnar_polys_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, load_table_binary_columnar_polys_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, load_table_binary_columnar_polys_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class load_table_binary_columnar_polys_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_columnar_polys_resultTupleScheme getScheme() { return new load_table_binary_columnar_polys_resultTupleScheme(); } } private static class load_table_binary_columnar_polys_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_table_binary_columnar_polys_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, load_table_binary_columnar_polys_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, load_table_binary_columnar_polys_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class load_table_binary_arrow_args implements org.apache.thrift.TBase<load_table_binary_arrow_args, load_table_binary_arrow_args._Fields>, java.io.Serializable, Cloneable, Comparable<load_table_binary_arrow_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_table_binary_arrow_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField ARROW_STREAM_FIELD_DESC = new org.apache.thrift.protocol.TField("arrow_stream", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField USE_COLUMN_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("use_column_names", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_table_binary_arrow_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_table_binary_arrow_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer arrow_stream; // required public boolean use_column_names; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), ARROW_STREAM((short)3, "arrow_stream"), USE_COLUMN_NAMES((short)4, "use_column_names"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // ARROW_STREAM return ARROW_STREAM; case 4: // USE_COLUMN_NAMES return USE_COLUMN_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __USE_COLUMN_NAMES_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ARROW_STREAM, new org.apache.thrift.meta_data.FieldMetaData("arrow_stream", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); tmpMap.put(_Fields.USE_COLUMN_NAMES, new org.apache.thrift.meta_data.FieldMetaData("use_column_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_table_binary_arrow_args.class, metaDataMap); } public load_table_binary_arrow_args() { this.use_column_names = false; } public load_table_binary_arrow_args( java.lang.String session, java.lang.String table_name, java.nio.ByteBuffer arrow_stream, boolean use_column_names) { this(); this.session = session; this.table_name = table_name; this.arrow_stream = org.apache.thrift.TBaseHelper.copyBinary(arrow_stream); this.use_column_names = use_column_names; setUse_column_namesIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public load_table_binary_arrow_args(load_table_binary_arrow_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetArrow_stream()) { this.arrow_stream = org.apache.thrift.TBaseHelper.copyBinary(other.arrow_stream); } this.use_column_names = other.use_column_names; } public load_table_binary_arrow_args deepCopy() { return new load_table_binary_arrow_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.arrow_stream = null; this.use_column_names = false; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public load_table_binary_arrow_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public load_table_binary_arrow_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public byte[] getArrow_stream() { setArrow_stream(org.apache.thrift.TBaseHelper.rightSize(arrow_stream)); return arrow_stream == null ? null : arrow_stream.array(); } public java.nio.ByteBuffer bufferForArrow_stream() { return org.apache.thrift.TBaseHelper.copyBinary(arrow_stream); } public load_table_binary_arrow_args setArrow_stream(byte[] arrow_stream) { this.arrow_stream = arrow_stream == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(arrow_stream.clone()); return this; } public load_table_binary_arrow_args setArrow_stream(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer arrow_stream) { this.arrow_stream = org.apache.thrift.TBaseHelper.copyBinary(arrow_stream); return this; } public void unsetArrow_stream() { this.arrow_stream = null; } /** Returns true if field arrow_stream is set (has been assigned a value) and false otherwise */ public boolean isSetArrow_stream() { return this.arrow_stream != null; } public void setArrow_streamIsSet(boolean value) { if (!value) { this.arrow_stream = null; } } public boolean isUse_column_names() { return this.use_column_names; } public load_table_binary_arrow_args setUse_column_names(boolean use_column_names) { this.use_column_names = use_column_names; setUse_column_namesIsSet(true); return this; } public void unsetUse_column_names() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __USE_COLUMN_NAMES_ISSET_ID); } /** Returns true if field use_column_names is set (has been assigned a value) and false otherwise */ public boolean isSetUse_column_names() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USE_COLUMN_NAMES_ISSET_ID); } public void setUse_column_namesIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __USE_COLUMN_NAMES_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case ARROW_STREAM: if (value == null) { unsetArrow_stream(); } else { if (value instanceof byte[]) { setArrow_stream((byte[])value); } else { setArrow_stream((java.nio.ByteBuffer)value); } } break; case USE_COLUMN_NAMES: if (value == null) { unsetUse_column_names(); } else { setUse_column_names((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case ARROW_STREAM: return getArrow_stream(); case USE_COLUMN_NAMES: return isUse_column_names(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case ARROW_STREAM: return isSetArrow_stream(); case USE_COLUMN_NAMES: return isSetUse_column_names(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof load_table_binary_arrow_args) return this.equals((load_table_binary_arrow_args)that); return false; } public boolean equals(load_table_binary_arrow_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_arrow_stream = true && this.isSetArrow_stream(); boolean that_present_arrow_stream = true && that.isSetArrow_stream(); if (this_present_arrow_stream || that_present_arrow_stream) { if (!(this_present_arrow_stream && that_present_arrow_stream)) return false; if (!this.arrow_stream.equals(that.arrow_stream)) return false; } boolean this_present_use_column_names = true; boolean that_present_use_column_names = true; if (this_present_use_column_names || that_present_use_column_names) { if (!(this_present_use_column_names && that_present_use_column_names)) return false; if (this.use_column_names != that.use_column_names) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((isSetArrow_stream()) ? 131071 : 524287); if (isSetArrow_stream()) hashCode = hashCode * 8191 + arrow_stream.hashCode(); hashCode = hashCode * 8191 + ((use_column_names) ? 131071 : 524287); return hashCode; } @Override public int compareTo(load_table_binary_arrow_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetArrow_stream(), other.isSetArrow_stream()); if (lastComparison != 0) { return lastComparison; } if (isSetArrow_stream()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.arrow_stream, other.arrow_stream); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetUse_column_names(), other.isSetUse_column_names()); if (lastComparison != 0) { return lastComparison; } if (isSetUse_column_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.use_column_names, other.use_column_names); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("load_table_binary_arrow_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("arrow_stream:"); if (this.arrow_stream == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.arrow_stream, sb); } first = false; if (!first) sb.append(", "); sb.append("use_column_names:"); sb.append(this.use_column_names); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class load_table_binary_arrow_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_arrow_argsStandardScheme getScheme() { return new load_table_binary_arrow_argsStandardScheme(); } } private static class load_table_binary_arrow_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_table_binary_arrow_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, load_table_binary_arrow_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ARROW_STREAM if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.arrow_stream = iprot.readBinary(); struct.setArrow_streamIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // USE_COLUMN_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.use_column_names = iprot.readBool(); struct.setUse_column_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, load_table_binary_arrow_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.arrow_stream != null) { oprot.writeFieldBegin(ARROW_STREAM_FIELD_DESC); oprot.writeBinary(struct.arrow_stream); oprot.writeFieldEnd(); } oprot.writeFieldBegin(USE_COLUMN_NAMES_FIELD_DESC); oprot.writeBool(struct.use_column_names); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class load_table_binary_arrow_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_arrow_argsTupleScheme getScheme() { return new load_table_binary_arrow_argsTupleScheme(); } } private static class load_table_binary_arrow_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_table_binary_arrow_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, load_table_binary_arrow_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetArrow_stream()) { optionals.set(2); } if (struct.isSetUse_column_names()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetArrow_stream()) { oprot.writeBinary(struct.arrow_stream); } if (struct.isSetUse_column_names()) { oprot.writeBool(struct.use_column_names); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, load_table_binary_arrow_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { struct.arrow_stream = iprot.readBinary(); struct.setArrow_streamIsSet(true); } if (incoming.get(3)) { struct.use_column_names = iprot.readBool(); struct.setUse_column_namesIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class load_table_binary_arrow_result implements org.apache.thrift.TBase<load_table_binary_arrow_result, load_table_binary_arrow_result._Fields>, java.io.Serializable, Cloneable, Comparable<load_table_binary_arrow_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_table_binary_arrow_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_table_binary_arrow_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_table_binary_arrow_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_table_binary_arrow_result.class, metaDataMap); } public load_table_binary_arrow_result() { } public load_table_binary_arrow_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public load_table_binary_arrow_result(load_table_binary_arrow_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public load_table_binary_arrow_result deepCopy() { return new load_table_binary_arrow_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public load_table_binary_arrow_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof load_table_binary_arrow_result) return this.equals((load_table_binary_arrow_result)that); return false; } public boolean equals(load_table_binary_arrow_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(load_table_binary_arrow_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("load_table_binary_arrow_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class load_table_binary_arrow_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_arrow_resultStandardScheme getScheme() { return new load_table_binary_arrow_resultStandardScheme(); } } private static class load_table_binary_arrow_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_table_binary_arrow_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, load_table_binary_arrow_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, load_table_binary_arrow_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class load_table_binary_arrow_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_binary_arrow_resultTupleScheme getScheme() { return new load_table_binary_arrow_resultTupleScheme(); } } private static class load_table_binary_arrow_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_table_binary_arrow_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, load_table_binary_arrow_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, load_table_binary_arrow_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class load_table_args implements org.apache.thrift.TBase<load_table_args, load_table_args._Fields>, java.io.Serializable, Cloneable, Comparable<load_table_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_table_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField COLUMN_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("column_names", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_table_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_table_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public @org.apache.thrift.annotation.Nullable java.util.List<TStringRow> rows; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), ROWS((short)3, "rows"), COLUMN_NAMES((short)4, "column_names"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // ROWS return ROWS; case 4: // COLUMN_NAMES return COLUMN_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStringRow.class)))); tmpMap.put(_Fields.COLUMN_NAMES, new org.apache.thrift.meta_data.FieldMetaData("column_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_table_args.class, metaDataMap); } public load_table_args() { this.column_names = new java.util.ArrayList<java.lang.String>(); } public load_table_args( java.lang.String session, java.lang.String table_name, java.util.List<TStringRow> rows, java.util.List<java.lang.String> column_names) { this(); this.session = session; this.table_name = table_name; this.rows = rows; this.column_names = column_names; } /** * Performs a deep copy on <i>other</i>. */ public load_table_args(load_table_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetRows()) { java.util.List<TStringRow> __this__rows = new java.util.ArrayList<TStringRow>(other.rows.size()); for (TStringRow other_element : other.rows) { __this__rows.add(new TStringRow(other_element)); } this.rows = __this__rows; } if (other.isSetColumn_names()) { java.util.List<java.lang.String> __this__column_names = new java.util.ArrayList<java.lang.String>(other.column_names); this.column_names = __this__column_names; } } public load_table_args deepCopy() { return new load_table_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.rows = null; this.column_names = new java.util.ArrayList<java.lang.String>(); } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public load_table_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public load_table_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public int getRowsSize() { return (this.rows == null) ? 0 : this.rows.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TStringRow> getRowsIterator() { return (this.rows == null) ? null : this.rows.iterator(); } public void addToRows(TStringRow elem) { if (this.rows == null) { this.rows = new java.util.ArrayList<TStringRow>(); } this.rows.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TStringRow> getRows() { return this.rows; } public load_table_args setRows(@org.apache.thrift.annotation.Nullable java.util.List<TStringRow> rows) { this.rows = rows; return this; } public void unsetRows() { this.rows = null; } /** Returns true if field rows is set (has been assigned a value) and false otherwise */ public boolean isSetRows() { return this.rows != null; } public void setRowsIsSet(boolean value) { if (!value) { this.rows = null; } } public int getColumn_namesSize() { return (this.column_names == null) ? 0 : this.column_names.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getColumn_namesIterator() { return (this.column_names == null) ? null : this.column_names.iterator(); } public void addToColumn_names(java.lang.String elem) { if (this.column_names == null) { this.column_names = new java.util.ArrayList<java.lang.String>(); } this.column_names.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getColumn_names() { return this.column_names; } public load_table_args setColumn_names(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names) { this.column_names = column_names; return this; } public void unsetColumn_names() { this.column_names = null; } /** Returns true if field column_names is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_names() { return this.column_names != null; } public void setColumn_namesIsSet(boolean value) { if (!value) { this.column_names = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case ROWS: if (value == null) { unsetRows(); } else { setRows((java.util.List<TStringRow>)value); } break; case COLUMN_NAMES: if (value == null) { unsetColumn_names(); } else { setColumn_names((java.util.List<java.lang.String>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case ROWS: return getRows(); case COLUMN_NAMES: return getColumn_names(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case ROWS: return isSetRows(); case COLUMN_NAMES: return isSetColumn_names(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof load_table_args) return this.equals((load_table_args)that); return false; } public boolean equals(load_table_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_rows = true && this.isSetRows(); boolean that_present_rows = true && that.isSetRows(); if (this_present_rows || that_present_rows) { if (!(this_present_rows && that_present_rows)) return false; if (!this.rows.equals(that.rows)) return false; } boolean this_present_column_names = true && this.isSetColumn_names(); boolean that_present_column_names = true && that.isSetColumn_names(); if (this_present_column_names || that_present_column_names) { if (!(this_present_column_names && that_present_column_names)) return false; if (!this.column_names.equals(that.column_names)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((isSetRows()) ? 131071 : 524287); if (isSetRows()) hashCode = hashCode * 8191 + rows.hashCode(); hashCode = hashCode * 8191 + ((isSetColumn_names()) ? 131071 : 524287); if (isSetColumn_names()) hashCode = hashCode * 8191 + column_names.hashCode(); return hashCode; } @Override public int compareTo(load_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRows(), other.isSetRows()); if (lastComparison != 0) { return lastComparison; } if (isSetRows()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, other.rows); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetColumn_names(), other.isSetColumn_names()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_names, other.column_names); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("load_table_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("rows:"); if (this.rows == null) { sb.append("null"); } else { sb.append(this.rows); } first = false; if (!first) sb.append(", "); sb.append("column_names:"); if (this.column_names == null) { sb.append("null"); } else { sb.append(this.column_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class load_table_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_argsStandardScheme getScheme() { return new load_table_argsStandardScheme(); } } private static class load_table_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_table_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, load_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ROWS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list596 = iprot.readListBegin(); struct.rows = new java.util.ArrayList<TStringRow>(_list596.size); @org.apache.thrift.annotation.Nullable TStringRow _elem597; for (int _i598 = 0; _i598 < _list596.size; ++_i598) { _elem597 = new TStringRow(); _elem597.read(iprot); struct.rows.add(_elem597); } iprot.readListEnd(); } struct.setRowsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // COLUMN_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list599 = iprot.readListBegin(); struct.column_names = new java.util.ArrayList<java.lang.String>(_list599.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem600; for (int _i601 = 0; _i601 < _list599.size; ++_i601) { _elem600 = iprot.readString(); struct.column_names.add(_elem600); } iprot.readListEnd(); } struct.setColumn_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, load_table_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.rows != null) { oprot.writeFieldBegin(ROWS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.rows.size())); for (TStringRow _iter602 : struct.rows) { _iter602.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.column_names != null) { oprot.writeFieldBegin(COLUMN_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.column_names.size())); for (java.lang.String _iter603 : struct.column_names) { oprot.writeString(_iter603); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class load_table_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_argsTupleScheme getScheme() { return new load_table_argsTupleScheme(); } } private static class load_table_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_table_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, load_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetRows()) { optionals.set(2); } if (struct.isSetColumn_names()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetRows()) { { oprot.writeI32(struct.rows.size()); for (TStringRow _iter604 : struct.rows) { _iter604.write(oprot); } } } if (struct.isSetColumn_names()) { { oprot.writeI32(struct.column_names.size()); for (java.lang.String _iter605 : struct.column_names) { oprot.writeString(_iter605); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, load_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list606 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.rows = new java.util.ArrayList<TStringRow>(_list606.size); @org.apache.thrift.annotation.Nullable TStringRow _elem607; for (int _i608 = 0; _i608 < _list606.size; ++_i608) { _elem607 = new TStringRow(); _elem607.read(iprot); struct.rows.add(_elem607); } } struct.setRowsIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list609 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.column_names = new java.util.ArrayList<java.lang.String>(_list609.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem610; for (int _i611 = 0; _i611 < _list609.size; ++_i611) { _elem610 = iprot.readString(); struct.column_names.add(_elem610); } } struct.setColumn_namesIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class load_table_result implements org.apache.thrift.TBase<load_table_result, load_table_result._Fields>, java.io.Serializable, Cloneable, Comparable<load_table_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_table_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_table_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_table_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_table_result.class, metaDataMap); } public load_table_result() { } public load_table_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public load_table_result(load_table_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public load_table_result deepCopy() { return new load_table_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public load_table_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof load_table_result) return this.equals((load_table_result)that); return false; } public boolean equals(load_table_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(load_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("load_table_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class load_table_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_resultStandardScheme getScheme() { return new load_table_resultStandardScheme(); } } private static class load_table_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_table_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, load_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, load_table_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class load_table_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public load_table_resultTupleScheme getScheme() { return new load_table_resultTupleScheme(); } } private static class load_table_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_table_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, load_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, load_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class detect_column_types_args implements org.apache.thrift.TBase<detect_column_types_args, detect_column_types_args._Fields>, java.io.Serializable, Cloneable, Comparable<detect_column_types_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("detect_column_types_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField FILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("file_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COPY_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("copy_params", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new detect_column_types_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new detect_column_types_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String file_name; // required public @org.apache.thrift.annotation.Nullable TCopyParams copy_params; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), FILE_NAME((short)2, "file_name"), COPY_PARAMS((short)3, "copy_params"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // FILE_NAME return FILE_NAME; case 3: // COPY_PARAMS return COPY_PARAMS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.FILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("file_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COPY_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("copy_params", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCopyParams.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(detect_column_types_args.class, metaDataMap); } public detect_column_types_args() { } public detect_column_types_args( java.lang.String session, java.lang.String file_name, TCopyParams copy_params) { this(); this.session = session; this.file_name = file_name; this.copy_params = copy_params; } /** * Performs a deep copy on <i>other</i>. */ public detect_column_types_args(detect_column_types_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetFile_name()) { this.file_name = other.file_name; } if (other.isSetCopy_params()) { this.copy_params = new TCopyParams(other.copy_params); } } public detect_column_types_args deepCopy() { return new detect_column_types_args(this); } @Override public void clear() { this.session = null; this.file_name = null; this.copy_params = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public detect_column_types_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getFile_name() { return this.file_name; } public detect_column_types_args setFile_name(@org.apache.thrift.annotation.Nullable java.lang.String file_name) { this.file_name = file_name; return this; } public void unsetFile_name() { this.file_name = null; } /** Returns true if field file_name is set (has been assigned a value) and false otherwise */ public boolean isSetFile_name() { return this.file_name != null; } public void setFile_nameIsSet(boolean value) { if (!value) { this.file_name = null; } } @org.apache.thrift.annotation.Nullable public TCopyParams getCopy_params() { return this.copy_params; } public detect_column_types_args setCopy_params(@org.apache.thrift.annotation.Nullable TCopyParams copy_params) { this.copy_params = copy_params; return this; } public void unsetCopy_params() { this.copy_params = null; } /** Returns true if field copy_params is set (has been assigned a value) and false otherwise */ public boolean isSetCopy_params() { return this.copy_params != null; } public void setCopy_paramsIsSet(boolean value) { if (!value) { this.copy_params = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case FILE_NAME: if (value == null) { unsetFile_name(); } else { setFile_name((java.lang.String)value); } break; case COPY_PARAMS: if (value == null) { unsetCopy_params(); } else { setCopy_params((TCopyParams)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case FILE_NAME: return getFile_name(); case COPY_PARAMS: return getCopy_params(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case FILE_NAME: return isSetFile_name(); case COPY_PARAMS: return isSetCopy_params(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof detect_column_types_args) return this.equals((detect_column_types_args)that); return false; } public boolean equals(detect_column_types_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_file_name = true && this.isSetFile_name(); boolean that_present_file_name = true && that.isSetFile_name(); if (this_present_file_name || that_present_file_name) { if (!(this_present_file_name && that_present_file_name)) return false; if (!this.file_name.equals(that.file_name)) return false; } boolean this_present_copy_params = true && this.isSetCopy_params(); boolean that_present_copy_params = true && that.isSetCopy_params(); if (this_present_copy_params || that_present_copy_params) { if (!(this_present_copy_params && that_present_copy_params)) return false; if (!this.copy_params.equals(that.copy_params)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetFile_name()) ? 131071 : 524287); if (isSetFile_name()) hashCode = hashCode * 8191 + file_name.hashCode(); hashCode = hashCode * 8191 + ((isSetCopy_params()) ? 131071 : 524287); if (isSetCopy_params()) hashCode = hashCode * 8191 + copy_params.hashCode(); return hashCode; } @Override public int compareTo(detect_column_types_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFile_name(), other.isSetFile_name()); if (lastComparison != 0) { return lastComparison; } if (isSetFile_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_name, other.file_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCopy_params(), other.isSetCopy_params()); if (lastComparison != 0) { return lastComparison; } if (isSetCopy_params()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.copy_params, other.copy_params); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("detect_column_types_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("file_name:"); if (this.file_name == null) { sb.append("null"); } else { sb.append(this.file_name); } first = false; if (!first) sb.append(", "); sb.append("copy_params:"); if (this.copy_params == null) { sb.append("null"); } else { sb.append(this.copy_params); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (copy_params != null) { copy_params.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class detect_column_types_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public detect_column_types_argsStandardScheme getScheme() { return new detect_column_types_argsStandardScheme(); } } private static class detect_column_types_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<detect_column_types_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, detect_column_types_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // FILE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.file_name = iprot.readString(); struct.setFile_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COPY_PARAMS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, detect_column_types_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.file_name != null) { oprot.writeFieldBegin(FILE_NAME_FIELD_DESC); oprot.writeString(struct.file_name); oprot.writeFieldEnd(); } if (struct.copy_params != null) { oprot.writeFieldBegin(COPY_PARAMS_FIELD_DESC); struct.copy_params.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class detect_column_types_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public detect_column_types_argsTupleScheme getScheme() { return new detect_column_types_argsTupleScheme(); } } private static class detect_column_types_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<detect_column_types_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, detect_column_types_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetFile_name()) { optionals.set(1); } if (struct.isSetCopy_params()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetFile_name()) { oprot.writeString(struct.file_name); } if (struct.isSetCopy_params()) { struct.copy_params.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, detect_column_types_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.file_name = iprot.readString(); struct.setFile_nameIsSet(true); } if (incoming.get(2)) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class detect_column_types_result implements org.apache.thrift.TBase<detect_column_types_result, detect_column_types_result._Fields>, java.io.Serializable, Cloneable, Comparable<detect_column_types_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("detect_column_types_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new detect_column_types_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new detect_column_types_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDetectResult success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDetectResult.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(detect_column_types_result.class, metaDataMap); } public detect_column_types_result() { } public detect_column_types_result( TDetectResult success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public detect_column_types_result(detect_column_types_result other) { if (other.isSetSuccess()) { this.success = new TDetectResult(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public detect_column_types_result deepCopy() { return new detect_column_types_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TDetectResult getSuccess() { return this.success; } public detect_column_types_result setSuccess(@org.apache.thrift.annotation.Nullable TDetectResult success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public detect_column_types_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TDetectResult)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof detect_column_types_result) return this.equals((detect_column_types_result)that); return false; } public boolean equals(detect_column_types_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(detect_column_types_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("detect_column_types_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class detect_column_types_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public detect_column_types_resultStandardScheme getScheme() { return new detect_column_types_resultStandardScheme(); } } private static class detect_column_types_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<detect_column_types_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, detect_column_types_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TDetectResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, detect_column_types_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class detect_column_types_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public detect_column_types_resultTupleScheme getScheme() { return new detect_column_types_resultTupleScheme(); } } private static class detect_column_types_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<detect_column_types_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, detect_column_types_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, detect_column_types_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TDetectResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class create_table_args implements org.apache.thrift.TBase<create_table_args, create_table_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_table_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField ROW_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("row_desc", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField CREATE_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("create_params", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_table_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_table_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public @org.apache.thrift.annotation.Nullable java.util.List<TColumnType> row_desc; // required public @org.apache.thrift.annotation.Nullable TCreateParams create_params; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), ROW_DESC((short)3, "row_desc"), CREATE_PARAMS((short)4, "create_params"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // ROW_DESC return ROW_DESC; case 4: // CREATE_PARAMS return CREATE_PARAMS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ROW_DESC, new org.apache.thrift.meta_data.FieldMetaData("row_desc", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "TRowDescriptor"))); tmpMap.put(_Fields.CREATE_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("create_params", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCreateParams.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); } public create_table_args() { } public create_table_args( java.lang.String session, java.lang.String table_name, java.util.List<TColumnType> row_desc, TCreateParams create_params) { this(); this.session = session; this.table_name = table_name; this.row_desc = row_desc; this.create_params = create_params; } /** * Performs a deep copy on <i>other</i>. */ public create_table_args(create_table_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetRow_desc()) { java.util.List<TColumnType> __this__row_desc = new java.util.ArrayList<TColumnType>(other.row_desc.size()); for (TColumnType other_element : other.row_desc) { __this__row_desc.add(new TColumnType(other_element)); } this.row_desc = __this__row_desc; } if (other.isSetCreate_params()) { this.create_params = new TCreateParams(other.create_params); } } public create_table_args deepCopy() { return new create_table_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.row_desc = null; this.create_params = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public create_table_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public create_table_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public int getRow_descSize() { return (this.row_desc == null) ? 0 : this.row_desc.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TColumnType> getRow_descIterator() { return (this.row_desc == null) ? null : this.row_desc.iterator(); } public void addToRow_desc(TColumnType elem) { if (this.row_desc == null) { this.row_desc = new java.util.ArrayList<TColumnType>(); } this.row_desc.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TColumnType> getRow_desc() { return this.row_desc; } public create_table_args setRow_desc(@org.apache.thrift.annotation.Nullable java.util.List<TColumnType> row_desc) { this.row_desc = row_desc; return this; } public void unsetRow_desc() { this.row_desc = null; } /** Returns true if field row_desc is set (has been assigned a value) and false otherwise */ public boolean isSetRow_desc() { return this.row_desc != null; } public void setRow_descIsSet(boolean value) { if (!value) { this.row_desc = null; } } @org.apache.thrift.annotation.Nullable public TCreateParams getCreate_params() { return this.create_params; } public create_table_args setCreate_params(@org.apache.thrift.annotation.Nullable TCreateParams create_params) { this.create_params = create_params; return this; } public void unsetCreate_params() { this.create_params = null; } /** Returns true if field create_params is set (has been assigned a value) and false otherwise */ public boolean isSetCreate_params() { return this.create_params != null; } public void setCreate_paramsIsSet(boolean value) { if (!value) { this.create_params = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case ROW_DESC: if (value == null) { unsetRow_desc(); } else { setRow_desc((java.util.List<TColumnType>)value); } break; case CREATE_PARAMS: if (value == null) { unsetCreate_params(); } else { setCreate_params((TCreateParams)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case ROW_DESC: return getRow_desc(); case CREATE_PARAMS: return getCreate_params(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case ROW_DESC: return isSetRow_desc(); case CREATE_PARAMS: return isSetCreate_params(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof create_table_args) return this.equals((create_table_args)that); return false; } public boolean equals(create_table_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_row_desc = true && this.isSetRow_desc(); boolean that_present_row_desc = true && that.isSetRow_desc(); if (this_present_row_desc || that_present_row_desc) { if (!(this_present_row_desc && that_present_row_desc)) return false; if (!this.row_desc.equals(that.row_desc)) return false; } boolean this_present_create_params = true && this.isSetCreate_params(); boolean that_present_create_params = true && that.isSetCreate_params(); if (this_present_create_params || that_present_create_params) { if (!(this_present_create_params && that_present_create_params)) return false; if (!this.create_params.equals(that.create_params)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((isSetRow_desc()) ? 131071 : 524287); if (isSetRow_desc()) hashCode = hashCode * 8191 + row_desc.hashCode(); hashCode = hashCode * 8191 + ((isSetCreate_params()) ? 131071 : 524287); if (isSetCreate_params()) hashCode = hashCode * 8191 + create_params.hashCode(); return hashCode; } @Override public int compareTo(create_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRow_desc(), other.isSetRow_desc()); if (lastComparison != 0) { return lastComparison; } if (isSetRow_desc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row_desc, other.row_desc); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCreate_params(), other.isSetCreate_params()); if (lastComparison != 0) { return lastComparison; } if (isSetCreate_params()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.create_params, other.create_params); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("create_table_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("row_desc:"); if (this.row_desc == null) { sb.append("null"); } else { sb.append(this.row_desc); } first = false; if (!first) sb.append(", "); sb.append("create_params:"); if (this.create_params == null) { sb.append("null"); } else { sb.append(this.create_params); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (create_params != null) { create_params.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_table_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_table_argsStandardScheme getScheme() { return new create_table_argsStandardScheme(); } } private static class create_table_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<create_table_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ROW_DESC if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list612 = iprot.readListBegin(); struct.row_desc = new java.util.ArrayList<TColumnType>(_list612.size); @org.apache.thrift.annotation.Nullable TColumnType _elem613; for (int _i614 = 0; _i614 < _list612.size; ++_i614) { _elem613 = new TColumnType(); _elem613.read(iprot); struct.row_desc.add(_elem613); } iprot.readListEnd(); } struct.setRow_descIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // CREATE_PARAMS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.create_params = new TCreateParams(); struct.create_params.read(iprot); struct.setCreate_paramsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.row_desc != null) { oprot.writeFieldBegin(ROW_DESC_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.row_desc.size())); for (TColumnType _iter615 : struct.row_desc) { _iter615.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.create_params != null) { oprot.writeFieldBegin(CREATE_PARAMS_FIELD_DESC); struct.create_params.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_table_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_table_argsTupleScheme getScheme() { return new create_table_argsTupleScheme(); } } private static class create_table_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<create_table_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetRow_desc()) { optionals.set(2); } if (struct.isSetCreate_params()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetRow_desc()) { { oprot.writeI32(struct.row_desc.size()); for (TColumnType _iter616 : struct.row_desc) { _iter616.write(oprot); } } } if (struct.isSetCreate_params()) { struct.create_params.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list617 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.row_desc = new java.util.ArrayList<TColumnType>(_list617.size); @org.apache.thrift.annotation.Nullable TColumnType _elem618; for (int _i619 = 0; _i619 < _list617.size; ++_i619) { _elem618 = new TColumnType(); _elem618.read(iprot); struct.row_desc.add(_elem618); } } struct.setRow_descIsSet(true); } if (incoming.get(3)) { struct.create_params = new TCreateParams(); struct.create_params.read(iprot); struct.setCreate_paramsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class create_table_result implements org.apache.thrift.TBase<create_table_result, create_table_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_table_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_table_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_table_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); } public create_table_result() { } public create_table_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public create_table_result(create_table_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public create_table_result deepCopy() { return new create_table_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public create_table_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof create_table_result) return this.equals((create_table_result)that); return false; } public boolean equals(create_table_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(create_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("create_table_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_table_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_table_resultStandardScheme getScheme() { return new create_table_resultStandardScheme(); } } private static class create_table_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<create_table_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_table_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public create_table_resultTupleScheme getScheme() { return new create_table_resultTupleScheme(); } } private static class create_table_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<create_table_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class import_table_args implements org.apache.thrift.TBase<import_table_args, import_table_args._Fields>, java.io.Serializable, Cloneable, Comparable<import_table_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("import_table_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField FILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("file_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField COPY_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("copy_params", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new import_table_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new import_table_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public @org.apache.thrift.annotation.Nullable java.lang.String file_name; // required public @org.apache.thrift.annotation.Nullable TCopyParams copy_params; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), FILE_NAME((short)3, "file_name"), COPY_PARAMS((short)4, "copy_params"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // FILE_NAME return FILE_NAME; case 4: // COPY_PARAMS return COPY_PARAMS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("file_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COPY_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("copy_params", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCopyParams.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(import_table_args.class, metaDataMap); } public import_table_args() { } public import_table_args( java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params) { this(); this.session = session; this.table_name = table_name; this.file_name = file_name; this.copy_params = copy_params; } /** * Performs a deep copy on <i>other</i>. */ public import_table_args(import_table_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetFile_name()) { this.file_name = other.file_name; } if (other.isSetCopy_params()) { this.copy_params = new TCopyParams(other.copy_params); } } public import_table_args deepCopy() { return new import_table_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.file_name = null; this.copy_params = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public import_table_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public import_table_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getFile_name() { return this.file_name; } public import_table_args setFile_name(@org.apache.thrift.annotation.Nullable java.lang.String file_name) { this.file_name = file_name; return this; } public void unsetFile_name() { this.file_name = null; } /** Returns true if field file_name is set (has been assigned a value) and false otherwise */ public boolean isSetFile_name() { return this.file_name != null; } public void setFile_nameIsSet(boolean value) { if (!value) { this.file_name = null; } } @org.apache.thrift.annotation.Nullable public TCopyParams getCopy_params() { return this.copy_params; } public import_table_args setCopy_params(@org.apache.thrift.annotation.Nullable TCopyParams copy_params) { this.copy_params = copy_params; return this; } public void unsetCopy_params() { this.copy_params = null; } /** Returns true if field copy_params is set (has been assigned a value) and false otherwise */ public boolean isSetCopy_params() { return this.copy_params != null; } public void setCopy_paramsIsSet(boolean value) { if (!value) { this.copy_params = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case FILE_NAME: if (value == null) { unsetFile_name(); } else { setFile_name((java.lang.String)value); } break; case COPY_PARAMS: if (value == null) { unsetCopy_params(); } else { setCopy_params((TCopyParams)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case FILE_NAME: return getFile_name(); case COPY_PARAMS: return getCopy_params(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case FILE_NAME: return isSetFile_name(); case COPY_PARAMS: return isSetCopy_params(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof import_table_args) return this.equals((import_table_args)that); return false; } public boolean equals(import_table_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_file_name = true && this.isSetFile_name(); boolean that_present_file_name = true && that.isSetFile_name(); if (this_present_file_name || that_present_file_name) { if (!(this_present_file_name && that_present_file_name)) return false; if (!this.file_name.equals(that.file_name)) return false; } boolean this_present_copy_params = true && this.isSetCopy_params(); boolean that_present_copy_params = true && that.isSetCopy_params(); if (this_present_copy_params || that_present_copy_params) { if (!(this_present_copy_params && that_present_copy_params)) return false; if (!this.copy_params.equals(that.copy_params)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((isSetFile_name()) ? 131071 : 524287); if (isSetFile_name()) hashCode = hashCode * 8191 + file_name.hashCode(); hashCode = hashCode * 8191 + ((isSetCopy_params()) ? 131071 : 524287); if (isSetCopy_params()) hashCode = hashCode * 8191 + copy_params.hashCode(); return hashCode; } @Override public int compareTo(import_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFile_name(), other.isSetFile_name()); if (lastComparison != 0) { return lastComparison; } if (isSetFile_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_name, other.file_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCopy_params(), other.isSetCopy_params()); if (lastComparison != 0) { return lastComparison; } if (isSetCopy_params()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.copy_params, other.copy_params); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("import_table_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("file_name:"); if (this.file_name == null) { sb.append("null"); } else { sb.append(this.file_name); } first = false; if (!first) sb.append(", "); sb.append("copy_params:"); if (this.copy_params == null) { sb.append("null"); } else { sb.append(this.copy_params); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (copy_params != null) { copy_params.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class import_table_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_table_argsStandardScheme getScheme() { return new import_table_argsStandardScheme(); } } private static class import_table_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<import_table_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, import_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // FILE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.file_name = iprot.readString(); struct.setFile_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // COPY_PARAMS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, import_table_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.file_name != null) { oprot.writeFieldBegin(FILE_NAME_FIELD_DESC); oprot.writeString(struct.file_name); oprot.writeFieldEnd(); } if (struct.copy_params != null) { oprot.writeFieldBegin(COPY_PARAMS_FIELD_DESC); struct.copy_params.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class import_table_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_table_argsTupleScheme getScheme() { return new import_table_argsTupleScheme(); } } private static class import_table_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<import_table_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, import_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetFile_name()) { optionals.set(2); } if (struct.isSetCopy_params()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetFile_name()) { oprot.writeString(struct.file_name); } if (struct.isSetCopy_params()) { struct.copy_params.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, import_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { struct.file_name = iprot.readString(); struct.setFile_nameIsSet(true); } if (incoming.get(3)) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class import_table_result implements org.apache.thrift.TBase<import_table_result, import_table_result._Fields>, java.io.Serializable, Cloneable, Comparable<import_table_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("import_table_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new import_table_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new import_table_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(import_table_result.class, metaDataMap); } public import_table_result() { } public import_table_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public import_table_result(import_table_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public import_table_result deepCopy() { return new import_table_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public import_table_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof import_table_result) return this.equals((import_table_result)that); return false; } public boolean equals(import_table_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(import_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("import_table_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class import_table_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_table_resultStandardScheme getScheme() { return new import_table_resultStandardScheme(); } } private static class import_table_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<import_table_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, import_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, import_table_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class import_table_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_table_resultTupleScheme getScheme() { return new import_table_resultTupleScheme(); } } private static class import_table_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<import_table_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, import_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, import_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class import_geo_table_args implements org.apache.thrift.TBase<import_geo_table_args, import_geo_table_args._Fields>, java.io.Serializable, Cloneable, Comparable<import_geo_table_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("import_geo_table_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField FILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("file_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField COPY_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("copy_params", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField ROW_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("row_desc", org.apache.thrift.protocol.TType.LIST, (short)5); private static final org.apache.thrift.protocol.TField CREATE_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("create_params", org.apache.thrift.protocol.TType.STRUCT, (short)6); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new import_geo_table_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new import_geo_table_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // required public @org.apache.thrift.annotation.Nullable java.lang.String file_name; // required public @org.apache.thrift.annotation.Nullable TCopyParams copy_params; // required public @org.apache.thrift.annotation.Nullable java.util.List<TColumnType> row_desc; // required public @org.apache.thrift.annotation.Nullable TCreateParams create_params; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_NAME((short)2, "table_name"), FILE_NAME((short)3, "file_name"), COPY_PARAMS((short)4, "copy_params"), ROW_DESC((short)5, "row_desc"), CREATE_PARAMS((short)6, "create_params"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_NAME return TABLE_NAME; case 3: // FILE_NAME return FILE_NAME; case 4: // COPY_PARAMS return COPY_PARAMS; case 5: // ROW_DESC return ROW_DESC; case 6: // CREATE_PARAMS return CREATE_PARAMS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("file_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COPY_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("copy_params", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCopyParams.class))); tmpMap.put(_Fields.ROW_DESC, new org.apache.thrift.meta_data.FieldMetaData("row_desc", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "TRowDescriptor"))); tmpMap.put(_Fields.CREATE_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("create_params", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCreateParams.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(import_geo_table_args.class, metaDataMap); } public import_geo_table_args() { } public import_geo_table_args( java.lang.String session, java.lang.String table_name, java.lang.String file_name, TCopyParams copy_params, java.util.List<TColumnType> row_desc, TCreateParams create_params) { this(); this.session = session; this.table_name = table_name; this.file_name = file_name; this.copy_params = copy_params; this.row_desc = row_desc; this.create_params = create_params; } /** * Performs a deep copy on <i>other</i>. */ public import_geo_table_args(import_geo_table_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetFile_name()) { this.file_name = other.file_name; } if (other.isSetCopy_params()) { this.copy_params = new TCopyParams(other.copy_params); } if (other.isSetRow_desc()) { java.util.List<TColumnType> __this__row_desc = new java.util.ArrayList<TColumnType>(other.row_desc.size()); for (TColumnType other_element : other.row_desc) { __this__row_desc.add(new TColumnType(other_element)); } this.row_desc = __this__row_desc; } if (other.isSetCreate_params()) { this.create_params = new TCreateParams(other.create_params); } } public import_geo_table_args deepCopy() { return new import_geo_table_args(this); } @Override public void clear() { this.session = null; this.table_name = null; this.file_name = null; this.copy_params = null; this.row_desc = null; this.create_params = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public import_geo_table_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getTable_name() { return this.table_name; } public import_geo_table_args setTable_name(@org.apache.thrift.annotation.Nullable java.lang.String table_name) { this.table_name = table_name; return this; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getFile_name() { return this.file_name; } public import_geo_table_args setFile_name(@org.apache.thrift.annotation.Nullable java.lang.String file_name) { this.file_name = file_name; return this; } public void unsetFile_name() { this.file_name = null; } /** Returns true if field file_name is set (has been assigned a value) and false otherwise */ public boolean isSetFile_name() { return this.file_name != null; } public void setFile_nameIsSet(boolean value) { if (!value) { this.file_name = null; } } @org.apache.thrift.annotation.Nullable public TCopyParams getCopy_params() { return this.copy_params; } public import_geo_table_args setCopy_params(@org.apache.thrift.annotation.Nullable TCopyParams copy_params) { this.copy_params = copy_params; return this; } public void unsetCopy_params() { this.copy_params = null; } /** Returns true if field copy_params is set (has been assigned a value) and false otherwise */ public boolean isSetCopy_params() { return this.copy_params != null; } public void setCopy_paramsIsSet(boolean value) { if (!value) { this.copy_params = null; } } public int getRow_descSize() { return (this.row_desc == null) ? 0 : this.row_desc.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TColumnType> getRow_descIterator() { return (this.row_desc == null) ? null : this.row_desc.iterator(); } public void addToRow_desc(TColumnType elem) { if (this.row_desc == null) { this.row_desc = new java.util.ArrayList<TColumnType>(); } this.row_desc.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TColumnType> getRow_desc() { return this.row_desc; } public import_geo_table_args setRow_desc(@org.apache.thrift.annotation.Nullable java.util.List<TColumnType> row_desc) { this.row_desc = row_desc; return this; } public void unsetRow_desc() { this.row_desc = null; } /** Returns true if field row_desc is set (has been assigned a value) and false otherwise */ public boolean isSetRow_desc() { return this.row_desc != null; } public void setRow_descIsSet(boolean value) { if (!value) { this.row_desc = null; } } @org.apache.thrift.annotation.Nullable public TCreateParams getCreate_params() { return this.create_params; } public import_geo_table_args setCreate_params(@org.apache.thrift.annotation.Nullable TCreateParams create_params) { this.create_params = create_params; return this; } public void unsetCreate_params() { this.create_params = null; } /** Returns true if field create_params is set (has been assigned a value) and false otherwise */ public boolean isSetCreate_params() { return this.create_params != null; } public void setCreate_paramsIsSet(boolean value) { if (!value) { this.create_params = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((java.lang.String)value); } break; case FILE_NAME: if (value == null) { unsetFile_name(); } else { setFile_name((java.lang.String)value); } break; case COPY_PARAMS: if (value == null) { unsetCopy_params(); } else { setCopy_params((TCopyParams)value); } break; case ROW_DESC: if (value == null) { unsetRow_desc(); } else { setRow_desc((java.util.List<TColumnType>)value); } break; case CREATE_PARAMS: if (value == null) { unsetCreate_params(); } else { setCreate_params((TCreateParams)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_NAME: return getTable_name(); case FILE_NAME: return getFile_name(); case COPY_PARAMS: return getCopy_params(); case ROW_DESC: return getRow_desc(); case CREATE_PARAMS: return getCreate_params(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_NAME: return isSetTable_name(); case FILE_NAME: return isSetFile_name(); case COPY_PARAMS: return isSetCopy_params(); case ROW_DESC: return isSetRow_desc(); case CREATE_PARAMS: return isSetCreate_params(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof import_geo_table_args) return this.equals((import_geo_table_args)that); return false; } public boolean equals(import_geo_table_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_file_name = true && this.isSetFile_name(); boolean that_present_file_name = true && that.isSetFile_name(); if (this_present_file_name || that_present_file_name) { if (!(this_present_file_name && that_present_file_name)) return false; if (!this.file_name.equals(that.file_name)) return false; } boolean this_present_copy_params = true && this.isSetCopy_params(); boolean that_present_copy_params = true && that.isSetCopy_params(); if (this_present_copy_params || that_present_copy_params) { if (!(this_present_copy_params && that_present_copy_params)) return false; if (!this.copy_params.equals(that.copy_params)) return false; } boolean this_present_row_desc = true && this.isSetRow_desc(); boolean that_present_row_desc = true && that.isSetRow_desc(); if (this_present_row_desc || that_present_row_desc) { if (!(this_present_row_desc && that_present_row_desc)) return false; if (!this.row_desc.equals(that.row_desc)) return false; } boolean this_present_create_params = true && this.isSetCreate_params(); boolean that_present_create_params = true && that.isSetCreate_params(); if (this_present_create_params || that_present_create_params) { if (!(this_present_create_params && that_present_create_params)) return false; if (!this.create_params.equals(that.create_params)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetTable_name()) ? 131071 : 524287); if (isSetTable_name()) hashCode = hashCode * 8191 + table_name.hashCode(); hashCode = hashCode * 8191 + ((isSetFile_name()) ? 131071 : 524287); if (isSetFile_name()) hashCode = hashCode * 8191 + file_name.hashCode(); hashCode = hashCode * 8191 + ((isSetCopy_params()) ? 131071 : 524287); if (isSetCopy_params()) hashCode = hashCode * 8191 + copy_params.hashCode(); hashCode = hashCode * 8191 + ((isSetRow_desc()) ? 131071 : 524287); if (isSetRow_desc()) hashCode = hashCode * 8191 + row_desc.hashCode(); hashCode = hashCode * 8191 + ((isSetCreate_params()) ? 131071 : 524287); if (isSetCreate_params()) hashCode = hashCode * 8191 + create_params.hashCode(); return hashCode; } @Override public int compareTo(import_geo_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_name(), other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFile_name(), other.isSetFile_name()); if (lastComparison != 0) { return lastComparison; } if (isSetFile_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_name, other.file_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCopy_params(), other.isSetCopy_params()); if (lastComparison != 0) { return lastComparison; } if (isSetCopy_params()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.copy_params, other.copy_params); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRow_desc(), other.isSetRow_desc()); if (lastComparison != 0) { return lastComparison; } if (isSetRow_desc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row_desc, other.row_desc); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCreate_params(), other.isSetCreate_params()); if (lastComparison != 0) { return lastComparison; } if (isSetCreate_params()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.create_params, other.create_params); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("import_geo_table_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("file_name:"); if (this.file_name == null) { sb.append("null"); } else { sb.append(this.file_name); } first = false; if (!first) sb.append(", "); sb.append("copy_params:"); if (this.copy_params == null) { sb.append("null"); } else { sb.append(this.copy_params); } first = false; if (!first) sb.append(", "); sb.append("row_desc:"); if (this.row_desc == null) { sb.append("null"); } else { sb.append(this.row_desc); } first = false; if (!first) sb.append(", "); sb.append("create_params:"); if (this.create_params == null) { sb.append("null"); } else { sb.append(this.create_params); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (copy_params != null) { copy_params.validate(); } if (create_params != null) { create_params.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class import_geo_table_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_geo_table_argsStandardScheme getScheme() { return new import_geo_table_argsStandardScheme(); } } private static class import_geo_table_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<import_geo_table_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, import_geo_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // FILE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.file_name = iprot.readString(); struct.setFile_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // COPY_PARAMS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // ROW_DESC if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list620 = iprot.readListBegin(); struct.row_desc = new java.util.ArrayList<TColumnType>(_list620.size); @org.apache.thrift.annotation.Nullable TColumnType _elem621; for (int _i622 = 0; _i622 < _list620.size; ++_i622) { _elem621 = new TColumnType(); _elem621.read(iprot); struct.row_desc.add(_elem621); } iprot.readListEnd(); } struct.setRow_descIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // CREATE_PARAMS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.create_params = new TCreateParams(); struct.create_params.read(iprot); struct.setCreate_paramsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, import_geo_table_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.file_name != null) { oprot.writeFieldBegin(FILE_NAME_FIELD_DESC); oprot.writeString(struct.file_name); oprot.writeFieldEnd(); } if (struct.copy_params != null) { oprot.writeFieldBegin(COPY_PARAMS_FIELD_DESC); struct.copy_params.write(oprot); oprot.writeFieldEnd(); } if (struct.row_desc != null) { oprot.writeFieldBegin(ROW_DESC_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.row_desc.size())); for (TColumnType _iter623 : struct.row_desc) { _iter623.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.create_params != null) { oprot.writeFieldBegin(CREATE_PARAMS_FIELD_DESC); struct.create_params.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class import_geo_table_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_geo_table_argsTupleScheme getScheme() { return new import_geo_table_argsTupleScheme(); } } private static class import_geo_table_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<import_geo_table_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, import_geo_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetFile_name()) { optionals.set(2); } if (struct.isSetCopy_params()) { optionals.set(3); } if (struct.isSetRow_desc()) { optionals.set(4); } if (struct.isSetCreate_params()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetFile_name()) { oprot.writeString(struct.file_name); } if (struct.isSetCopy_params()) { struct.copy_params.write(oprot); } if (struct.isSetRow_desc()) { { oprot.writeI32(struct.row_desc.size()); for (TColumnType _iter624 : struct.row_desc) { _iter624.write(oprot); } } } if (struct.isSetCreate_params()) { struct.create_params.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, import_geo_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { struct.file_name = iprot.readString(); struct.setFile_nameIsSet(true); } if (incoming.get(3)) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } if (incoming.get(4)) { { org.apache.thrift.protocol.TList _list625 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.row_desc = new java.util.ArrayList<TColumnType>(_list625.size); @org.apache.thrift.annotation.Nullable TColumnType _elem626; for (int _i627 = 0; _i627 < _list625.size; ++_i627) { _elem626 = new TColumnType(); _elem626.read(iprot); struct.row_desc.add(_elem626); } } struct.setRow_descIsSet(true); } if (incoming.get(5)) { struct.create_params = new TCreateParams(); struct.create_params.read(iprot); struct.setCreate_paramsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class import_geo_table_result implements org.apache.thrift.TBase<import_geo_table_result, import_geo_table_result._Fields>, java.io.Serializable, Cloneable, Comparable<import_geo_table_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("import_geo_table_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new import_geo_table_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new import_geo_table_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(import_geo_table_result.class, metaDataMap); } public import_geo_table_result() { } public import_geo_table_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public import_geo_table_result(import_geo_table_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public import_geo_table_result deepCopy() { return new import_geo_table_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public import_geo_table_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof import_geo_table_result) return this.equals((import_geo_table_result)that); return false; } public boolean equals(import_geo_table_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(import_geo_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("import_geo_table_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class import_geo_table_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_geo_table_resultStandardScheme getScheme() { return new import_geo_table_resultStandardScheme(); } } private static class import_geo_table_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<import_geo_table_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, import_geo_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, import_geo_table_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class import_geo_table_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_geo_table_resultTupleScheme getScheme() { return new import_geo_table_resultTupleScheme(); } } private static class import_geo_table_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<import_geo_table_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, import_geo_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, import_geo_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class import_table_status_args implements org.apache.thrift.TBase<import_table_status_args, import_table_status_args._Fields>, java.io.Serializable, Cloneable, Comparable<import_table_status_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("import_table_status_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMPORT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("import_id", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new import_table_status_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new import_table_status_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String import_id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), IMPORT_ID((short)2, "import_id"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // IMPORT_ID return IMPORT_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.IMPORT_ID, new org.apache.thrift.meta_data.FieldMetaData("import_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(import_table_status_args.class, metaDataMap); } public import_table_status_args() { } public import_table_status_args( java.lang.String session, java.lang.String import_id) { this(); this.session = session; this.import_id = import_id; } /** * Performs a deep copy on <i>other</i>. */ public import_table_status_args(import_table_status_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetImport_id()) { this.import_id = other.import_id; } } public import_table_status_args deepCopy() { return new import_table_status_args(this); } @Override public void clear() { this.session = null; this.import_id = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public import_table_status_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImport_id() { return this.import_id; } public import_table_status_args setImport_id(@org.apache.thrift.annotation.Nullable java.lang.String import_id) { this.import_id = import_id; return this; } public void unsetImport_id() { this.import_id = null; } /** Returns true if field import_id is set (has been assigned a value) and false otherwise */ public boolean isSetImport_id() { return this.import_id != null; } public void setImport_idIsSet(boolean value) { if (!value) { this.import_id = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case IMPORT_ID: if (value == null) { unsetImport_id(); } else { setImport_id((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case IMPORT_ID: return getImport_id(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case IMPORT_ID: return isSetImport_id(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof import_table_status_args) return this.equals((import_table_status_args)that); return false; } public boolean equals(import_table_status_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_import_id = true && this.isSetImport_id(); boolean that_present_import_id = true && that.isSetImport_id(); if (this_present_import_id || that_present_import_id) { if (!(this_present_import_id && that_present_import_id)) return false; if (!this.import_id.equals(that.import_id)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetImport_id()) ? 131071 : 524287); if (isSetImport_id()) hashCode = hashCode * 8191 + import_id.hashCode(); return hashCode; } @Override public int compareTo(import_table_status_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetImport_id(), other.isSetImport_id()); if (lastComparison != 0) { return lastComparison; } if (isSetImport_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.import_id, other.import_id); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("import_table_status_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("import_id:"); if (this.import_id == null) { sb.append("null"); } else { sb.append(this.import_id); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class import_table_status_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_table_status_argsStandardScheme getScheme() { return new import_table_status_argsStandardScheme(); } } private static class import_table_status_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<import_table_status_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, import_table_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMPORT_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.import_id = iprot.readString(); struct.setImport_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, import_table_status_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.import_id != null) { oprot.writeFieldBegin(IMPORT_ID_FIELD_DESC); oprot.writeString(struct.import_id); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class import_table_status_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_table_status_argsTupleScheme getScheme() { return new import_table_status_argsTupleScheme(); } } private static class import_table_status_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<import_table_status_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, import_table_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetImport_id()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetImport_id()) { oprot.writeString(struct.import_id); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, import_table_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.import_id = iprot.readString(); struct.setImport_idIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class import_table_status_result implements org.apache.thrift.TBase<import_table_status_result, import_table_status_result._Fields>, java.io.Serializable, Cloneable, Comparable<import_table_status_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("import_table_status_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new import_table_status_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new import_table_status_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TImportStatus success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TImportStatus.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(import_table_status_result.class, metaDataMap); } public import_table_status_result() { } public import_table_status_result( TImportStatus success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public import_table_status_result(import_table_status_result other) { if (other.isSetSuccess()) { this.success = new TImportStatus(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public import_table_status_result deepCopy() { return new import_table_status_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TImportStatus getSuccess() { return this.success; } public import_table_status_result setSuccess(@org.apache.thrift.annotation.Nullable TImportStatus success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public import_table_status_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TImportStatus)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof import_table_status_result) return this.equals((import_table_status_result)that); return false; } public boolean equals(import_table_status_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(import_table_status_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("import_table_status_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class import_table_status_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_table_status_resultStandardScheme getScheme() { return new import_table_status_resultStandardScheme(); } } private static class import_table_status_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<import_table_status_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, import_table_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TImportStatus(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, import_table_status_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class import_table_status_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public import_table_status_resultTupleScheme getScheme() { return new import_table_status_resultTupleScheme(); } } private static class import_table_status_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<import_table_status_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, import_table_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, import_table_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TImportStatus(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_first_geo_file_in_archive_args implements org.apache.thrift.TBase<get_first_geo_file_in_archive_args, get_first_geo_file_in_archive_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_first_geo_file_in_archive_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_first_geo_file_in_archive_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ARCHIVE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("archive_path", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COPY_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("copy_params", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_first_geo_file_in_archive_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_first_geo_file_in_archive_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String archive_path; // required public @org.apache.thrift.annotation.Nullable TCopyParams copy_params; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), ARCHIVE_PATH((short)2, "archive_path"), COPY_PARAMS((short)3, "copy_params"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // ARCHIVE_PATH return ARCHIVE_PATH; case 3: // COPY_PARAMS return COPY_PARAMS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.ARCHIVE_PATH, new org.apache.thrift.meta_data.FieldMetaData("archive_path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COPY_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("copy_params", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCopyParams.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_first_geo_file_in_archive_args.class, metaDataMap); } public get_first_geo_file_in_archive_args() { } public get_first_geo_file_in_archive_args( java.lang.String session, java.lang.String archive_path, TCopyParams copy_params) { this(); this.session = session; this.archive_path = archive_path; this.copy_params = copy_params; } /** * Performs a deep copy on <i>other</i>. */ public get_first_geo_file_in_archive_args(get_first_geo_file_in_archive_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetArchive_path()) { this.archive_path = other.archive_path; } if (other.isSetCopy_params()) { this.copy_params = new TCopyParams(other.copy_params); } } public get_first_geo_file_in_archive_args deepCopy() { return new get_first_geo_file_in_archive_args(this); } @Override public void clear() { this.session = null; this.archive_path = null; this.copy_params = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_first_geo_file_in_archive_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getArchive_path() { return this.archive_path; } public get_first_geo_file_in_archive_args setArchive_path(@org.apache.thrift.annotation.Nullable java.lang.String archive_path) { this.archive_path = archive_path; return this; } public void unsetArchive_path() { this.archive_path = null; } /** Returns true if field archive_path is set (has been assigned a value) and false otherwise */ public boolean isSetArchive_path() { return this.archive_path != null; } public void setArchive_pathIsSet(boolean value) { if (!value) { this.archive_path = null; } } @org.apache.thrift.annotation.Nullable public TCopyParams getCopy_params() { return this.copy_params; } public get_first_geo_file_in_archive_args setCopy_params(@org.apache.thrift.annotation.Nullable TCopyParams copy_params) { this.copy_params = copy_params; return this; } public void unsetCopy_params() { this.copy_params = null; } /** Returns true if field copy_params is set (has been assigned a value) and false otherwise */ public boolean isSetCopy_params() { return this.copy_params != null; } public void setCopy_paramsIsSet(boolean value) { if (!value) { this.copy_params = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case ARCHIVE_PATH: if (value == null) { unsetArchive_path(); } else { setArchive_path((java.lang.String)value); } break; case COPY_PARAMS: if (value == null) { unsetCopy_params(); } else { setCopy_params((TCopyParams)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case ARCHIVE_PATH: return getArchive_path(); case COPY_PARAMS: return getCopy_params(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case ARCHIVE_PATH: return isSetArchive_path(); case COPY_PARAMS: return isSetCopy_params(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_first_geo_file_in_archive_args) return this.equals((get_first_geo_file_in_archive_args)that); return false; } public boolean equals(get_first_geo_file_in_archive_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_archive_path = true && this.isSetArchive_path(); boolean that_present_archive_path = true && that.isSetArchive_path(); if (this_present_archive_path || that_present_archive_path) { if (!(this_present_archive_path && that_present_archive_path)) return false; if (!this.archive_path.equals(that.archive_path)) return false; } boolean this_present_copy_params = true && this.isSetCopy_params(); boolean that_present_copy_params = true && that.isSetCopy_params(); if (this_present_copy_params || that_present_copy_params) { if (!(this_present_copy_params && that_present_copy_params)) return false; if (!this.copy_params.equals(that.copy_params)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetArchive_path()) ? 131071 : 524287); if (isSetArchive_path()) hashCode = hashCode * 8191 + archive_path.hashCode(); hashCode = hashCode * 8191 + ((isSetCopy_params()) ? 131071 : 524287); if (isSetCopy_params()) hashCode = hashCode * 8191 + copy_params.hashCode(); return hashCode; } @Override public int compareTo(get_first_geo_file_in_archive_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetArchive_path(), other.isSetArchive_path()); if (lastComparison != 0) { return lastComparison; } if (isSetArchive_path()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.archive_path, other.archive_path); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCopy_params(), other.isSetCopy_params()); if (lastComparison != 0) { return lastComparison; } if (isSetCopy_params()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.copy_params, other.copy_params); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_first_geo_file_in_archive_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("archive_path:"); if (this.archive_path == null) { sb.append("null"); } else { sb.append(this.archive_path); } first = false; if (!first) sb.append(", "); sb.append("copy_params:"); if (this.copy_params == null) { sb.append("null"); } else { sb.append(this.copy_params); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (copy_params != null) { copy_params.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_first_geo_file_in_archive_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_first_geo_file_in_archive_argsStandardScheme getScheme() { return new get_first_geo_file_in_archive_argsStandardScheme(); } } private static class get_first_geo_file_in_archive_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_first_geo_file_in_archive_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_first_geo_file_in_archive_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ARCHIVE_PATH if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.archive_path = iprot.readString(); struct.setArchive_pathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COPY_PARAMS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_first_geo_file_in_archive_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.archive_path != null) { oprot.writeFieldBegin(ARCHIVE_PATH_FIELD_DESC); oprot.writeString(struct.archive_path); oprot.writeFieldEnd(); } if (struct.copy_params != null) { oprot.writeFieldBegin(COPY_PARAMS_FIELD_DESC); struct.copy_params.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_first_geo_file_in_archive_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_first_geo_file_in_archive_argsTupleScheme getScheme() { return new get_first_geo_file_in_archive_argsTupleScheme(); } } private static class get_first_geo_file_in_archive_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_first_geo_file_in_archive_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_first_geo_file_in_archive_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetArchive_path()) { optionals.set(1); } if (struct.isSetCopy_params()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetArchive_path()) { oprot.writeString(struct.archive_path); } if (struct.isSetCopy_params()) { struct.copy_params.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_first_geo_file_in_archive_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.archive_path = iprot.readString(); struct.setArchive_pathIsSet(true); } if (incoming.get(2)) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_first_geo_file_in_archive_result implements org.apache.thrift.TBase<get_first_geo_file_in_archive_result, get_first_geo_file_in_archive_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_first_geo_file_in_archive_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_first_geo_file_in_archive_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_first_geo_file_in_archive_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_first_geo_file_in_archive_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_first_geo_file_in_archive_result.class, metaDataMap); } public get_first_geo_file_in_archive_result() { } public get_first_geo_file_in_archive_result( java.lang.String success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_first_geo_file_in_archive_result(get_first_geo_file_in_archive_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_first_geo_file_in_archive_result deepCopy() { return new get_first_geo_file_in_archive_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public get_first_geo_file_in_archive_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_first_geo_file_in_archive_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_first_geo_file_in_archive_result) return this.equals((get_first_geo_file_in_archive_result)that); return false; } public boolean equals(get_first_geo_file_in_archive_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_first_geo_file_in_archive_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_first_geo_file_in_archive_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_first_geo_file_in_archive_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_first_geo_file_in_archive_resultStandardScheme getScheme() { return new get_first_geo_file_in_archive_resultStandardScheme(); } } private static class get_first_geo_file_in_archive_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_first_geo_file_in_archive_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_first_geo_file_in_archive_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_first_geo_file_in_archive_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_first_geo_file_in_archive_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_first_geo_file_in_archive_resultTupleScheme getScheme() { return new get_first_geo_file_in_archive_resultTupleScheme(); } } private static class get_first_geo_file_in_archive_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_first_geo_file_in_archive_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_first_geo_file_in_archive_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_first_geo_file_in_archive_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_all_files_in_archive_args implements org.apache.thrift.TBase<get_all_files_in_archive_args, get_all_files_in_archive_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_files_in_archive_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_files_in_archive_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ARCHIVE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("archive_path", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COPY_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("copy_params", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_all_files_in_archive_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_all_files_in_archive_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String archive_path; // required public @org.apache.thrift.annotation.Nullable TCopyParams copy_params; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), ARCHIVE_PATH((short)2, "archive_path"), COPY_PARAMS((short)3, "copy_params"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // ARCHIVE_PATH return ARCHIVE_PATH; case 3: // COPY_PARAMS return COPY_PARAMS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.ARCHIVE_PATH, new org.apache.thrift.meta_data.FieldMetaData("archive_path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COPY_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("copy_params", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCopyParams.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_files_in_archive_args.class, metaDataMap); } public get_all_files_in_archive_args() { } public get_all_files_in_archive_args( java.lang.String session, java.lang.String archive_path, TCopyParams copy_params) { this(); this.session = session; this.archive_path = archive_path; this.copy_params = copy_params; } /** * Performs a deep copy on <i>other</i>. */ public get_all_files_in_archive_args(get_all_files_in_archive_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetArchive_path()) { this.archive_path = other.archive_path; } if (other.isSetCopy_params()) { this.copy_params = new TCopyParams(other.copy_params); } } public get_all_files_in_archive_args deepCopy() { return new get_all_files_in_archive_args(this); } @Override public void clear() { this.session = null; this.archive_path = null; this.copy_params = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_all_files_in_archive_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getArchive_path() { return this.archive_path; } public get_all_files_in_archive_args setArchive_path(@org.apache.thrift.annotation.Nullable java.lang.String archive_path) { this.archive_path = archive_path; return this; } public void unsetArchive_path() { this.archive_path = null; } /** Returns true if field archive_path is set (has been assigned a value) and false otherwise */ public boolean isSetArchive_path() { return this.archive_path != null; } public void setArchive_pathIsSet(boolean value) { if (!value) { this.archive_path = null; } } @org.apache.thrift.annotation.Nullable public TCopyParams getCopy_params() { return this.copy_params; } public get_all_files_in_archive_args setCopy_params(@org.apache.thrift.annotation.Nullable TCopyParams copy_params) { this.copy_params = copy_params; return this; } public void unsetCopy_params() { this.copy_params = null; } /** Returns true if field copy_params is set (has been assigned a value) and false otherwise */ public boolean isSetCopy_params() { return this.copy_params != null; } public void setCopy_paramsIsSet(boolean value) { if (!value) { this.copy_params = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case ARCHIVE_PATH: if (value == null) { unsetArchive_path(); } else { setArchive_path((java.lang.String)value); } break; case COPY_PARAMS: if (value == null) { unsetCopy_params(); } else { setCopy_params((TCopyParams)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case ARCHIVE_PATH: return getArchive_path(); case COPY_PARAMS: return getCopy_params(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case ARCHIVE_PATH: return isSetArchive_path(); case COPY_PARAMS: return isSetCopy_params(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_all_files_in_archive_args) return this.equals((get_all_files_in_archive_args)that); return false; } public boolean equals(get_all_files_in_archive_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_archive_path = true && this.isSetArchive_path(); boolean that_present_archive_path = true && that.isSetArchive_path(); if (this_present_archive_path || that_present_archive_path) { if (!(this_present_archive_path && that_present_archive_path)) return false; if (!this.archive_path.equals(that.archive_path)) return false; } boolean this_present_copy_params = true && this.isSetCopy_params(); boolean that_present_copy_params = true && that.isSetCopy_params(); if (this_present_copy_params || that_present_copy_params) { if (!(this_present_copy_params && that_present_copy_params)) return false; if (!this.copy_params.equals(that.copy_params)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetArchive_path()) ? 131071 : 524287); if (isSetArchive_path()) hashCode = hashCode * 8191 + archive_path.hashCode(); hashCode = hashCode * 8191 + ((isSetCopy_params()) ? 131071 : 524287); if (isSetCopy_params()) hashCode = hashCode * 8191 + copy_params.hashCode(); return hashCode; } @Override public int compareTo(get_all_files_in_archive_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetArchive_path(), other.isSetArchive_path()); if (lastComparison != 0) { return lastComparison; } if (isSetArchive_path()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.archive_path, other.archive_path); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCopy_params(), other.isSetCopy_params()); if (lastComparison != 0) { return lastComparison; } if (isSetCopy_params()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.copy_params, other.copy_params); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_all_files_in_archive_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("archive_path:"); if (this.archive_path == null) { sb.append("null"); } else { sb.append(this.archive_path); } first = false; if (!first) sb.append(", "); sb.append("copy_params:"); if (this.copy_params == null) { sb.append("null"); } else { sb.append(this.copy_params); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (copy_params != null) { copy_params.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_files_in_archive_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_files_in_archive_argsStandardScheme getScheme() { return new get_all_files_in_archive_argsStandardScheme(); } } private static class get_all_files_in_archive_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_all_files_in_archive_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_files_in_archive_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ARCHIVE_PATH if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.archive_path = iprot.readString(); struct.setArchive_pathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COPY_PARAMS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_files_in_archive_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.archive_path != null) { oprot.writeFieldBegin(ARCHIVE_PATH_FIELD_DESC); oprot.writeString(struct.archive_path); oprot.writeFieldEnd(); } if (struct.copy_params != null) { oprot.writeFieldBegin(COPY_PARAMS_FIELD_DESC); struct.copy_params.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_files_in_archive_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_files_in_archive_argsTupleScheme getScheme() { return new get_all_files_in_archive_argsTupleScheme(); } } private static class get_all_files_in_archive_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_all_files_in_archive_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_files_in_archive_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetArchive_path()) { optionals.set(1); } if (struct.isSetCopy_params()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetArchive_path()) { oprot.writeString(struct.archive_path); } if (struct.isSetCopy_params()) { struct.copy_params.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_files_in_archive_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.archive_path = iprot.readString(); struct.setArchive_pathIsSet(true); } if (incoming.get(2)) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_all_files_in_archive_result implements org.apache.thrift.TBase<get_all_files_in_archive_result, get_all_files_in_archive_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_files_in_archive_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_files_in_archive_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_all_files_in_archive_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_all_files_in_archive_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_files_in_archive_result.class, metaDataMap); } public get_all_files_in_archive_result() { } public get_all_files_in_archive_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_all_files_in_archive_result(get_all_files_in_archive_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_all_files_in_archive_result deepCopy() { return new get_all_files_in_archive_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_all_files_in_archive_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_all_files_in_archive_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_all_files_in_archive_result) return this.equals((get_all_files_in_archive_result)that); return false; } public boolean equals(get_all_files_in_archive_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_all_files_in_archive_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_all_files_in_archive_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_files_in_archive_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_files_in_archive_resultStandardScheme getScheme() { return new get_all_files_in_archive_resultStandardScheme(); } } private static class get_all_files_in_archive_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_all_files_in_archive_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_files_in_archive_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list628 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list628.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem629; for (int _i630 = 0; _i630 < _list628.size; ++_i630) { _elem629 = iprot.readString(); struct.success.add(_elem629); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_files_in_archive_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter631 : struct.success) { oprot.writeString(_iter631); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_files_in_archive_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_files_in_archive_resultTupleScheme getScheme() { return new get_all_files_in_archive_resultTupleScheme(); } } private static class get_all_files_in_archive_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_all_files_in_archive_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_files_in_archive_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter632 : struct.success) { oprot.writeString(_iter632); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_files_in_archive_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list633 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list633.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem634; for (int _i635 = 0; _i635 < _list633.size; ++_i635) { _elem634 = iprot.readString(); struct.success.add(_elem634); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_layers_in_geo_file_args implements org.apache.thrift.TBase<get_layers_in_geo_file_args, get_layers_in_geo_file_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_layers_in_geo_file_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_layers_in_geo_file_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField FILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("file_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COPY_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("copy_params", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_layers_in_geo_file_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_layers_in_geo_file_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String file_name; // required public @org.apache.thrift.annotation.Nullable TCopyParams copy_params; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), FILE_NAME((short)2, "file_name"), COPY_PARAMS((short)3, "copy_params"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // FILE_NAME return FILE_NAME; case 3: // COPY_PARAMS return COPY_PARAMS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.FILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("file_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COPY_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("copy_params", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCopyParams.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_layers_in_geo_file_args.class, metaDataMap); } public get_layers_in_geo_file_args() { } public get_layers_in_geo_file_args( java.lang.String session, java.lang.String file_name, TCopyParams copy_params) { this(); this.session = session; this.file_name = file_name; this.copy_params = copy_params; } /** * Performs a deep copy on <i>other</i>. */ public get_layers_in_geo_file_args(get_layers_in_geo_file_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetFile_name()) { this.file_name = other.file_name; } if (other.isSetCopy_params()) { this.copy_params = new TCopyParams(other.copy_params); } } public get_layers_in_geo_file_args deepCopy() { return new get_layers_in_geo_file_args(this); } @Override public void clear() { this.session = null; this.file_name = null; this.copy_params = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_layers_in_geo_file_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getFile_name() { return this.file_name; } public get_layers_in_geo_file_args setFile_name(@org.apache.thrift.annotation.Nullable java.lang.String file_name) { this.file_name = file_name; return this; } public void unsetFile_name() { this.file_name = null; } /** Returns true if field file_name is set (has been assigned a value) and false otherwise */ public boolean isSetFile_name() { return this.file_name != null; } public void setFile_nameIsSet(boolean value) { if (!value) { this.file_name = null; } } @org.apache.thrift.annotation.Nullable public TCopyParams getCopy_params() { return this.copy_params; } public get_layers_in_geo_file_args setCopy_params(@org.apache.thrift.annotation.Nullable TCopyParams copy_params) { this.copy_params = copy_params; return this; } public void unsetCopy_params() { this.copy_params = null; } /** Returns true if field copy_params is set (has been assigned a value) and false otherwise */ public boolean isSetCopy_params() { return this.copy_params != null; } public void setCopy_paramsIsSet(boolean value) { if (!value) { this.copy_params = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case FILE_NAME: if (value == null) { unsetFile_name(); } else { setFile_name((java.lang.String)value); } break; case COPY_PARAMS: if (value == null) { unsetCopy_params(); } else { setCopy_params((TCopyParams)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case FILE_NAME: return getFile_name(); case COPY_PARAMS: return getCopy_params(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case FILE_NAME: return isSetFile_name(); case COPY_PARAMS: return isSetCopy_params(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_layers_in_geo_file_args) return this.equals((get_layers_in_geo_file_args)that); return false; } public boolean equals(get_layers_in_geo_file_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_file_name = true && this.isSetFile_name(); boolean that_present_file_name = true && that.isSetFile_name(); if (this_present_file_name || that_present_file_name) { if (!(this_present_file_name && that_present_file_name)) return false; if (!this.file_name.equals(that.file_name)) return false; } boolean this_present_copy_params = true && this.isSetCopy_params(); boolean that_present_copy_params = true && that.isSetCopy_params(); if (this_present_copy_params || that_present_copy_params) { if (!(this_present_copy_params && that_present_copy_params)) return false; if (!this.copy_params.equals(that.copy_params)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetFile_name()) ? 131071 : 524287); if (isSetFile_name()) hashCode = hashCode * 8191 + file_name.hashCode(); hashCode = hashCode * 8191 + ((isSetCopy_params()) ? 131071 : 524287); if (isSetCopy_params()) hashCode = hashCode * 8191 + copy_params.hashCode(); return hashCode; } @Override public int compareTo(get_layers_in_geo_file_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFile_name(), other.isSetFile_name()); if (lastComparison != 0) { return lastComparison; } if (isSetFile_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_name, other.file_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCopy_params(), other.isSetCopy_params()); if (lastComparison != 0) { return lastComparison; } if (isSetCopy_params()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.copy_params, other.copy_params); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_layers_in_geo_file_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("file_name:"); if (this.file_name == null) { sb.append("null"); } else { sb.append(this.file_name); } first = false; if (!first) sb.append(", "); sb.append("copy_params:"); if (this.copy_params == null) { sb.append("null"); } else { sb.append(this.copy_params); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (copy_params != null) { copy_params.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_layers_in_geo_file_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_layers_in_geo_file_argsStandardScheme getScheme() { return new get_layers_in_geo_file_argsStandardScheme(); } } private static class get_layers_in_geo_file_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_layers_in_geo_file_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_layers_in_geo_file_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // FILE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.file_name = iprot.readString(); struct.setFile_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COPY_PARAMS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_layers_in_geo_file_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.file_name != null) { oprot.writeFieldBegin(FILE_NAME_FIELD_DESC); oprot.writeString(struct.file_name); oprot.writeFieldEnd(); } if (struct.copy_params != null) { oprot.writeFieldBegin(COPY_PARAMS_FIELD_DESC); struct.copy_params.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_layers_in_geo_file_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_layers_in_geo_file_argsTupleScheme getScheme() { return new get_layers_in_geo_file_argsTupleScheme(); } } private static class get_layers_in_geo_file_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_layers_in_geo_file_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_layers_in_geo_file_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetFile_name()) { optionals.set(1); } if (struct.isSetCopy_params()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetFile_name()) { oprot.writeString(struct.file_name); } if (struct.isSetCopy_params()) { struct.copy_params.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_layers_in_geo_file_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.file_name = iprot.readString(); struct.setFile_nameIsSet(true); } if (incoming.get(2)) { struct.copy_params = new TCopyParams(); struct.copy_params.read(iprot); struct.setCopy_paramsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_layers_in_geo_file_result implements org.apache.thrift.TBase<get_layers_in_geo_file_result, get_layers_in_geo_file_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_layers_in_geo_file_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_layers_in_geo_file_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_layers_in_geo_file_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_layers_in_geo_file_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TGeoFileLayerInfo> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGeoFileLayerInfo.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_layers_in_geo_file_result.class, metaDataMap); } public get_layers_in_geo_file_result() { } public get_layers_in_geo_file_result( java.util.List<TGeoFileLayerInfo> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_layers_in_geo_file_result(get_layers_in_geo_file_result other) { if (other.isSetSuccess()) { java.util.List<TGeoFileLayerInfo> __this__success = new java.util.ArrayList<TGeoFileLayerInfo>(other.success.size()); for (TGeoFileLayerInfo other_element : other.success) { __this__success.add(new TGeoFileLayerInfo(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_layers_in_geo_file_result deepCopy() { return new get_layers_in_geo_file_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TGeoFileLayerInfo> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TGeoFileLayerInfo elem) { if (this.success == null) { this.success = new java.util.ArrayList<TGeoFileLayerInfo>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TGeoFileLayerInfo> getSuccess() { return this.success; } public get_layers_in_geo_file_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TGeoFileLayerInfo> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_layers_in_geo_file_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TGeoFileLayerInfo>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_layers_in_geo_file_result) return this.equals((get_layers_in_geo_file_result)that); return false; } public boolean equals(get_layers_in_geo_file_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_layers_in_geo_file_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_layers_in_geo_file_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_layers_in_geo_file_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_layers_in_geo_file_resultStandardScheme getScheme() { return new get_layers_in_geo_file_resultStandardScheme(); } } private static class get_layers_in_geo_file_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_layers_in_geo_file_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_layers_in_geo_file_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list636 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TGeoFileLayerInfo>(_list636.size); @org.apache.thrift.annotation.Nullable TGeoFileLayerInfo _elem637; for (int _i638 = 0; _i638 < _list636.size; ++_i638) { _elem637 = new TGeoFileLayerInfo(); _elem637.read(iprot); struct.success.add(_elem637); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_layers_in_geo_file_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TGeoFileLayerInfo _iter639 : struct.success) { _iter639.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_layers_in_geo_file_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_layers_in_geo_file_resultTupleScheme getScheme() { return new get_layers_in_geo_file_resultTupleScheme(); } } private static class get_layers_in_geo_file_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_layers_in_geo_file_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_layers_in_geo_file_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TGeoFileLayerInfo _iter640 : struct.success) { _iter640.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_layers_in_geo_file_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list641 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TGeoFileLayerInfo>(_list641.size); @org.apache.thrift.annotation.Nullable TGeoFileLayerInfo _elem642; for (int _i643 = 0; _i643 < _list641.size; ++_i643) { _elem642 = new TGeoFileLayerInfo(); _elem642.read(iprot); struct.success.add(_elem642); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class query_get_outer_fragment_count_args implements org.apache.thrift.TBase<query_get_outer_fragment_count_args, query_get_outer_fragment_count_args._Fields>, java.io.Serializable, Cloneable, Comparable<query_get_outer_fragment_count_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("query_get_outer_fragment_count_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new query_get_outer_fragment_count_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new query_get_outer_fragment_count_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String query; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), QUERY((short)2, "query"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // QUERY return QUERY; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(query_get_outer_fragment_count_args.class, metaDataMap); } public query_get_outer_fragment_count_args() { } public query_get_outer_fragment_count_args( java.lang.String session, java.lang.String query) { this(); this.session = session; this.query = query; } /** * Performs a deep copy on <i>other</i>. */ public query_get_outer_fragment_count_args(query_get_outer_fragment_count_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetQuery()) { this.query = other.query; } } public query_get_outer_fragment_count_args deepCopy() { return new query_get_outer_fragment_count_args(this); } @Override public void clear() { this.session = null; this.query = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public query_get_outer_fragment_count_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getQuery() { return this.query; } public query_get_outer_fragment_count_args setQuery(@org.apache.thrift.annotation.Nullable java.lang.String query) { this.query = query; return this; } public void unsetQuery() { this.query = null; } /** Returns true if field query is set (has been assigned a value) and false otherwise */ public boolean isSetQuery() { return this.query != null; } public void setQueryIsSet(boolean value) { if (!value) { this.query = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case QUERY: if (value == null) { unsetQuery(); } else { setQuery((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case QUERY: return getQuery(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case QUERY: return isSetQuery(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof query_get_outer_fragment_count_args) return this.equals((query_get_outer_fragment_count_args)that); return false; } public boolean equals(query_get_outer_fragment_count_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_query = true && this.isSetQuery(); boolean that_present_query = true && that.isSetQuery(); if (this_present_query || that_present_query) { if (!(this_present_query && that_present_query)) return false; if (!this.query.equals(that.query)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287); if (isSetQuery()) hashCode = hashCode * 8191 + query.hashCode(); return hashCode; } @Override public int compareTo(query_get_outer_fragment_count_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetQuery(), other.isSetQuery()); if (lastComparison != 0) { return lastComparison; } if (isSetQuery()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("query_get_outer_fragment_count_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("query:"); if (this.query == null) { sb.append("null"); } else { sb.append(this.query); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class query_get_outer_fragment_count_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public query_get_outer_fragment_count_argsStandardScheme getScheme() { return new query_get_outer_fragment_count_argsStandardScheme(); } } private static class query_get_outer_fragment_count_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<query_get_outer_fragment_count_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, query_get_outer_fragment_count_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // QUERY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, query_get_outer_fragment_count_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.query != null) { oprot.writeFieldBegin(QUERY_FIELD_DESC); oprot.writeString(struct.query); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class query_get_outer_fragment_count_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public query_get_outer_fragment_count_argsTupleScheme getScheme() { return new query_get_outer_fragment_count_argsTupleScheme(); } } private static class query_get_outer_fragment_count_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<query_get_outer_fragment_count_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, query_get_outer_fragment_count_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetQuery()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetQuery()) { oprot.writeString(struct.query); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, query_get_outer_fragment_count_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class query_get_outer_fragment_count_result implements org.apache.thrift.TBase<query_get_outer_fragment_count_result, query_get_outer_fragment_count_result._Fields>, java.io.Serializable, Cloneable, Comparable<query_get_outer_fragment_count_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("query_get_outer_fragment_count_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new query_get_outer_fragment_count_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new query_get_outer_fragment_count_resultTupleSchemeFactory(); public long success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(query_get_outer_fragment_count_result.class, metaDataMap); } public query_get_outer_fragment_count_result() { } public query_get_outer_fragment_count_result( long success, TDBException e) { this(); this.success = success; setSuccessIsSet(true); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public query_get_outer_fragment_count_result(query_get_outer_fragment_count_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetE()) { this.e = new TDBException(other.e); } } public query_get_outer_fragment_count_result deepCopy() { return new query_get_outer_fragment_count_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.e = null; } public long getSuccess() { return this.success; } public query_get_outer_fragment_count_result setSuccess(long success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public query_get_outer_fragment_count_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.Long)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof query_get_outer_fragment_count_result) return this.equals((query_get_outer_fragment_count_result)that); return false; } public boolean equals(query_get_outer_fragment_count_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(query_get_outer_fragment_count_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("query_get_outer_fragment_count_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class query_get_outer_fragment_count_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public query_get_outer_fragment_count_resultStandardScheme getScheme() { return new query_get_outer_fragment_count_resultStandardScheme(); } } private static class query_get_outer_fragment_count_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<query_get_outer_fragment_count_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, query_get_outer_fragment_count_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, query_get_outer_fragment_count_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI64(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class query_get_outer_fragment_count_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public query_get_outer_fragment_count_resultTupleScheme getScheme() { return new query_get_outer_fragment_count_resultTupleScheme(); } } private static class query_get_outer_fragment_count_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<query_get_outer_fragment_count_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, query_get_outer_fragment_count_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeI64(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, query_get_outer_fragment_count_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class check_table_consistency_args implements org.apache.thrift.TBase<check_table_consistency_args, check_table_consistency_args._Fields>, java.io.Serializable, Cloneable, Comparable<check_table_consistency_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("check_table_consistency_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new check_table_consistency_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new check_table_consistency_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int table_id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_ID((short)2, "table_id"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_ID return TABLE_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __TABLE_ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(check_table_consistency_args.class, metaDataMap); } public check_table_consistency_args() { } public check_table_consistency_args( java.lang.String session, int table_id) { this(); this.session = session; this.table_id = table_id; setTable_idIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public check_table_consistency_args(check_table_consistency_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.table_id = other.table_id; } public check_table_consistency_args deepCopy() { return new check_table_consistency_args(this); } @Override public void clear() { this.session = null; setTable_idIsSet(false); this.table_id = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public check_table_consistency_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getTable_id() { return this.table_id; } public check_table_consistency_args setTable_id(int table_id) { this.table_id = table_id; setTable_idIsSet(true); return this; } public void unsetTable_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } /** Returns true if field table_id is set (has been assigned a value) and false otherwise */ public boolean isSetTable_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } public void setTable_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLE_ID_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_ID: if (value == null) { unsetTable_id(); } else { setTable_id((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_ID: return getTable_id(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_ID: return isSetTable_id(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof check_table_consistency_args) return this.equals((check_table_consistency_args)that); return false; } public boolean equals(check_table_consistency_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_id = true; boolean that_present_table_id = true; if (this_present_table_id || that_present_table_id) { if (!(this_present_table_id && that_present_table_id)) return false; if (this.table_id != that.table_id) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + table_id; return hashCode; } @Override public int compareTo(check_table_consistency_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_id(), other.isSetTable_id()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_id, other.table_id); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("check_table_consistency_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_id:"); sb.append(this.table_id); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class check_table_consistency_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public check_table_consistency_argsStandardScheme getScheme() { return new check_table_consistency_argsStandardScheme(); } } private static class check_table_consistency_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<check_table_consistency_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, check_table_consistency_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, check_table_consistency_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(TABLE_ID_FIELD_DESC); oprot.writeI32(struct.table_id); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class check_table_consistency_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public check_table_consistency_argsTupleScheme getScheme() { return new check_table_consistency_argsTupleScheme(); } } private static class check_table_consistency_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<check_table_consistency_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, check_table_consistency_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_id()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_id()) { oprot.writeI32(struct.table_id); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, check_table_consistency_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class check_table_consistency_result implements org.apache.thrift.TBase<check_table_consistency_result, check_table_consistency_result._Fields>, java.io.Serializable, Cloneable, Comparable<check_table_consistency_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("check_table_consistency_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new check_table_consistency_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new check_table_consistency_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TTableMeta success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableMeta.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(check_table_consistency_result.class, metaDataMap); } public check_table_consistency_result() { } public check_table_consistency_result( TTableMeta success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public check_table_consistency_result(check_table_consistency_result other) { if (other.isSetSuccess()) { this.success = new TTableMeta(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public check_table_consistency_result deepCopy() { return new check_table_consistency_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TTableMeta getSuccess() { return this.success; } public check_table_consistency_result setSuccess(@org.apache.thrift.annotation.Nullable TTableMeta success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public check_table_consistency_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TTableMeta)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof check_table_consistency_result) return this.equals((check_table_consistency_result)that); return false; } public boolean equals(check_table_consistency_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(check_table_consistency_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("check_table_consistency_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class check_table_consistency_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public check_table_consistency_resultStandardScheme getScheme() { return new check_table_consistency_resultStandardScheme(); } } private static class check_table_consistency_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<check_table_consistency_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, check_table_consistency_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TTableMeta(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, check_table_consistency_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class check_table_consistency_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public check_table_consistency_resultTupleScheme getScheme() { return new check_table_consistency_resultTupleScheme(); } } private static class check_table_consistency_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<check_table_consistency_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, check_table_consistency_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, check_table_consistency_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TTableMeta(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class start_query_args implements org.apache.thrift.TBase<start_query_args, start_query_args._Fields>, java.io.Serializable, Cloneable, Comparable<start_query_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("start_query_args"); private static final org.apache.thrift.protocol.TField LEAF_SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("leaf_session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PARENT_SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_session", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField QUERY_RA_FIELD_DESC = new org.apache.thrift.protocol.TField("query_ra", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField START_TIME_STR_FIELD_DESC = new org.apache.thrift.protocol.TField("start_time_str", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField JUST_EXPLAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("just_explain", org.apache.thrift.protocol.TType.BOOL, (short)5); private static final org.apache.thrift.protocol.TField OUTER_FRAGMENT_INDICES_FIELD_DESC = new org.apache.thrift.protocol.TField("outer_fragment_indices", org.apache.thrift.protocol.TType.LIST, (short)6); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new start_query_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new start_query_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String leaf_session; // required public @org.apache.thrift.annotation.Nullable java.lang.String parent_session; // required public @org.apache.thrift.annotation.Nullable java.lang.String query_ra; // required public @org.apache.thrift.annotation.Nullable java.lang.String start_time_str; // required public boolean just_explain; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> outer_fragment_indices; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { LEAF_SESSION((short)1, "leaf_session"), PARENT_SESSION((short)2, "parent_session"), QUERY_RA((short)3, "query_ra"), START_TIME_STR((short)4, "start_time_str"), JUST_EXPLAIN((short)5, "just_explain"), OUTER_FRAGMENT_INDICES((short)6, "outer_fragment_indices"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // LEAF_SESSION return LEAF_SESSION; case 2: // PARENT_SESSION return PARENT_SESSION; case 3: // QUERY_RA return QUERY_RA; case 4: // START_TIME_STR return START_TIME_STR; case 5: // JUST_EXPLAIN return JUST_EXPLAIN; case 6: // OUTER_FRAGMENT_INDICES return OUTER_FRAGMENT_INDICES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __JUST_EXPLAIN_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.LEAF_SESSION, new org.apache.thrift.meta_data.FieldMetaData("leaf_session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.PARENT_SESSION, new org.apache.thrift.meta_data.FieldMetaData("parent_session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.QUERY_RA, new org.apache.thrift.meta_data.FieldMetaData("query_ra", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.START_TIME_STR, new org.apache.thrift.meta_data.FieldMetaData("start_time_str", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.JUST_EXPLAIN, new org.apache.thrift.meta_data.FieldMetaData("just_explain", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.OUTER_FRAGMENT_INDICES, new org.apache.thrift.meta_data.FieldMetaData("outer_fragment_indices", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(start_query_args.class, metaDataMap); } public start_query_args() { } public start_query_args( java.lang.String leaf_session, java.lang.String parent_session, java.lang.String query_ra, java.lang.String start_time_str, boolean just_explain, java.util.List<java.lang.Long> outer_fragment_indices) { this(); this.leaf_session = leaf_session; this.parent_session = parent_session; this.query_ra = query_ra; this.start_time_str = start_time_str; this.just_explain = just_explain; setJust_explainIsSet(true); this.outer_fragment_indices = outer_fragment_indices; } /** * Performs a deep copy on <i>other</i>. */ public start_query_args(start_query_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetLeaf_session()) { this.leaf_session = other.leaf_session; } if (other.isSetParent_session()) { this.parent_session = other.parent_session; } if (other.isSetQuery_ra()) { this.query_ra = other.query_ra; } if (other.isSetStart_time_str()) { this.start_time_str = other.start_time_str; } this.just_explain = other.just_explain; if (other.isSetOuter_fragment_indices()) { java.util.List<java.lang.Long> __this__outer_fragment_indices = new java.util.ArrayList<java.lang.Long>(other.outer_fragment_indices); this.outer_fragment_indices = __this__outer_fragment_indices; } } public start_query_args deepCopy() { return new start_query_args(this); } @Override public void clear() { this.leaf_session = null; this.parent_session = null; this.query_ra = null; this.start_time_str = null; setJust_explainIsSet(false); this.just_explain = false; this.outer_fragment_indices = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getLeaf_session() { return this.leaf_session; } public start_query_args setLeaf_session(@org.apache.thrift.annotation.Nullable java.lang.String leaf_session) { this.leaf_session = leaf_session; return this; } public void unsetLeaf_session() { this.leaf_session = null; } /** Returns true if field leaf_session is set (has been assigned a value) and false otherwise */ public boolean isSetLeaf_session() { return this.leaf_session != null; } public void setLeaf_sessionIsSet(boolean value) { if (!value) { this.leaf_session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getParent_session() { return this.parent_session; } public start_query_args setParent_session(@org.apache.thrift.annotation.Nullable java.lang.String parent_session) { this.parent_session = parent_session; return this; } public void unsetParent_session() { this.parent_session = null; } /** Returns true if field parent_session is set (has been assigned a value) and false otherwise */ public boolean isSetParent_session() { return this.parent_session != null; } public void setParent_sessionIsSet(boolean value) { if (!value) { this.parent_session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getQuery_ra() { return this.query_ra; } public start_query_args setQuery_ra(@org.apache.thrift.annotation.Nullable java.lang.String query_ra) { this.query_ra = query_ra; return this; } public void unsetQuery_ra() { this.query_ra = null; } /** Returns true if field query_ra is set (has been assigned a value) and false otherwise */ public boolean isSetQuery_ra() { return this.query_ra != null; } public void setQuery_raIsSet(boolean value) { if (!value) { this.query_ra = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getStart_time_str() { return this.start_time_str; } public start_query_args setStart_time_str(@org.apache.thrift.annotation.Nullable java.lang.String start_time_str) { this.start_time_str = start_time_str; return this; } public void unsetStart_time_str() { this.start_time_str = null; } /** Returns true if field start_time_str is set (has been assigned a value) and false otherwise */ public boolean isSetStart_time_str() { return this.start_time_str != null; } public void setStart_time_strIsSet(boolean value) { if (!value) { this.start_time_str = null; } } public boolean isJust_explain() { return this.just_explain; } public start_query_args setJust_explain(boolean just_explain) { this.just_explain = just_explain; setJust_explainIsSet(true); return this; } public void unsetJust_explain() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JUST_EXPLAIN_ISSET_ID); } /** Returns true if field just_explain is set (has been assigned a value) and false otherwise */ public boolean isSetJust_explain() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JUST_EXPLAIN_ISSET_ID); } public void setJust_explainIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JUST_EXPLAIN_ISSET_ID, value); } public int getOuter_fragment_indicesSize() { return (this.outer_fragment_indices == null) ? 0 : this.outer_fragment_indices.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.Long> getOuter_fragment_indicesIterator() { return (this.outer_fragment_indices == null) ? null : this.outer_fragment_indices.iterator(); } public void addToOuter_fragment_indices(long elem) { if (this.outer_fragment_indices == null) { this.outer_fragment_indices = new java.util.ArrayList<java.lang.Long>(); } this.outer_fragment_indices.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.Long> getOuter_fragment_indices() { return this.outer_fragment_indices; } public start_query_args setOuter_fragment_indices(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> outer_fragment_indices) { this.outer_fragment_indices = outer_fragment_indices; return this; } public void unsetOuter_fragment_indices() { this.outer_fragment_indices = null; } /** Returns true if field outer_fragment_indices is set (has been assigned a value) and false otherwise */ public boolean isSetOuter_fragment_indices() { return this.outer_fragment_indices != null; } public void setOuter_fragment_indicesIsSet(boolean value) { if (!value) { this.outer_fragment_indices = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case LEAF_SESSION: if (value == null) { unsetLeaf_session(); } else { setLeaf_session((java.lang.String)value); } break; case PARENT_SESSION: if (value == null) { unsetParent_session(); } else { setParent_session((java.lang.String)value); } break; case QUERY_RA: if (value == null) { unsetQuery_ra(); } else { setQuery_ra((java.lang.String)value); } break; case START_TIME_STR: if (value == null) { unsetStart_time_str(); } else { setStart_time_str((java.lang.String)value); } break; case JUST_EXPLAIN: if (value == null) { unsetJust_explain(); } else { setJust_explain((java.lang.Boolean)value); } break; case OUTER_FRAGMENT_INDICES: if (value == null) { unsetOuter_fragment_indices(); } else { setOuter_fragment_indices((java.util.List<java.lang.Long>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case LEAF_SESSION: return getLeaf_session(); case PARENT_SESSION: return getParent_session(); case QUERY_RA: return getQuery_ra(); case START_TIME_STR: return getStart_time_str(); case JUST_EXPLAIN: return isJust_explain(); case OUTER_FRAGMENT_INDICES: return getOuter_fragment_indices(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case LEAF_SESSION: return isSetLeaf_session(); case PARENT_SESSION: return isSetParent_session(); case QUERY_RA: return isSetQuery_ra(); case START_TIME_STR: return isSetStart_time_str(); case JUST_EXPLAIN: return isSetJust_explain(); case OUTER_FRAGMENT_INDICES: return isSetOuter_fragment_indices(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof start_query_args) return this.equals((start_query_args)that); return false; } public boolean equals(start_query_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_leaf_session = true && this.isSetLeaf_session(); boolean that_present_leaf_session = true && that.isSetLeaf_session(); if (this_present_leaf_session || that_present_leaf_session) { if (!(this_present_leaf_session && that_present_leaf_session)) return false; if (!this.leaf_session.equals(that.leaf_session)) return false; } boolean this_present_parent_session = true && this.isSetParent_session(); boolean that_present_parent_session = true && that.isSetParent_session(); if (this_present_parent_session || that_present_parent_session) { if (!(this_present_parent_session && that_present_parent_session)) return false; if (!this.parent_session.equals(that.parent_session)) return false; } boolean this_present_query_ra = true && this.isSetQuery_ra(); boolean that_present_query_ra = true && that.isSetQuery_ra(); if (this_present_query_ra || that_present_query_ra) { if (!(this_present_query_ra && that_present_query_ra)) return false; if (!this.query_ra.equals(that.query_ra)) return false; } boolean this_present_start_time_str = true && this.isSetStart_time_str(); boolean that_present_start_time_str = true && that.isSetStart_time_str(); if (this_present_start_time_str || that_present_start_time_str) { if (!(this_present_start_time_str && that_present_start_time_str)) return false; if (!this.start_time_str.equals(that.start_time_str)) return false; } boolean this_present_just_explain = true; boolean that_present_just_explain = true; if (this_present_just_explain || that_present_just_explain) { if (!(this_present_just_explain && that_present_just_explain)) return false; if (this.just_explain != that.just_explain) return false; } boolean this_present_outer_fragment_indices = true && this.isSetOuter_fragment_indices(); boolean that_present_outer_fragment_indices = true && that.isSetOuter_fragment_indices(); if (this_present_outer_fragment_indices || that_present_outer_fragment_indices) { if (!(this_present_outer_fragment_indices && that_present_outer_fragment_indices)) return false; if (!this.outer_fragment_indices.equals(that.outer_fragment_indices)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetLeaf_session()) ? 131071 : 524287); if (isSetLeaf_session()) hashCode = hashCode * 8191 + leaf_session.hashCode(); hashCode = hashCode * 8191 + ((isSetParent_session()) ? 131071 : 524287); if (isSetParent_session()) hashCode = hashCode * 8191 + parent_session.hashCode(); hashCode = hashCode * 8191 + ((isSetQuery_ra()) ? 131071 : 524287); if (isSetQuery_ra()) hashCode = hashCode * 8191 + query_ra.hashCode(); hashCode = hashCode * 8191 + ((isSetStart_time_str()) ? 131071 : 524287); if (isSetStart_time_str()) hashCode = hashCode * 8191 + start_time_str.hashCode(); hashCode = hashCode * 8191 + ((just_explain) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetOuter_fragment_indices()) ? 131071 : 524287); if (isSetOuter_fragment_indices()) hashCode = hashCode * 8191 + outer_fragment_indices.hashCode(); return hashCode; } @Override public int compareTo(start_query_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetLeaf_session(), other.isSetLeaf_session()); if (lastComparison != 0) { return lastComparison; } if (isSetLeaf_session()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leaf_session, other.leaf_session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetParent_session(), other.isSetParent_session()); if (lastComparison != 0) { return lastComparison; } if (isSetParent_session()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_session, other.parent_session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetQuery_ra(), other.isSetQuery_ra()); if (lastComparison != 0) { return lastComparison; } if (isSetQuery_ra()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query_ra, other.query_ra); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetStart_time_str(), other.isSetStart_time_str()); if (lastComparison != 0) { return lastComparison; } if (isSetStart_time_str()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_time_str, other.start_time_str); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetJust_explain(), other.isSetJust_explain()); if (lastComparison != 0) { return lastComparison; } if (isSetJust_explain()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.just_explain, other.just_explain); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOuter_fragment_indices(), other.isSetOuter_fragment_indices()); if (lastComparison != 0) { return lastComparison; } if (isSetOuter_fragment_indices()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outer_fragment_indices, other.outer_fragment_indices); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("start_query_args("); boolean first = true; sb.append("leaf_session:"); if (this.leaf_session == null) { sb.append("null"); } else { sb.append(this.leaf_session); } first = false; if (!first) sb.append(", "); sb.append("parent_session:"); if (this.parent_session == null) { sb.append("null"); } else { sb.append(this.parent_session); } first = false; if (!first) sb.append(", "); sb.append("query_ra:"); if (this.query_ra == null) { sb.append("null"); } else { sb.append(this.query_ra); } first = false; if (!first) sb.append(", "); sb.append("start_time_str:"); if (this.start_time_str == null) { sb.append("null"); } else { sb.append(this.start_time_str); } first = false; if (!first) sb.append(", "); sb.append("just_explain:"); sb.append(this.just_explain); first = false; if (!first) sb.append(", "); sb.append("outer_fragment_indices:"); if (this.outer_fragment_indices == null) { sb.append("null"); } else { sb.append(this.outer_fragment_indices); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class start_query_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_query_argsStandardScheme getScheme() { return new start_query_argsStandardScheme(); } } private static class start_query_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<start_query_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, start_query_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // LEAF_SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.leaf_session = iprot.readString(); struct.setLeaf_sessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PARENT_SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.parent_session = iprot.readString(); struct.setParent_sessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // QUERY_RA if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.query_ra = iprot.readString(); struct.setQuery_raIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // START_TIME_STR if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.start_time_str = iprot.readString(); struct.setStart_time_strIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // JUST_EXPLAIN if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.just_explain = iprot.readBool(); struct.setJust_explainIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // OUTER_FRAGMENT_INDICES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list644 = iprot.readListBegin(); struct.outer_fragment_indices = new java.util.ArrayList<java.lang.Long>(_list644.size); long _elem645; for (int _i646 = 0; _i646 < _list644.size; ++_i646) { _elem645 = iprot.readI64(); struct.outer_fragment_indices.add(_elem645); } iprot.readListEnd(); } struct.setOuter_fragment_indicesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, start_query_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.leaf_session != null) { oprot.writeFieldBegin(LEAF_SESSION_FIELD_DESC); oprot.writeString(struct.leaf_session); oprot.writeFieldEnd(); } if (struct.parent_session != null) { oprot.writeFieldBegin(PARENT_SESSION_FIELD_DESC); oprot.writeString(struct.parent_session); oprot.writeFieldEnd(); } if (struct.query_ra != null) { oprot.writeFieldBegin(QUERY_RA_FIELD_DESC); oprot.writeString(struct.query_ra); oprot.writeFieldEnd(); } if (struct.start_time_str != null) { oprot.writeFieldBegin(START_TIME_STR_FIELD_DESC); oprot.writeString(struct.start_time_str); oprot.writeFieldEnd(); } oprot.writeFieldBegin(JUST_EXPLAIN_FIELD_DESC); oprot.writeBool(struct.just_explain); oprot.writeFieldEnd(); if (struct.outer_fragment_indices != null) { oprot.writeFieldBegin(OUTER_FRAGMENT_INDICES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.outer_fragment_indices.size())); for (long _iter647 : struct.outer_fragment_indices) { oprot.writeI64(_iter647); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class start_query_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_query_argsTupleScheme getScheme() { return new start_query_argsTupleScheme(); } } private static class start_query_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<start_query_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, start_query_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetLeaf_session()) { optionals.set(0); } if (struct.isSetParent_session()) { optionals.set(1); } if (struct.isSetQuery_ra()) { optionals.set(2); } if (struct.isSetStart_time_str()) { optionals.set(3); } if (struct.isSetJust_explain()) { optionals.set(4); } if (struct.isSetOuter_fragment_indices()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetLeaf_session()) { oprot.writeString(struct.leaf_session); } if (struct.isSetParent_session()) { oprot.writeString(struct.parent_session); } if (struct.isSetQuery_ra()) { oprot.writeString(struct.query_ra); } if (struct.isSetStart_time_str()) { oprot.writeString(struct.start_time_str); } if (struct.isSetJust_explain()) { oprot.writeBool(struct.just_explain); } if (struct.isSetOuter_fragment_indices()) { { oprot.writeI32(struct.outer_fragment_indices.size()); for (long _iter648 : struct.outer_fragment_indices) { oprot.writeI64(_iter648); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, start_query_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.leaf_session = iprot.readString(); struct.setLeaf_sessionIsSet(true); } if (incoming.get(1)) { struct.parent_session = iprot.readString(); struct.setParent_sessionIsSet(true); } if (incoming.get(2)) { struct.query_ra = iprot.readString(); struct.setQuery_raIsSet(true); } if (incoming.get(3)) { struct.start_time_str = iprot.readString(); struct.setStart_time_strIsSet(true); } if (incoming.get(4)) { struct.just_explain = iprot.readBool(); struct.setJust_explainIsSet(true); } if (incoming.get(5)) { { org.apache.thrift.protocol.TList _list649 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); struct.outer_fragment_indices = new java.util.ArrayList<java.lang.Long>(_list649.size); long _elem650; for (int _i651 = 0; _i651 < _list649.size; ++_i651) { _elem650 = iprot.readI64(); struct.outer_fragment_indices.add(_elem650); } } struct.setOuter_fragment_indicesIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class start_query_result implements org.apache.thrift.TBase<start_query_result, start_query_result._Fields>, java.io.Serializable, Cloneable, Comparable<start_query_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("start_query_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new start_query_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new start_query_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TPendingQuery success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPendingQuery.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(start_query_result.class, metaDataMap); } public start_query_result() { } public start_query_result( TPendingQuery success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public start_query_result(start_query_result other) { if (other.isSetSuccess()) { this.success = new TPendingQuery(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public start_query_result deepCopy() { return new start_query_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TPendingQuery getSuccess() { return this.success; } public start_query_result setSuccess(@org.apache.thrift.annotation.Nullable TPendingQuery success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public start_query_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TPendingQuery)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof start_query_result) return this.equals((start_query_result)that); return false; } public boolean equals(start_query_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(start_query_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("start_query_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class start_query_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_query_resultStandardScheme getScheme() { return new start_query_resultStandardScheme(); } } private static class start_query_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<start_query_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, start_query_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TPendingQuery(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, start_query_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class start_query_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_query_resultTupleScheme getScheme() { return new start_query_resultTupleScheme(); } } private static class start_query_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<start_query_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, start_query_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, start_query_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TPendingQuery(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class execute_query_step_args implements org.apache.thrift.TBase<execute_query_step_args, execute_query_step_args._Fields>, java.io.Serializable, Cloneable, Comparable<execute_query_step_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("execute_query_step_args"); private static final org.apache.thrift.protocol.TField PENDING_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("pending_query", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField SUBQUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("subquery_id", org.apache.thrift.protocol.TType.I64, (short)2); private static final org.apache.thrift.protocol.TField START_TIME_STR_FIELD_DESC = new org.apache.thrift.protocol.TField("start_time_str", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new execute_query_step_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new execute_query_step_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TPendingQuery pending_query; // required public long subquery_id; // required public @org.apache.thrift.annotation.Nullable java.lang.String start_time_str; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PENDING_QUERY((short)1, "pending_query"), SUBQUERY_ID((short)2, "subquery_id"), START_TIME_STR((short)3, "start_time_str"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PENDING_QUERY return PENDING_QUERY; case 2: // SUBQUERY_ID return SUBQUERY_ID; case 3: // START_TIME_STR return START_TIME_STR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUBQUERY_ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PENDING_QUERY, new org.apache.thrift.meta_data.FieldMetaData("pending_query", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPendingQuery.class))); tmpMap.put(_Fields.SUBQUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("subquery_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "TSubqueryId"))); tmpMap.put(_Fields.START_TIME_STR, new org.apache.thrift.meta_data.FieldMetaData("start_time_str", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(execute_query_step_args.class, metaDataMap); } public execute_query_step_args() { } public execute_query_step_args( TPendingQuery pending_query, long subquery_id, java.lang.String start_time_str) { this(); this.pending_query = pending_query; this.subquery_id = subquery_id; setSubquery_idIsSet(true); this.start_time_str = start_time_str; } /** * Performs a deep copy on <i>other</i>. */ public execute_query_step_args(execute_query_step_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetPending_query()) { this.pending_query = new TPendingQuery(other.pending_query); } this.subquery_id = other.subquery_id; if (other.isSetStart_time_str()) { this.start_time_str = other.start_time_str; } } public execute_query_step_args deepCopy() { return new execute_query_step_args(this); } @Override public void clear() { this.pending_query = null; setSubquery_idIsSet(false); this.subquery_id = 0; this.start_time_str = null; } @org.apache.thrift.annotation.Nullable public TPendingQuery getPending_query() { return this.pending_query; } public execute_query_step_args setPending_query(@org.apache.thrift.annotation.Nullable TPendingQuery pending_query) { this.pending_query = pending_query; return this; } public void unsetPending_query() { this.pending_query = null; } /** Returns true if field pending_query is set (has been assigned a value) and false otherwise */ public boolean isSetPending_query() { return this.pending_query != null; } public void setPending_queryIsSet(boolean value) { if (!value) { this.pending_query = null; } } public long getSubquery_id() { return this.subquery_id; } public execute_query_step_args setSubquery_id(long subquery_id) { this.subquery_id = subquery_id; setSubquery_idIsSet(true); return this; } public void unsetSubquery_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUBQUERY_ID_ISSET_ID); } /** Returns true if field subquery_id is set (has been assigned a value) and false otherwise */ public boolean isSetSubquery_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUBQUERY_ID_ISSET_ID); } public void setSubquery_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUBQUERY_ID_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getStart_time_str() { return this.start_time_str; } public execute_query_step_args setStart_time_str(@org.apache.thrift.annotation.Nullable java.lang.String start_time_str) { this.start_time_str = start_time_str; return this; } public void unsetStart_time_str() { this.start_time_str = null; } /** Returns true if field start_time_str is set (has been assigned a value) and false otherwise */ public boolean isSetStart_time_str() { return this.start_time_str != null; } public void setStart_time_strIsSet(boolean value) { if (!value) { this.start_time_str = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PENDING_QUERY: if (value == null) { unsetPending_query(); } else { setPending_query((TPendingQuery)value); } break; case SUBQUERY_ID: if (value == null) { unsetSubquery_id(); } else { setSubquery_id((java.lang.Long)value); } break; case START_TIME_STR: if (value == null) { unsetStart_time_str(); } else { setStart_time_str((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PENDING_QUERY: return getPending_query(); case SUBQUERY_ID: return getSubquery_id(); case START_TIME_STR: return getStart_time_str(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case PENDING_QUERY: return isSetPending_query(); case SUBQUERY_ID: return isSetSubquery_id(); case START_TIME_STR: return isSetStart_time_str(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof execute_query_step_args) return this.equals((execute_query_step_args)that); return false; } public boolean equals(execute_query_step_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_pending_query = true && this.isSetPending_query(); boolean that_present_pending_query = true && that.isSetPending_query(); if (this_present_pending_query || that_present_pending_query) { if (!(this_present_pending_query && that_present_pending_query)) return false; if (!this.pending_query.equals(that.pending_query)) return false; } boolean this_present_subquery_id = true; boolean that_present_subquery_id = true; if (this_present_subquery_id || that_present_subquery_id) { if (!(this_present_subquery_id && that_present_subquery_id)) return false; if (this.subquery_id != that.subquery_id) return false; } boolean this_present_start_time_str = true && this.isSetStart_time_str(); boolean that_present_start_time_str = true && that.isSetStart_time_str(); if (this_present_start_time_str || that_present_start_time_str) { if (!(this_present_start_time_str && that_present_start_time_str)) return false; if (!this.start_time_str.equals(that.start_time_str)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetPending_query()) ? 131071 : 524287); if (isSetPending_query()) hashCode = hashCode * 8191 + pending_query.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(subquery_id); hashCode = hashCode * 8191 + ((isSetStart_time_str()) ? 131071 : 524287); if (isSetStart_time_str()) hashCode = hashCode * 8191 + start_time_str.hashCode(); return hashCode; } @Override public int compareTo(execute_query_step_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetPending_query(), other.isSetPending_query()); if (lastComparison != 0) { return lastComparison; } if (isSetPending_query()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pending_query, other.pending_query); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSubquery_id(), other.isSetSubquery_id()); if (lastComparison != 0) { return lastComparison; } if (isSetSubquery_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subquery_id, other.subquery_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetStart_time_str(), other.isSetStart_time_str()); if (lastComparison != 0) { return lastComparison; } if (isSetStart_time_str()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_time_str, other.start_time_str); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("execute_query_step_args("); boolean first = true; sb.append("pending_query:"); if (this.pending_query == null) { sb.append("null"); } else { sb.append(this.pending_query); } first = false; if (!first) sb.append(", "); sb.append("subquery_id:"); sb.append(this.subquery_id); first = false; if (!first) sb.append(", "); sb.append("start_time_str:"); if (this.start_time_str == null) { sb.append("null"); } else { sb.append(this.start_time_str); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (pending_query != null) { pending_query.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class execute_query_step_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public execute_query_step_argsStandardScheme getScheme() { return new execute_query_step_argsStandardScheme(); } } private static class execute_query_step_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<execute_query_step_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, execute_query_step_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PENDING_QUERY if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.pending_query = new TPendingQuery(); struct.pending_query.read(iprot); struct.setPending_queryIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SUBQUERY_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.subquery_id = iprot.readI64(); struct.setSubquery_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // START_TIME_STR if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.start_time_str = iprot.readString(); struct.setStart_time_strIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, execute_query_step_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.pending_query != null) { oprot.writeFieldBegin(PENDING_QUERY_FIELD_DESC); struct.pending_query.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(SUBQUERY_ID_FIELD_DESC); oprot.writeI64(struct.subquery_id); oprot.writeFieldEnd(); if (struct.start_time_str != null) { oprot.writeFieldBegin(START_TIME_STR_FIELD_DESC); oprot.writeString(struct.start_time_str); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class execute_query_step_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public execute_query_step_argsTupleScheme getScheme() { return new execute_query_step_argsTupleScheme(); } } private static class execute_query_step_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<execute_query_step_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, execute_query_step_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetPending_query()) { optionals.set(0); } if (struct.isSetSubquery_id()) { optionals.set(1); } if (struct.isSetStart_time_str()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetPending_query()) { struct.pending_query.write(oprot); } if (struct.isSetSubquery_id()) { oprot.writeI64(struct.subquery_id); } if (struct.isSetStart_time_str()) { oprot.writeString(struct.start_time_str); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, execute_query_step_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.pending_query = new TPendingQuery(); struct.pending_query.read(iprot); struct.setPending_queryIsSet(true); } if (incoming.get(1)) { struct.subquery_id = iprot.readI64(); struct.setSubquery_idIsSet(true); } if (incoming.get(2)) { struct.start_time_str = iprot.readString(); struct.setStart_time_strIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class execute_query_step_result implements org.apache.thrift.TBase<execute_query_step_result, execute_query_step_result._Fields>, java.io.Serializable, Cloneable, Comparable<execute_query_step_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("execute_query_step_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new execute_query_step_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new execute_query_step_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TStepResult success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStepResult.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(execute_query_step_result.class, metaDataMap); } public execute_query_step_result() { } public execute_query_step_result( TStepResult success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public execute_query_step_result(execute_query_step_result other) { if (other.isSetSuccess()) { this.success = new TStepResult(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public execute_query_step_result deepCopy() { return new execute_query_step_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TStepResult getSuccess() { return this.success; } public execute_query_step_result setSuccess(@org.apache.thrift.annotation.Nullable TStepResult success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public execute_query_step_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TStepResult)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof execute_query_step_result) return this.equals((execute_query_step_result)that); return false; } public boolean equals(execute_query_step_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(execute_query_step_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("execute_query_step_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class execute_query_step_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public execute_query_step_resultStandardScheme getScheme() { return new execute_query_step_resultStandardScheme(); } } private static class execute_query_step_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<execute_query_step_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, execute_query_step_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TStepResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, execute_query_step_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class execute_query_step_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public execute_query_step_resultTupleScheme getScheme() { return new execute_query_step_resultTupleScheme(); } } private static class execute_query_step_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<execute_query_step_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, execute_query_step_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, execute_query_step_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TStepResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class broadcast_serialized_rows_args implements org.apache.thrift.TBase<broadcast_serialized_rows_args, broadcast_serialized_rows_args._Fields>, java.io.Serializable, Cloneable, Comparable<broadcast_serialized_rows_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("broadcast_serialized_rows_args"); private static final org.apache.thrift.protocol.TField SERIALIZED_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("serialized_rows", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ROW_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("row_desc", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("query_id", org.apache.thrift.protocol.TType.I64, (short)3); private static final org.apache.thrift.protocol.TField SUBQUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("subquery_id", org.apache.thrift.protocol.TType.I64, (short)4); private static final org.apache.thrift.protocol.TField IS_FINAL_SUBQUERY_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("is_final_subquery_result", org.apache.thrift.protocol.TType.BOOL, (short)5); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new broadcast_serialized_rows_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new broadcast_serialized_rows_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TSerializedRows serialized_rows; // required public @org.apache.thrift.annotation.Nullable java.util.List<TColumnType> row_desc; // required public long query_id; // required public long subquery_id; // required public boolean is_final_subquery_result; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SERIALIZED_ROWS((short)1, "serialized_rows"), ROW_DESC((short)2, "row_desc"), QUERY_ID((short)3, "query_id"), SUBQUERY_ID((short)4, "subquery_id"), IS_FINAL_SUBQUERY_RESULT((short)5, "is_final_subquery_result"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SERIALIZED_ROWS return SERIALIZED_ROWS; case 2: // ROW_DESC return ROW_DESC; case 3: // QUERY_ID return QUERY_ID; case 4: // SUBQUERY_ID return SUBQUERY_ID; case 5: // IS_FINAL_SUBQUERY_RESULT return IS_FINAL_SUBQUERY_RESULT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __QUERY_ID_ISSET_ID = 0; private static final int __SUBQUERY_ID_ISSET_ID = 1; private static final int __IS_FINAL_SUBQUERY_RESULT_ISSET_ID = 2; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SERIALIZED_ROWS, new org.apache.thrift.meta_data.FieldMetaData("serialized_rows", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ai.heavy.thrift.server.TSerializedRows.class))); tmpMap.put(_Fields.ROW_DESC, new org.apache.thrift.meta_data.FieldMetaData("row_desc", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "TRowDescriptor"))); tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("query_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "TQueryId"))); tmpMap.put(_Fields.SUBQUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("subquery_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "TSubqueryId"))); tmpMap.put(_Fields.IS_FINAL_SUBQUERY_RESULT, new org.apache.thrift.meta_data.FieldMetaData("is_final_subquery_result", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(broadcast_serialized_rows_args.class, metaDataMap); } public broadcast_serialized_rows_args() { } public broadcast_serialized_rows_args( ai.heavy.thrift.server.TSerializedRows serialized_rows, java.util.List<TColumnType> row_desc, long query_id, long subquery_id, boolean is_final_subquery_result) { this(); this.serialized_rows = serialized_rows; this.row_desc = row_desc; this.query_id = query_id; setQuery_idIsSet(true); this.subquery_id = subquery_id; setSubquery_idIsSet(true); this.is_final_subquery_result = is_final_subquery_result; setIs_final_subquery_resultIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public broadcast_serialized_rows_args(broadcast_serialized_rows_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSerialized_rows()) { this.serialized_rows = new ai.heavy.thrift.server.TSerializedRows(other.serialized_rows); } if (other.isSetRow_desc()) { java.util.List<TColumnType> __this__row_desc = new java.util.ArrayList<TColumnType>(other.row_desc.size()); for (TColumnType other_element : other.row_desc) { __this__row_desc.add(new TColumnType(other_element)); } this.row_desc = __this__row_desc; } this.query_id = other.query_id; this.subquery_id = other.subquery_id; this.is_final_subquery_result = other.is_final_subquery_result; } public broadcast_serialized_rows_args deepCopy() { return new broadcast_serialized_rows_args(this); } @Override public void clear() { this.serialized_rows = null; this.row_desc = null; setQuery_idIsSet(false); this.query_id = 0; setSubquery_idIsSet(false); this.subquery_id = 0; setIs_final_subquery_resultIsSet(false); this.is_final_subquery_result = false; } @org.apache.thrift.annotation.Nullable public ai.heavy.thrift.server.TSerializedRows getSerialized_rows() { return this.serialized_rows; } public broadcast_serialized_rows_args setSerialized_rows(@org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TSerializedRows serialized_rows) { this.serialized_rows = serialized_rows; return this; } public void unsetSerialized_rows() { this.serialized_rows = null; } /** Returns true if field serialized_rows is set (has been assigned a value) and false otherwise */ public boolean isSetSerialized_rows() { return this.serialized_rows != null; } public void setSerialized_rowsIsSet(boolean value) { if (!value) { this.serialized_rows = null; } } public int getRow_descSize() { return (this.row_desc == null) ? 0 : this.row_desc.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TColumnType> getRow_descIterator() { return (this.row_desc == null) ? null : this.row_desc.iterator(); } public void addToRow_desc(TColumnType elem) { if (this.row_desc == null) { this.row_desc = new java.util.ArrayList<TColumnType>(); } this.row_desc.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TColumnType> getRow_desc() { return this.row_desc; } public broadcast_serialized_rows_args setRow_desc(@org.apache.thrift.annotation.Nullable java.util.List<TColumnType> row_desc) { this.row_desc = row_desc; return this; } public void unsetRow_desc() { this.row_desc = null; } /** Returns true if field row_desc is set (has been assigned a value) and false otherwise */ public boolean isSetRow_desc() { return this.row_desc != null; } public void setRow_descIsSet(boolean value) { if (!value) { this.row_desc = null; } } public long getQuery_id() { return this.query_id; } public broadcast_serialized_rows_args setQuery_id(long query_id) { this.query_id = query_id; setQuery_idIsSet(true); return this; } public void unsetQuery_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERY_ID_ISSET_ID); } /** Returns true if field query_id is set (has been assigned a value) and false otherwise */ public boolean isSetQuery_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERY_ID_ISSET_ID); } public void setQuery_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERY_ID_ISSET_ID, value); } public long getSubquery_id() { return this.subquery_id; } public broadcast_serialized_rows_args setSubquery_id(long subquery_id) { this.subquery_id = subquery_id; setSubquery_idIsSet(true); return this; } public void unsetSubquery_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUBQUERY_ID_ISSET_ID); } /** Returns true if field subquery_id is set (has been assigned a value) and false otherwise */ public boolean isSetSubquery_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUBQUERY_ID_ISSET_ID); } public void setSubquery_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUBQUERY_ID_ISSET_ID, value); } public boolean isIs_final_subquery_result() { return this.is_final_subquery_result; } public broadcast_serialized_rows_args setIs_final_subquery_result(boolean is_final_subquery_result) { this.is_final_subquery_result = is_final_subquery_result; setIs_final_subquery_resultIsSet(true); return this; } public void unsetIs_final_subquery_result() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_FINAL_SUBQUERY_RESULT_ISSET_ID); } /** Returns true if field is_final_subquery_result is set (has been assigned a value) and false otherwise */ public boolean isSetIs_final_subquery_result() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_FINAL_SUBQUERY_RESULT_ISSET_ID); } public void setIs_final_subquery_resultIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_FINAL_SUBQUERY_RESULT_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SERIALIZED_ROWS: if (value == null) { unsetSerialized_rows(); } else { setSerialized_rows((ai.heavy.thrift.server.TSerializedRows)value); } break; case ROW_DESC: if (value == null) { unsetRow_desc(); } else { setRow_desc((java.util.List<TColumnType>)value); } break; case QUERY_ID: if (value == null) { unsetQuery_id(); } else { setQuery_id((java.lang.Long)value); } break; case SUBQUERY_ID: if (value == null) { unsetSubquery_id(); } else { setSubquery_id((java.lang.Long)value); } break; case IS_FINAL_SUBQUERY_RESULT: if (value == null) { unsetIs_final_subquery_result(); } else { setIs_final_subquery_result((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SERIALIZED_ROWS: return getSerialized_rows(); case ROW_DESC: return getRow_desc(); case QUERY_ID: return getQuery_id(); case SUBQUERY_ID: return getSubquery_id(); case IS_FINAL_SUBQUERY_RESULT: return isIs_final_subquery_result(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SERIALIZED_ROWS: return isSetSerialized_rows(); case ROW_DESC: return isSetRow_desc(); case QUERY_ID: return isSetQuery_id(); case SUBQUERY_ID: return isSetSubquery_id(); case IS_FINAL_SUBQUERY_RESULT: return isSetIs_final_subquery_result(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof broadcast_serialized_rows_args) return this.equals((broadcast_serialized_rows_args)that); return false; } public boolean equals(broadcast_serialized_rows_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_serialized_rows = true && this.isSetSerialized_rows(); boolean that_present_serialized_rows = true && that.isSetSerialized_rows(); if (this_present_serialized_rows || that_present_serialized_rows) { if (!(this_present_serialized_rows && that_present_serialized_rows)) return false; if (!this.serialized_rows.equals(that.serialized_rows)) return false; } boolean this_present_row_desc = true && this.isSetRow_desc(); boolean that_present_row_desc = true && that.isSetRow_desc(); if (this_present_row_desc || that_present_row_desc) { if (!(this_present_row_desc && that_present_row_desc)) return false; if (!this.row_desc.equals(that.row_desc)) return false; } boolean this_present_query_id = true; boolean that_present_query_id = true; if (this_present_query_id || that_present_query_id) { if (!(this_present_query_id && that_present_query_id)) return false; if (this.query_id != that.query_id) return false; } boolean this_present_subquery_id = true; boolean that_present_subquery_id = true; if (this_present_subquery_id || that_present_subquery_id) { if (!(this_present_subquery_id && that_present_subquery_id)) return false; if (this.subquery_id != that.subquery_id) return false; } boolean this_present_is_final_subquery_result = true; boolean that_present_is_final_subquery_result = true; if (this_present_is_final_subquery_result || that_present_is_final_subquery_result) { if (!(this_present_is_final_subquery_result && that_present_is_final_subquery_result)) return false; if (this.is_final_subquery_result != that.is_final_subquery_result) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSerialized_rows()) ? 131071 : 524287); if (isSetSerialized_rows()) hashCode = hashCode * 8191 + serialized_rows.hashCode(); hashCode = hashCode * 8191 + ((isSetRow_desc()) ? 131071 : 524287); if (isSetRow_desc()) hashCode = hashCode * 8191 + row_desc.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(query_id); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(subquery_id); hashCode = hashCode * 8191 + ((is_final_subquery_result) ? 131071 : 524287); return hashCode; } @Override public int compareTo(broadcast_serialized_rows_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSerialized_rows(), other.isSetSerialized_rows()); if (lastComparison != 0) { return lastComparison; } if (isSetSerialized_rows()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialized_rows, other.serialized_rows); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRow_desc(), other.isSetRow_desc()); if (lastComparison != 0) { return lastComparison; } if (isSetRow_desc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row_desc, other.row_desc); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetQuery_id(), other.isSetQuery_id()); if (lastComparison != 0) { return lastComparison; } if (isSetQuery_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query_id, other.query_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSubquery_id(), other.isSetSubquery_id()); if (lastComparison != 0) { return lastComparison; } if (isSetSubquery_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subquery_id, other.subquery_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetIs_final_subquery_result(), other.isSetIs_final_subquery_result()); if (lastComparison != 0) { return lastComparison; } if (isSetIs_final_subquery_result()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_final_subquery_result, other.is_final_subquery_result); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("broadcast_serialized_rows_args("); boolean first = true; sb.append("serialized_rows:"); if (this.serialized_rows == null) { sb.append("null"); } else { sb.append(this.serialized_rows); } first = false; if (!first) sb.append(", "); sb.append("row_desc:"); if (this.row_desc == null) { sb.append("null"); } else { sb.append(this.row_desc); } first = false; if (!first) sb.append(", "); sb.append("query_id:"); sb.append(this.query_id); first = false; if (!first) sb.append(", "); sb.append("subquery_id:"); sb.append(this.subquery_id); first = false; if (!first) sb.append(", "); sb.append("is_final_subquery_result:"); sb.append(this.is_final_subquery_result); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (serialized_rows != null) { serialized_rows.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class broadcast_serialized_rows_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public broadcast_serialized_rows_argsStandardScheme getScheme() { return new broadcast_serialized_rows_argsStandardScheme(); } } private static class broadcast_serialized_rows_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<broadcast_serialized_rows_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, broadcast_serialized_rows_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SERIALIZED_ROWS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serialized_rows = new ai.heavy.thrift.server.TSerializedRows(); struct.serialized_rows.read(iprot); struct.setSerialized_rowsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ROW_DESC if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list652 = iprot.readListBegin(); struct.row_desc = new java.util.ArrayList<TColumnType>(_list652.size); @org.apache.thrift.annotation.Nullable TColumnType _elem653; for (int _i654 = 0; _i654 < _list652.size; ++_i654) { _elem653 = new TColumnType(); _elem653.read(iprot); struct.row_desc.add(_elem653); } iprot.readListEnd(); } struct.setRow_descIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // QUERY_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.query_id = iprot.readI64(); struct.setQuery_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // SUBQUERY_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.subquery_id = iprot.readI64(); struct.setSubquery_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // IS_FINAL_SUBQUERY_RESULT if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.is_final_subquery_result = iprot.readBool(); struct.setIs_final_subquery_resultIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, broadcast_serialized_rows_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.serialized_rows != null) { oprot.writeFieldBegin(SERIALIZED_ROWS_FIELD_DESC); struct.serialized_rows.write(oprot); oprot.writeFieldEnd(); } if (struct.row_desc != null) { oprot.writeFieldBegin(ROW_DESC_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.row_desc.size())); for (TColumnType _iter655 : struct.row_desc) { _iter655.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); oprot.writeI64(struct.query_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(SUBQUERY_ID_FIELD_DESC); oprot.writeI64(struct.subquery_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(IS_FINAL_SUBQUERY_RESULT_FIELD_DESC); oprot.writeBool(struct.is_final_subquery_result); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class broadcast_serialized_rows_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public broadcast_serialized_rows_argsTupleScheme getScheme() { return new broadcast_serialized_rows_argsTupleScheme(); } } private static class broadcast_serialized_rows_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<broadcast_serialized_rows_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, broadcast_serialized_rows_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSerialized_rows()) { optionals.set(0); } if (struct.isSetRow_desc()) { optionals.set(1); } if (struct.isSetQuery_id()) { optionals.set(2); } if (struct.isSetSubquery_id()) { optionals.set(3); } if (struct.isSetIs_final_subquery_result()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSerialized_rows()) { struct.serialized_rows.write(oprot); } if (struct.isSetRow_desc()) { { oprot.writeI32(struct.row_desc.size()); for (TColumnType _iter656 : struct.row_desc) { _iter656.write(oprot); } } } if (struct.isSetQuery_id()) { oprot.writeI64(struct.query_id); } if (struct.isSetSubquery_id()) { oprot.writeI64(struct.subquery_id); } if (struct.isSetIs_final_subquery_result()) { oprot.writeBool(struct.is_final_subquery_result); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, broadcast_serialized_rows_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.serialized_rows = new ai.heavy.thrift.server.TSerializedRows(); struct.serialized_rows.read(iprot); struct.setSerialized_rowsIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list657 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.row_desc = new java.util.ArrayList<TColumnType>(_list657.size); @org.apache.thrift.annotation.Nullable TColumnType _elem658; for (int _i659 = 0; _i659 < _list657.size; ++_i659) { _elem658 = new TColumnType(); _elem658.read(iprot); struct.row_desc.add(_elem658); } } struct.setRow_descIsSet(true); } if (incoming.get(2)) { struct.query_id = iprot.readI64(); struct.setQuery_idIsSet(true); } if (incoming.get(3)) { struct.subquery_id = iprot.readI64(); struct.setSubquery_idIsSet(true); } if (incoming.get(4)) { struct.is_final_subquery_result = iprot.readBool(); struct.setIs_final_subquery_resultIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class broadcast_serialized_rows_result implements org.apache.thrift.TBase<broadcast_serialized_rows_result, broadcast_serialized_rows_result._Fields>, java.io.Serializable, Cloneable, Comparable<broadcast_serialized_rows_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("broadcast_serialized_rows_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new broadcast_serialized_rows_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new broadcast_serialized_rows_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(broadcast_serialized_rows_result.class, metaDataMap); } public broadcast_serialized_rows_result() { } public broadcast_serialized_rows_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public broadcast_serialized_rows_result(broadcast_serialized_rows_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public broadcast_serialized_rows_result deepCopy() { return new broadcast_serialized_rows_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public broadcast_serialized_rows_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof broadcast_serialized_rows_result) return this.equals((broadcast_serialized_rows_result)that); return false; } public boolean equals(broadcast_serialized_rows_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(broadcast_serialized_rows_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("broadcast_serialized_rows_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class broadcast_serialized_rows_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public broadcast_serialized_rows_resultStandardScheme getScheme() { return new broadcast_serialized_rows_resultStandardScheme(); } } private static class broadcast_serialized_rows_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<broadcast_serialized_rows_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, broadcast_serialized_rows_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, broadcast_serialized_rows_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class broadcast_serialized_rows_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public broadcast_serialized_rows_resultTupleScheme getScheme() { return new broadcast_serialized_rows_resultTupleScheme(); } } private static class broadcast_serialized_rows_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<broadcast_serialized_rows_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, broadcast_serialized_rows_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, broadcast_serialized_rows_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class start_render_query_args implements org.apache.thrift.TBase<start_render_query_args, start_render_query_args._Fields>, java.io.Serializable, Cloneable, Comparable<start_render_query_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("start_render_query_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField WIDGET_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("widget_id", org.apache.thrift.protocol.TType.I64, (short)2); private static final org.apache.thrift.protocol.TField NODE_IDX_FIELD_DESC = new org.apache.thrift.protocol.TField("node_idx", org.apache.thrift.protocol.TType.I16, (short)3); private static final org.apache.thrift.protocol.TField VEGA_JSON_FIELD_DESC = new org.apache.thrift.protocol.TField("vega_json", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new start_render_query_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new start_render_query_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public long widget_id; // required public short node_idx; // required public @org.apache.thrift.annotation.Nullable java.lang.String vega_json; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), WIDGET_ID((short)2, "widget_id"), NODE_IDX((short)3, "node_idx"), VEGA_JSON((short)4, "vega_json"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // WIDGET_ID return WIDGET_ID; case 3: // NODE_IDX return NODE_IDX; case 4: // VEGA_JSON return VEGA_JSON; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __WIDGET_ID_ISSET_ID = 0; private static final int __NODE_IDX_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.WIDGET_ID, new org.apache.thrift.meta_data.FieldMetaData("widget_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.NODE_IDX, new org.apache.thrift.meta_data.FieldMetaData("node_idx", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); tmpMap.put(_Fields.VEGA_JSON, new org.apache.thrift.meta_data.FieldMetaData("vega_json", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(start_render_query_args.class, metaDataMap); } public start_render_query_args() { } public start_render_query_args( java.lang.String session, long widget_id, short node_idx, java.lang.String vega_json) { this(); this.session = session; this.widget_id = widget_id; setWidget_idIsSet(true); this.node_idx = node_idx; setNode_idxIsSet(true); this.vega_json = vega_json; } /** * Performs a deep copy on <i>other</i>. */ public start_render_query_args(start_render_query_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.widget_id = other.widget_id; this.node_idx = other.node_idx; if (other.isSetVega_json()) { this.vega_json = other.vega_json; } } public start_render_query_args deepCopy() { return new start_render_query_args(this); } @Override public void clear() { this.session = null; setWidget_idIsSet(false); this.widget_id = 0; setNode_idxIsSet(false); this.node_idx = 0; this.vega_json = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public start_render_query_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public long getWidget_id() { return this.widget_id; } public start_render_query_args setWidget_id(long widget_id) { this.widget_id = widget_id; setWidget_idIsSet(true); return this; } public void unsetWidget_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WIDGET_ID_ISSET_ID); } /** Returns true if field widget_id is set (has been assigned a value) and false otherwise */ public boolean isSetWidget_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WIDGET_ID_ISSET_ID); } public void setWidget_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WIDGET_ID_ISSET_ID, value); } public short getNode_idx() { return this.node_idx; } public start_render_query_args setNode_idx(short node_idx) { this.node_idx = node_idx; setNode_idxIsSet(true); return this; } public void unsetNode_idx() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NODE_IDX_ISSET_ID); } /** Returns true if field node_idx is set (has been assigned a value) and false otherwise */ public boolean isSetNode_idx() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NODE_IDX_ISSET_ID); } public void setNode_idxIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NODE_IDX_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getVega_json() { return this.vega_json; } public start_render_query_args setVega_json(@org.apache.thrift.annotation.Nullable java.lang.String vega_json) { this.vega_json = vega_json; return this; } public void unsetVega_json() { this.vega_json = null; } /** Returns true if field vega_json is set (has been assigned a value) and false otherwise */ public boolean isSetVega_json() { return this.vega_json != null; } public void setVega_jsonIsSet(boolean value) { if (!value) { this.vega_json = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case WIDGET_ID: if (value == null) { unsetWidget_id(); } else { setWidget_id((java.lang.Long)value); } break; case NODE_IDX: if (value == null) { unsetNode_idx(); } else { setNode_idx((java.lang.Short)value); } break; case VEGA_JSON: if (value == null) { unsetVega_json(); } else { setVega_json((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case WIDGET_ID: return getWidget_id(); case NODE_IDX: return getNode_idx(); case VEGA_JSON: return getVega_json(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case WIDGET_ID: return isSetWidget_id(); case NODE_IDX: return isSetNode_idx(); case VEGA_JSON: return isSetVega_json(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof start_render_query_args) return this.equals((start_render_query_args)that); return false; } public boolean equals(start_render_query_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_widget_id = true; boolean that_present_widget_id = true; if (this_present_widget_id || that_present_widget_id) { if (!(this_present_widget_id && that_present_widget_id)) return false; if (this.widget_id != that.widget_id) return false; } boolean this_present_node_idx = true; boolean that_present_node_idx = true; if (this_present_node_idx || that_present_node_idx) { if (!(this_present_node_idx && that_present_node_idx)) return false; if (this.node_idx != that.node_idx) return false; } boolean this_present_vega_json = true && this.isSetVega_json(); boolean that_present_vega_json = true && that.isSetVega_json(); if (this_present_vega_json || that_present_vega_json) { if (!(this_present_vega_json && that_present_vega_json)) return false; if (!this.vega_json.equals(that.vega_json)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(widget_id); hashCode = hashCode * 8191 + node_idx; hashCode = hashCode * 8191 + ((isSetVega_json()) ? 131071 : 524287); if (isSetVega_json()) hashCode = hashCode * 8191 + vega_json.hashCode(); return hashCode; } @Override public int compareTo(start_render_query_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetWidget_id(), other.isSetWidget_id()); if (lastComparison != 0) { return lastComparison; } if (isSetWidget_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.widget_id, other.widget_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNode_idx(), other.isSetNode_idx()); if (lastComparison != 0) { return lastComparison; } if (isSetNode_idx()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.node_idx, other.node_idx); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetVega_json(), other.isSetVega_json()); if (lastComparison != 0) { return lastComparison; } if (isSetVega_json()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vega_json, other.vega_json); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("start_render_query_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("widget_id:"); sb.append(this.widget_id); first = false; if (!first) sb.append(", "); sb.append("node_idx:"); sb.append(this.node_idx); first = false; if (!first) sb.append(", "); sb.append("vega_json:"); if (this.vega_json == null) { sb.append("null"); } else { sb.append(this.vega_json); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class start_render_query_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_render_query_argsStandardScheme getScheme() { return new start_render_query_argsStandardScheme(); } } private static class start_render_query_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<start_render_query_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, start_render_query_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // WIDGET_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.widget_id = iprot.readI64(); struct.setWidget_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NODE_IDX if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.node_idx = iprot.readI16(); struct.setNode_idxIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // VEGA_JSON if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.vega_json = iprot.readString(); struct.setVega_jsonIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, start_render_query_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC); oprot.writeI64(struct.widget_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(NODE_IDX_FIELD_DESC); oprot.writeI16(struct.node_idx); oprot.writeFieldEnd(); if (struct.vega_json != null) { oprot.writeFieldBegin(VEGA_JSON_FIELD_DESC); oprot.writeString(struct.vega_json); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class start_render_query_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_render_query_argsTupleScheme getScheme() { return new start_render_query_argsTupleScheme(); } } private static class start_render_query_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<start_render_query_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, start_render_query_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetWidget_id()) { optionals.set(1); } if (struct.isSetNode_idx()) { optionals.set(2); } if (struct.isSetVega_json()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetWidget_id()) { oprot.writeI64(struct.widget_id); } if (struct.isSetNode_idx()) { oprot.writeI16(struct.node_idx); } if (struct.isSetVega_json()) { oprot.writeString(struct.vega_json); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, start_render_query_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.widget_id = iprot.readI64(); struct.setWidget_idIsSet(true); } if (incoming.get(2)) { struct.node_idx = iprot.readI16(); struct.setNode_idxIsSet(true); } if (incoming.get(3)) { struct.vega_json = iprot.readString(); struct.setVega_jsonIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class start_render_query_result implements org.apache.thrift.TBase<start_render_query_result, start_render_query_result._Fields>, java.io.Serializable, Cloneable, Comparable<start_render_query_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("start_render_query_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new start_render_query_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new start_render_query_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TPendingRenderQuery success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPendingRenderQuery.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(start_render_query_result.class, metaDataMap); } public start_render_query_result() { } public start_render_query_result( TPendingRenderQuery success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public start_render_query_result(start_render_query_result other) { if (other.isSetSuccess()) { this.success = new TPendingRenderQuery(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public start_render_query_result deepCopy() { return new start_render_query_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TPendingRenderQuery getSuccess() { return this.success; } public start_render_query_result setSuccess(@org.apache.thrift.annotation.Nullable TPendingRenderQuery success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public start_render_query_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TPendingRenderQuery)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof start_render_query_result) return this.equals((start_render_query_result)that); return false; } public boolean equals(start_render_query_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(start_render_query_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("start_render_query_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class start_render_query_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_render_query_resultStandardScheme getScheme() { return new start_render_query_resultStandardScheme(); } } private static class start_render_query_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<start_render_query_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, start_render_query_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TPendingRenderQuery(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, start_render_query_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class start_render_query_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public start_render_query_resultTupleScheme getScheme() { return new start_render_query_resultTupleScheme(); } } private static class start_render_query_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<start_render_query_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, start_render_query_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, start_render_query_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TPendingRenderQuery(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class execute_next_render_step_args implements org.apache.thrift.TBase<execute_next_render_step_args, execute_next_render_step_args._Fields>, java.io.Serializable, Cloneable, Comparable<execute_next_render_step_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("execute_next_render_step_args"); private static final org.apache.thrift.protocol.TField PENDING_RENDER_FIELD_DESC = new org.apache.thrift.protocol.TField("pending_render", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField MERGED_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("merged_data", org.apache.thrift.protocol.TType.MAP, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new execute_next_render_step_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new execute_next_render_step_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TPendingRenderQuery pending_render; // required public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> merged_data; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PENDING_RENDER((short)1, "pending_render"), MERGED_DATA((short)2, "merged_data"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PENDING_RENDER return PENDING_RENDER; case 2: // MERGED_DATA return MERGED_DATA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PENDING_RENDER, new org.apache.thrift.meta_data.FieldMetaData("pending_render", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPendingRenderQuery.class))); tmpMap.put(_Fields.MERGED_DATA, new org.apache.thrift.meta_data.FieldMetaData("merged_data", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.MAP , "TRenderAggDataMap"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(execute_next_render_step_args.class, metaDataMap); } public execute_next_render_step_args() { } public execute_next_render_step_args( TPendingRenderQuery pending_render, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> merged_data) { this(); this.pending_render = pending_render; this.merged_data = merged_data; } /** * Performs a deep copy on <i>other</i>. */ public execute_next_render_step_args(execute_next_render_step_args other) { if (other.isSetPending_render()) { this.pending_render = new TPendingRenderQuery(other.pending_render); } if (other.isSetMerged_data()) { java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> __this__merged_data = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>>(other.merged_data.size()); for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> other_element : other.merged_data.entrySet()) { java.lang.String other_element_key = other_element.getKey(); java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>> other_element_value = other_element.getValue(); java.lang.String __this__merged_data_copy_key = other_element_key; java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>> __this__merged_data_copy_value = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>(other_element_value.size()); for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>> other_element_value_element : other_element_value.entrySet()) { java.lang.String other_element_value_element_key = other_element_value_element.getKey(); java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>> other_element_value_element_value = other_element_value_element.getValue(); java.lang.String __this__merged_data_copy_value_copy_key = other_element_value_element_key; java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>> __this__merged_data_copy_value_copy_value = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>(other_element_value_element_value.size()); for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.util.List<TRenderDatum>>> other_element_value_element_value_element : other_element_value_element_value.entrySet()) { java.lang.String other_element_value_element_value_element_key = other_element_value_element_value_element.getKey(); java.util.Map<java.lang.String,java.util.List<TRenderDatum>> other_element_value_element_value_element_value = other_element_value_element_value_element.getValue(); java.lang.String __this__merged_data_copy_value_copy_value_copy_key = other_element_value_element_value_element_key; java.util.Map<java.lang.String,java.util.List<TRenderDatum>> __this__merged_data_copy_value_copy_value_copy_value = new java.util.HashMap<java.lang.String,java.util.List<TRenderDatum>>(other_element_value_element_value_element_value.size()); for (java.util.Map.Entry<java.lang.String, java.util.List<TRenderDatum>> other_element_value_element_value_element_value_element : other_element_value_element_value_element_value.entrySet()) { java.lang.String other_element_value_element_value_element_value_element_key = other_element_value_element_value_element_value_element.getKey(); java.util.List<TRenderDatum> other_element_value_element_value_element_value_element_value = other_element_value_element_value_element_value_element.getValue(); java.lang.String __this__merged_data_copy_value_copy_value_copy_value_copy_key = other_element_value_element_value_element_value_element_key; java.util.List<TRenderDatum> __this__merged_data_copy_value_copy_value_copy_value_copy_value = new java.util.ArrayList<TRenderDatum>(other_element_value_element_value_element_value_element_value.size()); for (TRenderDatum other_element_value_element_value_element_value_element_value_element : other_element_value_element_value_element_value_element_value) { __this__merged_data_copy_value_copy_value_copy_value_copy_value.add(new TRenderDatum(other_element_value_element_value_element_value_element_value_element)); } __this__merged_data_copy_value_copy_value_copy_value.put(__this__merged_data_copy_value_copy_value_copy_value_copy_key, __this__merged_data_copy_value_copy_value_copy_value_copy_value); } __this__merged_data_copy_value_copy_value.put(__this__merged_data_copy_value_copy_value_copy_key, __this__merged_data_copy_value_copy_value_copy_value); } __this__merged_data_copy_value.put(__this__merged_data_copy_value_copy_key, __this__merged_data_copy_value_copy_value); } __this__merged_data.put(__this__merged_data_copy_key, __this__merged_data_copy_value); } this.merged_data = __this__merged_data; } } public execute_next_render_step_args deepCopy() { return new execute_next_render_step_args(this); } @Override public void clear() { this.pending_render = null; this.merged_data = null; } @org.apache.thrift.annotation.Nullable public TPendingRenderQuery getPending_render() { return this.pending_render; } public execute_next_render_step_args setPending_render(@org.apache.thrift.annotation.Nullable TPendingRenderQuery pending_render) { this.pending_render = pending_render; return this; } public void unsetPending_render() { this.pending_render = null; } /** Returns true if field pending_render is set (has been assigned a value) and false otherwise */ public boolean isSetPending_render() { return this.pending_render != null; } public void setPending_renderIsSet(boolean value) { if (!value) { this.pending_render = null; } } public int getMerged_dataSize() { return (this.merged_data == null) ? 0 : this.merged_data.size(); } public void putToMerged_data(java.lang.String key, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>> val) { if (this.merged_data == null) { this.merged_data = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>>(); } this.merged_data.put(key, val); } @org.apache.thrift.annotation.Nullable public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> getMerged_data() { return this.merged_data; } public execute_next_render_step_args setMerged_data(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> merged_data) { this.merged_data = merged_data; return this; } public void unsetMerged_data() { this.merged_data = null; } /** Returns true if field merged_data is set (has been assigned a value) and false otherwise */ public boolean isSetMerged_data() { return this.merged_data != null; } public void setMerged_dataIsSet(boolean value) { if (!value) { this.merged_data = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PENDING_RENDER: if (value == null) { unsetPending_render(); } else { setPending_render((TPendingRenderQuery)value); } break; case MERGED_DATA: if (value == null) { unsetMerged_data(); } else { setMerged_data((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PENDING_RENDER: return getPending_render(); case MERGED_DATA: return getMerged_data(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case PENDING_RENDER: return isSetPending_render(); case MERGED_DATA: return isSetMerged_data(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof execute_next_render_step_args) return this.equals((execute_next_render_step_args)that); return false; } public boolean equals(execute_next_render_step_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_pending_render = true && this.isSetPending_render(); boolean that_present_pending_render = true && that.isSetPending_render(); if (this_present_pending_render || that_present_pending_render) { if (!(this_present_pending_render && that_present_pending_render)) return false; if (!this.pending_render.equals(that.pending_render)) return false; } boolean this_present_merged_data = true && this.isSetMerged_data(); boolean that_present_merged_data = true && that.isSetMerged_data(); if (this_present_merged_data || that_present_merged_data) { if (!(this_present_merged_data && that_present_merged_data)) return false; if (!this.merged_data.equals(that.merged_data)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetPending_render()) ? 131071 : 524287); if (isSetPending_render()) hashCode = hashCode * 8191 + pending_render.hashCode(); hashCode = hashCode * 8191 + ((isSetMerged_data()) ? 131071 : 524287); if (isSetMerged_data()) hashCode = hashCode * 8191 + merged_data.hashCode(); return hashCode; } @Override public int compareTo(execute_next_render_step_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetPending_render(), other.isSetPending_render()); if (lastComparison != 0) { return lastComparison; } if (isSetPending_render()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pending_render, other.pending_render); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetMerged_data(), other.isSetMerged_data()); if (lastComparison != 0) { return lastComparison; } if (isSetMerged_data()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merged_data, other.merged_data); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("execute_next_render_step_args("); boolean first = true; sb.append("pending_render:"); if (this.pending_render == null) { sb.append("null"); } else { sb.append(this.pending_render); } first = false; if (!first) sb.append(", "); sb.append("merged_data:"); if (this.merged_data == null) { sb.append("null"); } else { sb.append(this.merged_data); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (pending_render != null) { pending_render.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class execute_next_render_step_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public execute_next_render_step_argsStandardScheme getScheme() { return new execute_next_render_step_argsStandardScheme(); } } private static class execute_next_render_step_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<execute_next_render_step_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, execute_next_render_step_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PENDING_RENDER if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.pending_render = new TPendingRenderQuery(); struct.pending_render.read(iprot); struct.setPending_renderIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // MERGED_DATA if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map660 = iprot.readMapBegin(); struct.merged_data = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>>(2*_map660.size); @org.apache.thrift.annotation.Nullable java.lang.String _key661; @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>> _val662; for (int _i663 = 0; _i663 < _map660.size; ++_i663) { _key661 = iprot.readString(); { org.apache.thrift.protocol.TMap _map664 = iprot.readMapBegin(); _val662 = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>(2*_map664.size); @org.apache.thrift.annotation.Nullable java.lang.String _key665; @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>> _val666; for (int _i667 = 0; _i667 < _map664.size; ++_i667) { _key665 = iprot.readString(); { org.apache.thrift.protocol.TMap _map668 = iprot.readMapBegin(); _val666 = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>(2*_map668.size); @org.apache.thrift.annotation.Nullable java.lang.String _key669; @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.util.List<TRenderDatum>> _val670; for (int _i671 = 0; _i671 < _map668.size; ++_i671) { _key669 = iprot.readString(); { org.apache.thrift.protocol.TMap _map672 = iprot.readMapBegin(); _val670 = new java.util.HashMap<java.lang.String,java.util.List<TRenderDatum>>(2*_map672.size); @org.apache.thrift.annotation.Nullable java.lang.String _key673; @org.apache.thrift.annotation.Nullable java.util.List<TRenderDatum> _val674; for (int _i675 = 0; _i675 < _map672.size; ++_i675) { _key673 = iprot.readString(); { org.apache.thrift.protocol.TList _list676 = iprot.readListBegin(); _val674 = new java.util.ArrayList<TRenderDatum>(_list676.size); @org.apache.thrift.annotation.Nullable TRenderDatum _elem677; for (int _i678 = 0; _i678 < _list676.size; ++_i678) { _elem677 = new TRenderDatum(); _elem677.read(iprot); _val674.add(_elem677); } iprot.readListEnd(); } _val670.put(_key673, _val674); } iprot.readMapEnd(); } _val666.put(_key669, _val670); } iprot.readMapEnd(); } _val662.put(_key665, _val666); } iprot.readMapEnd(); } struct.merged_data.put(_key661, _val662); } iprot.readMapEnd(); } struct.setMerged_dataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, execute_next_render_step_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.pending_render != null) { oprot.writeFieldBegin(PENDING_RENDER_FIELD_DESC); struct.pending_render.write(oprot); oprot.writeFieldEnd(); } if (struct.merged_data != null) { oprot.writeFieldBegin(MERGED_DATA_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.merged_data.size())); for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> _iter679 : struct.merged_data.entrySet()) { oprot.writeString(_iter679.getKey()); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, _iter679.getValue().size())); for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>> _iter680 : _iter679.getValue().entrySet()) { oprot.writeString(_iter680.getKey()); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, _iter680.getValue().size())); for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.util.List<TRenderDatum>>> _iter681 : _iter680.getValue().entrySet()) { oprot.writeString(_iter681.getKey()); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, _iter681.getValue().size())); for (java.util.Map.Entry<java.lang.String, java.util.List<TRenderDatum>> _iter682 : _iter681.getValue().entrySet()) { oprot.writeString(_iter682.getKey()); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter682.getValue().size())); for (TRenderDatum _iter683 : _iter682.getValue()) { _iter683.write(oprot); } oprot.writeListEnd(); } } oprot.writeMapEnd(); } } oprot.writeMapEnd(); } } oprot.writeMapEnd(); } } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class execute_next_render_step_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public execute_next_render_step_argsTupleScheme getScheme() { return new execute_next_render_step_argsTupleScheme(); } } private static class execute_next_render_step_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<execute_next_render_step_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, execute_next_render_step_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetPending_render()) { optionals.set(0); } if (struct.isSetMerged_data()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetPending_render()) { struct.pending_render.write(oprot); } if (struct.isSetMerged_data()) { { oprot.writeI32(struct.merged_data.size()); for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>> _iter684 : struct.merged_data.entrySet()) { oprot.writeString(_iter684.getKey()); { oprot.writeI32(_iter684.getValue().size()); for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>> _iter685 : _iter684.getValue().entrySet()) { oprot.writeString(_iter685.getKey()); { oprot.writeI32(_iter685.getValue().size()); for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.util.List<TRenderDatum>>> _iter686 : _iter685.getValue().entrySet()) { oprot.writeString(_iter686.getKey()); { oprot.writeI32(_iter686.getValue().size()); for (java.util.Map.Entry<java.lang.String, java.util.List<TRenderDatum>> _iter687 : _iter686.getValue().entrySet()) { oprot.writeString(_iter687.getKey()); { oprot.writeI32(_iter687.getValue().size()); for (TRenderDatum _iter688 : _iter687.getValue()) { _iter688.write(oprot); } } } } } } } } } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, execute_next_render_step_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.pending_render = new TPendingRenderQuery(); struct.pending_render.read(iprot); struct.setPending_renderIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TMap _map689 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP); struct.merged_data = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>>(2*_map689.size); @org.apache.thrift.annotation.Nullable java.lang.String _key690; @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>> _val691; for (int _i692 = 0; _i692 < _map689.size; ++_i692) { _key690 = iprot.readString(); { org.apache.thrift.protocol.TMap _map693 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP); _val691 = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>>(2*_map693.size); @org.apache.thrift.annotation.Nullable java.lang.String _key694; @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>> _val695; for (int _i696 = 0; _i696 < _map693.size; ++_i696) { _key694 = iprot.readString(); { org.apache.thrift.protocol.TMap _map697 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP); _val695 = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.util.List<TRenderDatum>>>(2*_map697.size); @org.apache.thrift.annotation.Nullable java.lang.String _key698; @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.util.List<TRenderDatum>> _val699; for (int _i700 = 0; _i700 < _map697.size; ++_i700) { _key698 = iprot.readString(); { org.apache.thrift.protocol.TMap _map701 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST); _val699 = new java.util.HashMap<java.lang.String,java.util.List<TRenderDatum>>(2*_map701.size); @org.apache.thrift.annotation.Nullable java.lang.String _key702; @org.apache.thrift.annotation.Nullable java.util.List<TRenderDatum> _val703; for (int _i704 = 0; _i704 < _map701.size; ++_i704) { _key702 = iprot.readString(); { org.apache.thrift.protocol.TList _list705 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); _val703 = new java.util.ArrayList<TRenderDatum>(_list705.size); @org.apache.thrift.annotation.Nullable TRenderDatum _elem706; for (int _i707 = 0; _i707 < _list705.size; ++_i707) { _elem706 = new TRenderDatum(); _elem706.read(iprot); _val703.add(_elem706); } } _val699.put(_key702, _val703); } } _val695.put(_key698, _val699); } } _val691.put(_key694, _val695); } } struct.merged_data.put(_key690, _val691); } } struct.setMerged_dataIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class execute_next_render_step_result implements org.apache.thrift.TBase<execute_next_render_step_result, execute_next_render_step_result._Fields>, java.io.Serializable, Cloneable, Comparable<execute_next_render_step_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("execute_next_render_step_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new execute_next_render_step_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new execute_next_render_step_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TRenderStepResult success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRenderStepResult.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(execute_next_render_step_result.class, metaDataMap); } public execute_next_render_step_result() { } public execute_next_render_step_result( TRenderStepResult success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public execute_next_render_step_result(execute_next_render_step_result other) { if (other.isSetSuccess()) { this.success = new TRenderStepResult(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public execute_next_render_step_result deepCopy() { return new execute_next_render_step_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TRenderStepResult getSuccess() { return this.success; } public execute_next_render_step_result setSuccess(@org.apache.thrift.annotation.Nullable TRenderStepResult success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public execute_next_render_step_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TRenderStepResult)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof execute_next_render_step_result) return this.equals((execute_next_render_step_result)that); return false; } public boolean equals(execute_next_render_step_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(execute_next_render_step_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("execute_next_render_step_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class execute_next_render_step_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public execute_next_render_step_resultStandardScheme getScheme() { return new execute_next_render_step_resultStandardScheme(); } } private static class execute_next_render_step_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<execute_next_render_step_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, execute_next_render_step_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TRenderStepResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, execute_next_render_step_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class execute_next_render_step_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public execute_next_render_step_resultTupleScheme getScheme() { return new execute_next_render_step_resultTupleScheme(); } } private static class execute_next_render_step_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<execute_next_render_step_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, execute_next_render_step_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, execute_next_render_step_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TRenderStepResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class insert_data_args implements org.apache.thrift.TBase<insert_data_args, insert_data_args._Fields>, java.io.Serializable, Cloneable, Comparable<insert_data_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insert_data_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField INSERT_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("insert_data", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insert_data_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insert_data_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable TInsertData insert_data; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), INSERT_DATA((short)2, "insert_data"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // INSERT_DATA return INSERT_DATA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.INSERT_DATA, new org.apache.thrift.meta_data.FieldMetaData("insert_data", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInsertData.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insert_data_args.class, metaDataMap); } public insert_data_args() { } public insert_data_args( java.lang.String session, TInsertData insert_data) { this(); this.session = session; this.insert_data = insert_data; } /** * Performs a deep copy on <i>other</i>. */ public insert_data_args(insert_data_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetInsert_data()) { this.insert_data = new TInsertData(other.insert_data); } } public insert_data_args deepCopy() { return new insert_data_args(this); } @Override public void clear() { this.session = null; this.insert_data = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public insert_data_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public TInsertData getInsert_data() { return this.insert_data; } public insert_data_args setInsert_data(@org.apache.thrift.annotation.Nullable TInsertData insert_data) { this.insert_data = insert_data; return this; } public void unsetInsert_data() { this.insert_data = null; } /** Returns true if field insert_data is set (has been assigned a value) and false otherwise */ public boolean isSetInsert_data() { return this.insert_data != null; } public void setInsert_dataIsSet(boolean value) { if (!value) { this.insert_data = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case INSERT_DATA: if (value == null) { unsetInsert_data(); } else { setInsert_data((TInsertData)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case INSERT_DATA: return getInsert_data(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case INSERT_DATA: return isSetInsert_data(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof insert_data_args) return this.equals((insert_data_args)that); return false; } public boolean equals(insert_data_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_insert_data = true && this.isSetInsert_data(); boolean that_present_insert_data = true && that.isSetInsert_data(); if (this_present_insert_data || that_present_insert_data) { if (!(this_present_insert_data && that_present_insert_data)) return false; if (!this.insert_data.equals(that.insert_data)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetInsert_data()) ? 131071 : 524287); if (isSetInsert_data()) hashCode = hashCode * 8191 + insert_data.hashCode(); return hashCode; } @Override public int compareTo(insert_data_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetInsert_data(), other.isSetInsert_data()); if (lastComparison != 0) { return lastComparison; } if (isSetInsert_data()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insert_data, other.insert_data); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("insert_data_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("insert_data:"); if (this.insert_data == null) { sb.append("null"); } else { sb.append(this.insert_data); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (insert_data != null) { insert_data.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class insert_data_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public insert_data_argsStandardScheme getScheme() { return new insert_data_argsStandardScheme(); } } private static class insert_data_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<insert_data_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, insert_data_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // INSERT_DATA if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.insert_data = new TInsertData(); struct.insert_data.read(iprot); struct.setInsert_dataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, insert_data_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.insert_data != null) { oprot.writeFieldBegin(INSERT_DATA_FIELD_DESC); struct.insert_data.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class insert_data_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public insert_data_argsTupleScheme getScheme() { return new insert_data_argsTupleScheme(); } } private static class insert_data_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<insert_data_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, insert_data_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetInsert_data()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetInsert_data()) { struct.insert_data.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, insert_data_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.insert_data = new TInsertData(); struct.insert_data.read(iprot); struct.setInsert_dataIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class insert_data_result implements org.apache.thrift.TBase<insert_data_result, insert_data_result._Fields>, java.io.Serializable, Cloneable, Comparable<insert_data_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insert_data_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insert_data_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insert_data_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insert_data_result.class, metaDataMap); } public insert_data_result() { } public insert_data_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public insert_data_result(insert_data_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public insert_data_result deepCopy() { return new insert_data_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public insert_data_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof insert_data_result) return this.equals((insert_data_result)that); return false; } public boolean equals(insert_data_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(insert_data_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("insert_data_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class insert_data_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public insert_data_resultStandardScheme getScheme() { return new insert_data_resultStandardScheme(); } } private static class insert_data_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<insert_data_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, insert_data_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, insert_data_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class insert_data_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public insert_data_resultTupleScheme getScheme() { return new insert_data_resultTupleScheme(); } } private static class insert_data_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<insert_data_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, insert_data_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, insert_data_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class insert_chunks_args implements org.apache.thrift.TBase<insert_chunks_args, insert_chunks_args._Fields>, java.io.Serializable, Cloneable, Comparable<insert_chunks_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insert_chunks_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField INSERT_CHUNKS_FIELD_DESC = new org.apache.thrift.protocol.TField("insert_chunks", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insert_chunks_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insert_chunks_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable TInsertChunks insert_chunks; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), INSERT_CHUNKS((short)2, "insert_chunks"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // INSERT_CHUNKS return INSERT_CHUNKS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.INSERT_CHUNKS, new org.apache.thrift.meta_data.FieldMetaData("insert_chunks", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInsertChunks.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insert_chunks_args.class, metaDataMap); } public insert_chunks_args() { } public insert_chunks_args( java.lang.String session, TInsertChunks insert_chunks) { this(); this.session = session; this.insert_chunks = insert_chunks; } /** * Performs a deep copy on <i>other</i>. */ public insert_chunks_args(insert_chunks_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetInsert_chunks()) { this.insert_chunks = new TInsertChunks(other.insert_chunks); } } public insert_chunks_args deepCopy() { return new insert_chunks_args(this); } @Override public void clear() { this.session = null; this.insert_chunks = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public insert_chunks_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public TInsertChunks getInsert_chunks() { return this.insert_chunks; } public insert_chunks_args setInsert_chunks(@org.apache.thrift.annotation.Nullable TInsertChunks insert_chunks) { this.insert_chunks = insert_chunks; return this; } public void unsetInsert_chunks() { this.insert_chunks = null; } /** Returns true if field insert_chunks is set (has been assigned a value) and false otherwise */ public boolean isSetInsert_chunks() { return this.insert_chunks != null; } public void setInsert_chunksIsSet(boolean value) { if (!value) { this.insert_chunks = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case INSERT_CHUNKS: if (value == null) { unsetInsert_chunks(); } else { setInsert_chunks((TInsertChunks)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case INSERT_CHUNKS: return getInsert_chunks(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case INSERT_CHUNKS: return isSetInsert_chunks(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof insert_chunks_args) return this.equals((insert_chunks_args)that); return false; } public boolean equals(insert_chunks_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_insert_chunks = true && this.isSetInsert_chunks(); boolean that_present_insert_chunks = true && that.isSetInsert_chunks(); if (this_present_insert_chunks || that_present_insert_chunks) { if (!(this_present_insert_chunks && that_present_insert_chunks)) return false; if (!this.insert_chunks.equals(that.insert_chunks)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetInsert_chunks()) ? 131071 : 524287); if (isSetInsert_chunks()) hashCode = hashCode * 8191 + insert_chunks.hashCode(); return hashCode; } @Override public int compareTo(insert_chunks_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetInsert_chunks(), other.isSetInsert_chunks()); if (lastComparison != 0) { return lastComparison; } if (isSetInsert_chunks()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insert_chunks, other.insert_chunks); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("insert_chunks_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("insert_chunks:"); if (this.insert_chunks == null) { sb.append("null"); } else { sb.append(this.insert_chunks); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (insert_chunks != null) { insert_chunks.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class insert_chunks_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public insert_chunks_argsStandardScheme getScheme() { return new insert_chunks_argsStandardScheme(); } } private static class insert_chunks_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<insert_chunks_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, insert_chunks_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // INSERT_CHUNKS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.insert_chunks = new TInsertChunks(); struct.insert_chunks.read(iprot); struct.setInsert_chunksIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, insert_chunks_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.insert_chunks != null) { oprot.writeFieldBegin(INSERT_CHUNKS_FIELD_DESC); struct.insert_chunks.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class insert_chunks_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public insert_chunks_argsTupleScheme getScheme() { return new insert_chunks_argsTupleScheme(); } } private static class insert_chunks_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<insert_chunks_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, insert_chunks_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetInsert_chunks()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetInsert_chunks()) { struct.insert_chunks.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, insert_chunks_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.insert_chunks = new TInsertChunks(); struct.insert_chunks.read(iprot); struct.setInsert_chunksIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class insert_chunks_result implements org.apache.thrift.TBase<insert_chunks_result, insert_chunks_result._Fields>, java.io.Serializable, Cloneable, Comparable<insert_chunks_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insert_chunks_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insert_chunks_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insert_chunks_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insert_chunks_result.class, metaDataMap); } public insert_chunks_result() { } public insert_chunks_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public insert_chunks_result(insert_chunks_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public insert_chunks_result deepCopy() { return new insert_chunks_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public insert_chunks_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof insert_chunks_result) return this.equals((insert_chunks_result)that); return false; } public boolean equals(insert_chunks_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(insert_chunks_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("insert_chunks_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class insert_chunks_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public insert_chunks_resultStandardScheme getScheme() { return new insert_chunks_resultStandardScheme(); } } private static class insert_chunks_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<insert_chunks_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, insert_chunks_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, insert_chunks_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class insert_chunks_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public insert_chunks_resultTupleScheme getScheme() { return new insert_chunks_resultTupleScheme(); } } private static class insert_chunks_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<insert_chunks_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, insert_chunks_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, insert_chunks_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class checkpoint_args implements org.apache.thrift.TBase<checkpoint_args, checkpoint_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkpoint_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkpoint_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new checkpoint_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new checkpoint_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public int table_id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), TABLE_ID((short)2, "table_id"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // TABLE_ID return TABLE_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __TABLE_ID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkpoint_args.class, metaDataMap); } public checkpoint_args() { } public checkpoint_args( java.lang.String session, int table_id) { this(); this.session = session; this.table_id = table_id; setTable_idIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public checkpoint_args(checkpoint_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSession()) { this.session = other.session; } this.table_id = other.table_id; } public checkpoint_args deepCopy() { return new checkpoint_args(this); } @Override public void clear() { this.session = null; setTable_idIsSet(false); this.table_id = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public checkpoint_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getTable_id() { return this.table_id; } public checkpoint_args setTable_id(int table_id) { this.table_id = table_id; setTable_idIsSet(true); return this; } public void unsetTable_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } /** Returns true if field table_id is set (has been assigned a value) and false otherwise */ public boolean isSetTable_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } public void setTable_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLE_ID_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case TABLE_ID: if (value == null) { unsetTable_id(); } else { setTable_id((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case TABLE_ID: return getTable_id(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case TABLE_ID: return isSetTable_id(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof checkpoint_args) return this.equals((checkpoint_args)that); return false; } public boolean equals(checkpoint_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_table_id = true; boolean that_present_table_id = true; if (this_present_table_id || that_present_table_id) { if (!(this_present_table_id && that_present_table_id)) return false; if (this.table_id != that.table_id) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + table_id; return hashCode; } @Override public int compareTo(checkpoint_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_id(), other.isSetTable_id()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_id, other.table_id); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("checkpoint_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("table_id:"); sb.append(this.table_id); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class checkpoint_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public checkpoint_argsStandardScheme getScheme() { return new checkpoint_argsStandardScheme(); } } private static class checkpoint_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<checkpoint_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, checkpoint_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, checkpoint_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldBegin(TABLE_ID_FIELD_DESC); oprot.writeI32(struct.table_id); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class checkpoint_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public checkpoint_argsTupleScheme getScheme() { return new checkpoint_argsTupleScheme(); } } private static class checkpoint_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<checkpoint_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, checkpoint_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetTable_id()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetTable_id()) { oprot.writeI32(struct.table_id); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, checkpoint_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class checkpoint_result implements org.apache.thrift.TBase<checkpoint_result, checkpoint_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkpoint_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkpoint_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new checkpoint_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new checkpoint_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkpoint_result.class, metaDataMap); } public checkpoint_result() { } public checkpoint_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public checkpoint_result(checkpoint_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public checkpoint_result deepCopy() { return new checkpoint_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public checkpoint_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof checkpoint_result) return this.equals((checkpoint_result)that); return false; } public boolean equals(checkpoint_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(checkpoint_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("checkpoint_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class checkpoint_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public checkpoint_resultStandardScheme getScheme() { return new checkpoint_resultStandardScheme(); } } private static class checkpoint_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<checkpoint_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, checkpoint_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, checkpoint_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class checkpoint_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public checkpoint_resultTupleScheme getScheme() { return new checkpoint_resultTupleScheme(); } } private static class checkpoint_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<checkpoint_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, checkpoint_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, checkpoint_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_roles_args implements org.apache.thrift.TBase<get_roles_args, get_roles_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_roles_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_roles_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_roles_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_roles_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_roles_args.class, metaDataMap); } public get_roles_args() { } public get_roles_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_roles_args(get_roles_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_roles_args deepCopy() { return new get_roles_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_roles_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_roles_args) return this.equals((get_roles_args)that); return false; } public boolean equals(get_roles_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_roles_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_roles_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_roles_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_roles_argsStandardScheme getScheme() { return new get_roles_argsStandardScheme(); } } private static class get_roles_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_roles_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_roles_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_roles_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_roles_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_roles_argsTupleScheme getScheme() { return new get_roles_argsTupleScheme(); } } private static class get_roles_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_roles_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_roles_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_roles_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_roles_result implements org.apache.thrift.TBase<get_roles_result, get_roles_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_roles_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_roles_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_roles_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_roles_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_roles_result.class, metaDataMap); } public get_roles_result() { } public get_roles_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_roles_result(get_roles_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_roles_result deepCopy() { return new get_roles_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_roles_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_roles_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_roles_result) return this.equals((get_roles_result)that); return false; } public boolean equals(get_roles_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_roles_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_roles_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_roles_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_roles_resultStandardScheme getScheme() { return new get_roles_resultStandardScheme(); } } private static class get_roles_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_roles_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_roles_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list708 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list708.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem709; for (int _i710 = 0; _i710 < _list708.size; ++_i710) { _elem709 = iprot.readString(); struct.success.add(_elem709); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_roles_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter711 : struct.success) { oprot.writeString(_iter711); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_roles_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_roles_resultTupleScheme getScheme() { return new get_roles_resultTupleScheme(); } } private static class get_roles_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_roles_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_roles_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter712 : struct.success) { oprot.writeString(_iter712); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_roles_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list713 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list713.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem714; for (int _i715 = 0; _i715 < _list713.size; ++_i715) { _elem714 = iprot.readString(); struct.success.add(_elem714); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_db_objects_for_grantee_args implements org.apache.thrift.TBase<get_db_objects_for_grantee_args, get_db_objects_for_grantee_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_db_objects_for_grantee_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_db_objects_for_grantee_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_db_objects_for_grantee_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_db_objects_for_grantee_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String roleName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), ROLE_NAME((short)2, "roleName"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // ROLE_NAME return ROLE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_db_objects_for_grantee_args.class, metaDataMap); } public get_db_objects_for_grantee_args() { } public get_db_objects_for_grantee_args( java.lang.String session, java.lang.String roleName) { this(); this.session = session; this.roleName = roleName; } /** * Performs a deep copy on <i>other</i>. */ public get_db_objects_for_grantee_args(get_db_objects_for_grantee_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetRoleName()) { this.roleName = other.roleName; } } public get_db_objects_for_grantee_args deepCopy() { return new get_db_objects_for_grantee_args(this); } @Override public void clear() { this.session = null; this.roleName = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_db_objects_for_grantee_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getRoleName() { return this.roleName; } public get_db_objects_for_grantee_args setRoleName(@org.apache.thrift.annotation.Nullable java.lang.String roleName) { this.roleName = roleName; return this; } public void unsetRoleName() { this.roleName = null; } /** Returns true if field roleName is set (has been assigned a value) and false otherwise */ public boolean isSetRoleName() { return this.roleName != null; } public void setRoleNameIsSet(boolean value) { if (!value) { this.roleName = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case ROLE_NAME: if (value == null) { unsetRoleName(); } else { setRoleName((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case ROLE_NAME: return getRoleName(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case ROLE_NAME: return isSetRoleName(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_db_objects_for_grantee_args) return this.equals((get_db_objects_for_grantee_args)that); return false; } public boolean equals(get_db_objects_for_grantee_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_roleName = true && this.isSetRoleName(); boolean that_present_roleName = true && that.isSetRoleName(); if (this_present_roleName || that_present_roleName) { if (!(this_present_roleName && that_present_roleName)) return false; if (!this.roleName.equals(that.roleName)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetRoleName()) ? 131071 : 524287); if (isSetRoleName()) hashCode = hashCode * 8191 + roleName.hashCode(); return hashCode; } @Override public int compareTo(get_db_objects_for_grantee_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRoleName(), other.isSetRoleName()); if (lastComparison != 0) { return lastComparison; } if (isSetRoleName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_db_objects_for_grantee_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("roleName:"); if (this.roleName == null) { sb.append("null"); } else { sb.append(this.roleName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_db_objects_for_grantee_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_db_objects_for_grantee_argsStandardScheme getScheme() { return new get_db_objects_for_grantee_argsStandardScheme(); } } private static class get_db_objects_for_grantee_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_db_objects_for_grantee_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_db_objects_for_grantee_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ROLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.roleName = iprot.readString(); struct.setRoleNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_db_objects_for_grantee_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.roleName != null) { oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); oprot.writeString(struct.roleName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_db_objects_for_grantee_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_db_objects_for_grantee_argsTupleScheme getScheme() { return new get_db_objects_for_grantee_argsTupleScheme(); } } private static class get_db_objects_for_grantee_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_db_objects_for_grantee_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_db_objects_for_grantee_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetRoleName()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetRoleName()) { oprot.writeString(struct.roleName); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_db_objects_for_grantee_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.roleName = iprot.readString(); struct.setRoleNameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_db_objects_for_grantee_result implements org.apache.thrift.TBase<get_db_objects_for_grantee_result, get_db_objects_for_grantee_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_db_objects_for_grantee_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_db_objects_for_grantee_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_db_objects_for_grantee_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_db_objects_for_grantee_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TDBObject> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBObject.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_db_objects_for_grantee_result.class, metaDataMap); } public get_db_objects_for_grantee_result() { } public get_db_objects_for_grantee_result( java.util.List<TDBObject> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_db_objects_for_grantee_result(get_db_objects_for_grantee_result other) { if (other.isSetSuccess()) { java.util.List<TDBObject> __this__success = new java.util.ArrayList<TDBObject>(other.success.size()); for (TDBObject other_element : other.success) { __this__success.add(new TDBObject(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_db_objects_for_grantee_result deepCopy() { return new get_db_objects_for_grantee_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TDBObject> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TDBObject elem) { if (this.success == null) { this.success = new java.util.ArrayList<TDBObject>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TDBObject> getSuccess() { return this.success; } public get_db_objects_for_grantee_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TDBObject> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_db_objects_for_grantee_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TDBObject>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_db_objects_for_grantee_result) return this.equals((get_db_objects_for_grantee_result)that); return false; } public boolean equals(get_db_objects_for_grantee_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_db_objects_for_grantee_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_db_objects_for_grantee_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_db_objects_for_grantee_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_db_objects_for_grantee_resultStandardScheme getScheme() { return new get_db_objects_for_grantee_resultStandardScheme(); } } private static class get_db_objects_for_grantee_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_db_objects_for_grantee_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_db_objects_for_grantee_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list716 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TDBObject>(_list716.size); @org.apache.thrift.annotation.Nullable TDBObject _elem717; for (int _i718 = 0; _i718 < _list716.size; ++_i718) { _elem717 = new TDBObject(); _elem717.read(iprot); struct.success.add(_elem717); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_db_objects_for_grantee_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TDBObject _iter719 : struct.success) { _iter719.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_db_objects_for_grantee_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_db_objects_for_grantee_resultTupleScheme getScheme() { return new get_db_objects_for_grantee_resultTupleScheme(); } } private static class get_db_objects_for_grantee_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_db_objects_for_grantee_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_db_objects_for_grantee_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TDBObject _iter720 : struct.success) { _iter720.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_db_objects_for_grantee_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list721 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TDBObject>(_list721.size); @org.apache.thrift.annotation.Nullable TDBObject _elem722; for (int _i723 = 0; _i723 < _list721.size; ++_i723) { _elem722 = new TDBObject(); _elem722.read(iprot); struct.success.add(_elem722); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_db_object_privs_args implements org.apache.thrift.TBase<get_db_object_privs_args, get_db_object_privs_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_db_object_privs_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_db_object_privs_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField OBJECT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("objectName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_db_object_privs_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_db_object_privs_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String objectName; // required /** * * @see TDBObjectType */ public @org.apache.thrift.annotation.Nullable TDBObjectType type; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), OBJECT_NAME((short)2, "objectName"), /** * * @see TDBObjectType */ TYPE((short)3, "type"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // OBJECT_NAME return OBJECT_NAME; case 3: // TYPE return TYPE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.OBJECT_NAME, new org.apache.thrift.meta_data.FieldMetaData("objectName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDBObjectType.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_db_object_privs_args.class, metaDataMap); } public get_db_object_privs_args() { } public get_db_object_privs_args( java.lang.String session, java.lang.String objectName, TDBObjectType type) { this(); this.session = session; this.objectName = objectName; this.type = type; } /** * Performs a deep copy on <i>other</i>. */ public get_db_object_privs_args(get_db_object_privs_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetObjectName()) { this.objectName = other.objectName; } if (other.isSetType()) { this.type = other.type; } } public get_db_object_privs_args deepCopy() { return new get_db_object_privs_args(this); } @Override public void clear() { this.session = null; this.objectName = null; this.type = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_db_object_privs_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getObjectName() { return this.objectName; } public get_db_object_privs_args setObjectName(@org.apache.thrift.annotation.Nullable java.lang.String objectName) { this.objectName = objectName; return this; } public void unsetObjectName() { this.objectName = null; } /** Returns true if field objectName is set (has been assigned a value) and false otherwise */ public boolean isSetObjectName() { return this.objectName != null; } public void setObjectNameIsSet(boolean value) { if (!value) { this.objectName = null; } } /** * * @see TDBObjectType */ @org.apache.thrift.annotation.Nullable public TDBObjectType getType() { return this.type; } /** * * @see TDBObjectType */ public get_db_object_privs_args setType(@org.apache.thrift.annotation.Nullable TDBObjectType type) { this.type = type; return this; } public void unsetType() { this.type = null; } /** Returns true if field type is set (has been assigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } public void setTypeIsSet(boolean value) { if (!value) { this.type = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case OBJECT_NAME: if (value == null) { unsetObjectName(); } else { setObjectName((java.lang.String)value); } break; case TYPE: if (value == null) { unsetType(); } else { setType((TDBObjectType)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case OBJECT_NAME: return getObjectName(); case TYPE: return getType(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case OBJECT_NAME: return isSetObjectName(); case TYPE: return isSetType(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_db_object_privs_args) return this.equals((get_db_object_privs_args)that); return false; } public boolean equals(get_db_object_privs_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_objectName = true && this.isSetObjectName(); boolean that_present_objectName = true && that.isSetObjectName(); if (this_present_objectName || that_present_objectName) { if (!(this_present_objectName && that_present_objectName)) return false; if (!this.objectName.equals(that.objectName)) return false; } boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetObjectName()) ? 131071 : 524287); if (isSetObjectName()) hashCode = hashCode * 8191 + objectName.hashCode(); hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); if (isSetType()) hashCode = hashCode * 8191 + type.getValue(); return hashCode; } @Override public int compareTo(get_db_object_privs_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetObjectName(), other.isSetObjectName()); if (lastComparison != 0) { return lastComparison; } if (isSetObjectName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectName, other.objectName); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_db_object_privs_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("objectName:"); if (this.objectName == null) { sb.append("null"); } else { sb.append(this.objectName); } first = false; if (!first) sb.append(", "); sb.append("type:"); if (this.type == null) { sb.append("null"); } else { sb.append(this.type); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_db_object_privs_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_db_object_privs_argsStandardScheme getScheme() { return new get_db_object_privs_argsStandardScheme(); } } private static class get_db_object_privs_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_db_object_privs_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_db_object_privs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // OBJECT_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.objectName = iprot.readString(); struct.setObjectNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.type = ai.heavy.thrift.server.TDBObjectType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_db_object_privs_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.objectName != null) { oprot.writeFieldBegin(OBJECT_NAME_FIELD_DESC); oprot.writeString(struct.objectName); oprot.writeFieldEnd(); } if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_db_object_privs_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_db_object_privs_argsTupleScheme getScheme() { return new get_db_object_privs_argsTupleScheme(); } } private static class get_db_object_privs_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_db_object_privs_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_db_object_privs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetObjectName()) { optionals.set(1); } if (struct.isSetType()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetObjectName()) { oprot.writeString(struct.objectName); } if (struct.isSetType()) { oprot.writeI32(struct.type.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_db_object_privs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.objectName = iprot.readString(); struct.setObjectNameIsSet(true); } if (incoming.get(2)) { struct.type = ai.heavy.thrift.server.TDBObjectType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_db_object_privs_result implements org.apache.thrift.TBase<get_db_object_privs_result, get_db_object_privs_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_db_object_privs_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_db_object_privs_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_db_object_privs_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_db_object_privs_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TDBObject> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBObject.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_db_object_privs_result.class, metaDataMap); } public get_db_object_privs_result() { } public get_db_object_privs_result( java.util.List<TDBObject> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_db_object_privs_result(get_db_object_privs_result other) { if (other.isSetSuccess()) { java.util.List<TDBObject> __this__success = new java.util.ArrayList<TDBObject>(other.success.size()); for (TDBObject other_element : other.success) { __this__success.add(new TDBObject(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_db_object_privs_result deepCopy() { return new get_db_object_privs_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TDBObject> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TDBObject elem) { if (this.success == null) { this.success = new java.util.ArrayList<TDBObject>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TDBObject> getSuccess() { return this.success; } public get_db_object_privs_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TDBObject> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_db_object_privs_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<TDBObject>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_db_object_privs_result) return this.equals((get_db_object_privs_result)that); return false; } public boolean equals(get_db_object_privs_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_db_object_privs_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_db_object_privs_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_db_object_privs_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_db_object_privs_resultStandardScheme getScheme() { return new get_db_object_privs_resultStandardScheme(); } } private static class get_db_object_privs_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_db_object_privs_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_db_object_privs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list724 = iprot.readListBegin(); struct.success = new java.util.ArrayList<TDBObject>(_list724.size); @org.apache.thrift.annotation.Nullable TDBObject _elem725; for (int _i726 = 0; _i726 < _list724.size; ++_i726) { _elem725 = new TDBObject(); _elem725.read(iprot); struct.success.add(_elem725); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_db_object_privs_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TDBObject _iter727 : struct.success) { _iter727.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_db_object_privs_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_db_object_privs_resultTupleScheme getScheme() { return new get_db_object_privs_resultTupleScheme(); } } private static class get_db_object_privs_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_db_object_privs_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_db_object_privs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TDBObject _iter728 : struct.success) { _iter728.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_db_object_privs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list729 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<TDBObject>(_list729.size); @org.apache.thrift.annotation.Nullable TDBObject _elem730; for (int _i731 = 0; _i731 < _list729.size; ++_i731) { _elem730 = new TDBObject(); _elem730.read(iprot); struct.success.add(_elem730); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_all_roles_for_user_args implements org.apache.thrift.TBase<get_all_roles_for_user_args, get_all_roles_for_user_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_roles_for_user_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_roles_for_user_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_all_roles_for_user_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_all_roles_for_user_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String userName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), USER_NAME((short)2, "userName"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // USER_NAME return USER_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_roles_for_user_args.class, metaDataMap); } public get_all_roles_for_user_args() { } public get_all_roles_for_user_args( java.lang.String session, java.lang.String userName) { this(); this.session = session; this.userName = userName; } /** * Performs a deep copy on <i>other</i>. */ public get_all_roles_for_user_args(get_all_roles_for_user_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetUserName()) { this.userName = other.userName; } } public get_all_roles_for_user_args deepCopy() { return new get_all_roles_for_user_args(this); } @Override public void clear() { this.session = null; this.userName = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_all_roles_for_user_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getUserName() { return this.userName; } public get_all_roles_for_user_args setUserName(@org.apache.thrift.annotation.Nullable java.lang.String userName) { this.userName = userName; return this; } public void unsetUserName() { this.userName = null; } /** Returns true if field userName is set (has been assigned a value) and false otherwise */ public boolean isSetUserName() { return this.userName != null; } public void setUserNameIsSet(boolean value) { if (!value) { this.userName = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case USER_NAME: if (value == null) { unsetUserName(); } else { setUserName((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case USER_NAME: return getUserName(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case USER_NAME: return isSetUserName(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_all_roles_for_user_args) return this.equals((get_all_roles_for_user_args)that); return false; } public boolean equals(get_all_roles_for_user_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_userName = true && this.isSetUserName(); boolean that_present_userName = true && that.isSetUserName(); if (this_present_userName || that_present_userName) { if (!(this_present_userName && that_present_userName)) return false; if (!this.userName.equals(that.userName)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetUserName()) ? 131071 : 524287); if (isSetUserName()) hashCode = hashCode * 8191 + userName.hashCode(); return hashCode; } @Override public int compareTo(get_all_roles_for_user_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetUserName(), other.isSetUserName()); if (lastComparison != 0) { return lastComparison; } if (isSetUserName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_all_roles_for_user_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("userName:"); if (this.userName == null) { sb.append("null"); } else { sb.append(this.userName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_roles_for_user_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_roles_for_user_argsStandardScheme getScheme() { return new get_all_roles_for_user_argsStandardScheme(); } } private static class get_all_roles_for_user_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_all_roles_for_user_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_roles_for_user_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // USER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userName = iprot.readString(); struct.setUserNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_roles_for_user_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.userName != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(struct.userName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_roles_for_user_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_roles_for_user_argsTupleScheme getScheme() { return new get_all_roles_for_user_argsTupleScheme(); } } private static class get_all_roles_for_user_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_all_roles_for_user_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_roles_for_user_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetUserName()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetUserName()) { oprot.writeString(struct.userName); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_roles_for_user_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.userName = iprot.readString(); struct.setUserNameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_all_roles_for_user_result implements org.apache.thrift.TBase<get_all_roles_for_user_result, get_all_roles_for_user_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_roles_for_user_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_roles_for_user_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_all_roles_for_user_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_all_roles_for_user_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_roles_for_user_result.class, metaDataMap); } public get_all_roles_for_user_result() { } public get_all_roles_for_user_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_all_roles_for_user_result(get_all_roles_for_user_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_all_roles_for_user_result deepCopy() { return new get_all_roles_for_user_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_all_roles_for_user_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_all_roles_for_user_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_all_roles_for_user_result) return this.equals((get_all_roles_for_user_result)that); return false; } public boolean equals(get_all_roles_for_user_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_all_roles_for_user_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_all_roles_for_user_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_roles_for_user_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_roles_for_user_resultStandardScheme getScheme() { return new get_all_roles_for_user_resultStandardScheme(); } } private static class get_all_roles_for_user_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_all_roles_for_user_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_roles_for_user_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list732 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list732.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem733; for (int _i734 = 0; _i734 < _list732.size; ++_i734) { _elem733 = iprot.readString(); struct.success.add(_elem733); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_roles_for_user_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter735 : struct.success) { oprot.writeString(_iter735); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_roles_for_user_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_roles_for_user_resultTupleScheme getScheme() { return new get_all_roles_for_user_resultTupleScheme(); } } private static class get_all_roles_for_user_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_all_roles_for_user_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_roles_for_user_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter736 : struct.success) { oprot.writeString(_iter736); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_roles_for_user_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list737 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list737.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem738; for (int _i739 = 0; _i739 < _list737.size; ++_i739) { _elem738 = iprot.readString(); struct.success.add(_elem738); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_all_effective_roles_for_user_args implements org.apache.thrift.TBase<get_all_effective_roles_for_user_args, get_all_effective_roles_for_user_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_effective_roles_for_user_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_effective_roles_for_user_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_all_effective_roles_for_user_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_all_effective_roles_for_user_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String userName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), USER_NAME((short)2, "userName"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // USER_NAME return USER_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_effective_roles_for_user_args.class, metaDataMap); } public get_all_effective_roles_for_user_args() { } public get_all_effective_roles_for_user_args( java.lang.String session, java.lang.String userName) { this(); this.session = session; this.userName = userName; } /** * Performs a deep copy on <i>other</i>. */ public get_all_effective_roles_for_user_args(get_all_effective_roles_for_user_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetUserName()) { this.userName = other.userName; } } public get_all_effective_roles_for_user_args deepCopy() { return new get_all_effective_roles_for_user_args(this); } @Override public void clear() { this.session = null; this.userName = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_all_effective_roles_for_user_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getUserName() { return this.userName; } public get_all_effective_roles_for_user_args setUserName(@org.apache.thrift.annotation.Nullable java.lang.String userName) { this.userName = userName; return this; } public void unsetUserName() { this.userName = null; } /** Returns true if field userName is set (has been assigned a value) and false otherwise */ public boolean isSetUserName() { return this.userName != null; } public void setUserNameIsSet(boolean value) { if (!value) { this.userName = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case USER_NAME: if (value == null) { unsetUserName(); } else { setUserName((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case USER_NAME: return getUserName(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case USER_NAME: return isSetUserName(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_all_effective_roles_for_user_args) return this.equals((get_all_effective_roles_for_user_args)that); return false; } public boolean equals(get_all_effective_roles_for_user_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_userName = true && this.isSetUserName(); boolean that_present_userName = true && that.isSetUserName(); if (this_present_userName || that_present_userName) { if (!(this_present_userName && that_present_userName)) return false; if (!this.userName.equals(that.userName)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetUserName()) ? 131071 : 524287); if (isSetUserName()) hashCode = hashCode * 8191 + userName.hashCode(); return hashCode; } @Override public int compareTo(get_all_effective_roles_for_user_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetUserName(), other.isSetUserName()); if (lastComparison != 0) { return lastComparison; } if (isSetUserName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_all_effective_roles_for_user_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("userName:"); if (this.userName == null) { sb.append("null"); } else { sb.append(this.userName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_effective_roles_for_user_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_effective_roles_for_user_argsStandardScheme getScheme() { return new get_all_effective_roles_for_user_argsStandardScheme(); } } private static class get_all_effective_roles_for_user_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_all_effective_roles_for_user_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_effective_roles_for_user_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // USER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userName = iprot.readString(); struct.setUserNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_effective_roles_for_user_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.userName != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(struct.userName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_effective_roles_for_user_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_effective_roles_for_user_argsTupleScheme getScheme() { return new get_all_effective_roles_for_user_argsTupleScheme(); } } private static class get_all_effective_roles_for_user_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_all_effective_roles_for_user_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_effective_roles_for_user_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetUserName()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetUserName()) { oprot.writeString(struct.userName); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_effective_roles_for_user_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.userName = iprot.readString(); struct.setUserNameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_all_effective_roles_for_user_result implements org.apache.thrift.TBase<get_all_effective_roles_for_user_result, get_all_effective_roles_for_user_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_effective_roles_for_user_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_effective_roles_for_user_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_all_effective_roles_for_user_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_all_effective_roles_for_user_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_effective_roles_for_user_result.class, metaDataMap); } public get_all_effective_roles_for_user_result() { } public get_all_effective_roles_for_user_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_all_effective_roles_for_user_result(get_all_effective_roles_for_user_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_all_effective_roles_for_user_result deepCopy() { return new get_all_effective_roles_for_user_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_all_effective_roles_for_user_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_all_effective_roles_for_user_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_all_effective_roles_for_user_result) return this.equals((get_all_effective_roles_for_user_result)that); return false; } public boolean equals(get_all_effective_roles_for_user_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_all_effective_roles_for_user_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_all_effective_roles_for_user_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_effective_roles_for_user_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_effective_roles_for_user_resultStandardScheme getScheme() { return new get_all_effective_roles_for_user_resultStandardScheme(); } } private static class get_all_effective_roles_for_user_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_all_effective_roles_for_user_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_effective_roles_for_user_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list740 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list740.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem741; for (int _i742 = 0; _i742 < _list740.size; ++_i742) { _elem741 = iprot.readString(); struct.success.add(_elem741); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_effective_roles_for_user_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter743 : struct.success) { oprot.writeString(_iter743); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_effective_roles_for_user_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_all_effective_roles_for_user_resultTupleScheme getScheme() { return new get_all_effective_roles_for_user_resultTupleScheme(); } } private static class get_all_effective_roles_for_user_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_all_effective_roles_for_user_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_effective_roles_for_user_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter744 : struct.success) { oprot.writeString(_iter744); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_effective_roles_for_user_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list745 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list745.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem746; for (int _i747 = 0; _i747 < _list745.size; ++_i747) { _elem746 = iprot.readString(); struct.success.add(_elem746); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class has_role_args implements org.apache.thrift.TBase<has_role_args, has_role_args._Fields>, java.io.Serializable, Cloneable, Comparable<has_role_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("has_role_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GRANTEE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("granteeName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new has_role_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new has_role_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String granteeName; // required public @org.apache.thrift.annotation.Nullable java.lang.String roleName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), GRANTEE_NAME((short)2, "granteeName"), ROLE_NAME((short)3, "roleName"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // GRANTEE_NAME return GRANTEE_NAME; case 3: // ROLE_NAME return ROLE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.GRANTEE_NAME, new org.apache.thrift.meta_data.FieldMetaData("granteeName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(has_role_args.class, metaDataMap); } public has_role_args() { } public has_role_args( java.lang.String session, java.lang.String granteeName, java.lang.String roleName) { this(); this.session = session; this.granteeName = granteeName; this.roleName = roleName; } /** * Performs a deep copy on <i>other</i>. */ public has_role_args(has_role_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetGranteeName()) { this.granteeName = other.granteeName; } if (other.isSetRoleName()) { this.roleName = other.roleName; } } public has_role_args deepCopy() { return new has_role_args(this); } @Override public void clear() { this.session = null; this.granteeName = null; this.roleName = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public has_role_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getGranteeName() { return this.granteeName; } public has_role_args setGranteeName(@org.apache.thrift.annotation.Nullable java.lang.String granteeName) { this.granteeName = granteeName; return this; } public void unsetGranteeName() { this.granteeName = null; } /** Returns true if field granteeName is set (has been assigned a value) and false otherwise */ public boolean isSetGranteeName() { return this.granteeName != null; } public void setGranteeNameIsSet(boolean value) { if (!value) { this.granteeName = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getRoleName() { return this.roleName; } public has_role_args setRoleName(@org.apache.thrift.annotation.Nullable java.lang.String roleName) { this.roleName = roleName; return this; } public void unsetRoleName() { this.roleName = null; } /** Returns true if field roleName is set (has been assigned a value) and false otherwise */ public boolean isSetRoleName() { return this.roleName != null; } public void setRoleNameIsSet(boolean value) { if (!value) { this.roleName = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case GRANTEE_NAME: if (value == null) { unsetGranteeName(); } else { setGranteeName((java.lang.String)value); } break; case ROLE_NAME: if (value == null) { unsetRoleName(); } else { setRoleName((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case GRANTEE_NAME: return getGranteeName(); case ROLE_NAME: return getRoleName(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case GRANTEE_NAME: return isSetGranteeName(); case ROLE_NAME: return isSetRoleName(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof has_role_args) return this.equals((has_role_args)that); return false; } public boolean equals(has_role_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_granteeName = true && this.isSetGranteeName(); boolean that_present_granteeName = true && that.isSetGranteeName(); if (this_present_granteeName || that_present_granteeName) { if (!(this_present_granteeName && that_present_granteeName)) return false; if (!this.granteeName.equals(that.granteeName)) return false; } boolean this_present_roleName = true && this.isSetRoleName(); boolean that_present_roleName = true && that.isSetRoleName(); if (this_present_roleName || that_present_roleName) { if (!(this_present_roleName && that_present_roleName)) return false; if (!this.roleName.equals(that.roleName)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetGranteeName()) ? 131071 : 524287); if (isSetGranteeName()) hashCode = hashCode * 8191 + granteeName.hashCode(); hashCode = hashCode * 8191 + ((isSetRoleName()) ? 131071 : 524287); if (isSetRoleName()) hashCode = hashCode * 8191 + roleName.hashCode(); return hashCode; } @Override public int compareTo(has_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGranteeName(), other.isSetGranteeName()); if (lastComparison != 0) { return lastComparison; } if (isSetGranteeName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.granteeName, other.granteeName); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRoleName(), other.isSetRoleName()); if (lastComparison != 0) { return lastComparison; } if (isSetRoleName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("has_role_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("granteeName:"); if (this.granteeName == null) { sb.append("null"); } else { sb.append(this.granteeName); } first = false; if (!first) sb.append(", "); sb.append("roleName:"); if (this.roleName == null) { sb.append("null"); } else { sb.append(this.roleName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class has_role_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public has_role_argsStandardScheme getScheme() { return new has_role_argsStandardScheme(); } } private static class has_role_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<has_role_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, has_role_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // GRANTEE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.granteeName = iprot.readString(); struct.setGranteeNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ROLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.roleName = iprot.readString(); struct.setRoleNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, has_role_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.granteeName != null) { oprot.writeFieldBegin(GRANTEE_NAME_FIELD_DESC); oprot.writeString(struct.granteeName); oprot.writeFieldEnd(); } if (struct.roleName != null) { oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); oprot.writeString(struct.roleName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class has_role_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public has_role_argsTupleScheme getScheme() { return new has_role_argsTupleScheme(); } } private static class has_role_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<has_role_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, has_role_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetGranteeName()) { optionals.set(1); } if (struct.isSetRoleName()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetGranteeName()) { oprot.writeString(struct.granteeName); } if (struct.isSetRoleName()) { oprot.writeString(struct.roleName); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, has_role_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.granteeName = iprot.readString(); struct.setGranteeNameIsSet(true); } if (incoming.get(2)) { struct.roleName = iprot.readString(); struct.setRoleNameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class has_role_result implements org.apache.thrift.TBase<has_role_result, has_role_result._Fields>, java.io.Serializable, Cloneable, Comparable<has_role_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("has_role_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new has_role_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new has_role_resultTupleSchemeFactory(); public boolean success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(has_role_result.class, metaDataMap); } public has_role_result() { } public has_role_result( boolean success, TDBException e) { this(); this.success = success; setSuccessIsSet(true); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public has_role_result(has_role_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetE()) { this.e = new TDBException(other.e); } } public has_role_result deepCopy() { return new has_role_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.e = null; } public boolean isSuccess() { return this.success; } public has_role_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public has_role_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.Boolean)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof has_role_result) return this.equals((has_role_result)that); return false; } public boolean equals(has_role_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((success) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(has_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("has_role_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class has_role_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public has_role_resultStandardScheme getScheme() { return new has_role_resultStandardScheme(); } } private static class has_role_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<has_role_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, has_role_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, has_role_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class has_role_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public has_role_resultTupleScheme getScheme() { return new has_role_resultTupleScheme(); } } private static class has_role_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<has_role_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, has_role_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, has_role_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class has_object_privilege_args implements org.apache.thrift.TBase<has_object_privilege_args, has_object_privilege_args._Fields>, java.io.Serializable, Cloneable, Comparable<has_object_privilege_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("has_object_privilege_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GRANTEE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("granteeName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField OBJECT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ObjectName", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField OBJECT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("objectType", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new has_object_privilege_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new has_object_privilege_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String granteeName; // required public @org.apache.thrift.annotation.Nullable java.lang.String ObjectName; // required /** * * @see TDBObjectType */ public @org.apache.thrift.annotation.Nullable TDBObjectType objectType; // required public @org.apache.thrift.annotation.Nullable TDBObjectPermissions permissions; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), GRANTEE_NAME((short)2, "granteeName"), OBJECT_NAME((short)3, "ObjectName"), /** * * @see TDBObjectType */ OBJECT_TYPE((short)4, "objectType"), PERMISSIONS((short)5, "permissions"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // GRANTEE_NAME return GRANTEE_NAME; case 3: // OBJECT_NAME return OBJECT_NAME; case 4: // OBJECT_TYPE return OBJECT_TYPE; case 5: // PERMISSIONS return PERMISSIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.GRANTEE_NAME, new org.apache.thrift.meta_data.FieldMetaData("granteeName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.OBJECT_NAME, new org.apache.thrift.meta_data.FieldMetaData("ObjectName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.OBJECT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("objectType", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDBObjectType.class))); tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBObjectPermissions.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(has_object_privilege_args.class, metaDataMap); } public has_object_privilege_args() { } public has_object_privilege_args( java.lang.String session, java.lang.String granteeName, java.lang.String ObjectName, TDBObjectType objectType, TDBObjectPermissions permissions) { this(); this.session = session; this.granteeName = granteeName; this.ObjectName = ObjectName; this.objectType = objectType; this.permissions = permissions; } /** * Performs a deep copy on <i>other</i>. */ public has_object_privilege_args(has_object_privilege_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetGranteeName()) { this.granteeName = other.granteeName; } if (other.isSetObjectName()) { this.ObjectName = other.ObjectName; } if (other.isSetObjectType()) { this.objectType = other.objectType; } if (other.isSetPermissions()) { this.permissions = new TDBObjectPermissions(other.permissions); } } public has_object_privilege_args deepCopy() { return new has_object_privilege_args(this); } @Override public void clear() { this.session = null; this.granteeName = null; this.ObjectName = null; this.objectType = null; this.permissions = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public has_object_privilege_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getGranteeName() { return this.granteeName; } public has_object_privilege_args setGranteeName(@org.apache.thrift.annotation.Nullable java.lang.String granteeName) { this.granteeName = granteeName; return this; } public void unsetGranteeName() { this.granteeName = null; } /** Returns true if field granteeName is set (has been assigned a value) and false otherwise */ public boolean isSetGranteeName() { return this.granteeName != null; } public void setGranteeNameIsSet(boolean value) { if (!value) { this.granteeName = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getObjectName() { return this.ObjectName; } public has_object_privilege_args setObjectName(@org.apache.thrift.annotation.Nullable java.lang.String ObjectName) { this.ObjectName = ObjectName; return this; } public void unsetObjectName() { this.ObjectName = null; } /** Returns true if field ObjectName is set (has been assigned a value) and false otherwise */ public boolean isSetObjectName() { return this.ObjectName != null; } public void setObjectNameIsSet(boolean value) { if (!value) { this.ObjectName = null; } } /** * * @see TDBObjectType */ @org.apache.thrift.annotation.Nullable public TDBObjectType getObjectType() { return this.objectType; } /** * * @see TDBObjectType */ public has_object_privilege_args setObjectType(@org.apache.thrift.annotation.Nullable TDBObjectType objectType) { this.objectType = objectType; return this; } public void unsetObjectType() { this.objectType = null; } /** Returns true if field objectType is set (has been assigned a value) and false otherwise */ public boolean isSetObjectType() { return this.objectType != null; } public void setObjectTypeIsSet(boolean value) { if (!value) { this.objectType = null; } } @org.apache.thrift.annotation.Nullable public TDBObjectPermissions getPermissions() { return this.permissions; } public has_object_privilege_args setPermissions(@org.apache.thrift.annotation.Nullable TDBObjectPermissions permissions) { this.permissions = permissions; return this; } public void unsetPermissions() { this.permissions = null; } /** Returns true if field permissions is set (has been assigned a value) and false otherwise */ public boolean isSetPermissions() { return this.permissions != null; } public void setPermissionsIsSet(boolean value) { if (!value) { this.permissions = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case GRANTEE_NAME: if (value == null) { unsetGranteeName(); } else { setGranteeName((java.lang.String)value); } break; case OBJECT_NAME: if (value == null) { unsetObjectName(); } else { setObjectName((java.lang.String)value); } break; case OBJECT_TYPE: if (value == null) { unsetObjectType(); } else { setObjectType((TDBObjectType)value); } break; case PERMISSIONS: if (value == null) { unsetPermissions(); } else { setPermissions((TDBObjectPermissions)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case GRANTEE_NAME: return getGranteeName(); case OBJECT_NAME: return getObjectName(); case OBJECT_TYPE: return getObjectType(); case PERMISSIONS: return getPermissions(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case GRANTEE_NAME: return isSetGranteeName(); case OBJECT_NAME: return isSetObjectName(); case OBJECT_TYPE: return isSetObjectType(); case PERMISSIONS: return isSetPermissions(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof has_object_privilege_args) return this.equals((has_object_privilege_args)that); return false; } public boolean equals(has_object_privilege_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_granteeName = true && this.isSetGranteeName(); boolean that_present_granteeName = true && that.isSetGranteeName(); if (this_present_granteeName || that_present_granteeName) { if (!(this_present_granteeName && that_present_granteeName)) return false; if (!this.granteeName.equals(that.granteeName)) return false; } boolean this_present_ObjectName = true && this.isSetObjectName(); boolean that_present_ObjectName = true && that.isSetObjectName(); if (this_present_ObjectName || that_present_ObjectName) { if (!(this_present_ObjectName && that_present_ObjectName)) return false; if (!this.ObjectName.equals(that.ObjectName)) return false; } boolean this_present_objectType = true && this.isSetObjectType(); boolean that_present_objectType = true && that.isSetObjectType(); if (this_present_objectType || that_present_objectType) { if (!(this_present_objectType && that_present_objectType)) return false; if (!this.objectType.equals(that.objectType)) return false; } boolean this_present_permissions = true && this.isSetPermissions(); boolean that_present_permissions = true && that.isSetPermissions(); if (this_present_permissions || that_present_permissions) { if (!(this_present_permissions && that_present_permissions)) return false; if (!this.permissions.equals(that.permissions)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetGranteeName()) ? 131071 : 524287); if (isSetGranteeName()) hashCode = hashCode * 8191 + granteeName.hashCode(); hashCode = hashCode * 8191 + ((isSetObjectName()) ? 131071 : 524287); if (isSetObjectName()) hashCode = hashCode * 8191 + ObjectName.hashCode(); hashCode = hashCode * 8191 + ((isSetObjectType()) ? 131071 : 524287); if (isSetObjectType()) hashCode = hashCode * 8191 + objectType.getValue(); hashCode = hashCode * 8191 + ((isSetPermissions()) ? 131071 : 524287); if (isSetPermissions()) hashCode = hashCode * 8191 + permissions.hashCode(); return hashCode; } @Override public int compareTo(has_object_privilege_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGranteeName(), other.isSetGranteeName()); if (lastComparison != 0) { return lastComparison; } if (isSetGranteeName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.granteeName, other.granteeName); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetObjectName(), other.isSetObjectName()); if (lastComparison != 0) { return lastComparison; } if (isSetObjectName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ObjectName, other.ObjectName); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetObjectType(), other.isSetObjectType()); if (lastComparison != 0) { return lastComparison; } if (isSetObjectType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectType, other.objectType); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPermissions(), other.isSetPermissions()); if (lastComparison != 0) { return lastComparison; } if (isSetPermissions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("has_object_privilege_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("granteeName:"); if (this.granteeName == null) { sb.append("null"); } else { sb.append(this.granteeName); } first = false; if (!first) sb.append(", "); sb.append("ObjectName:"); if (this.ObjectName == null) { sb.append("null"); } else { sb.append(this.ObjectName); } first = false; if (!first) sb.append(", "); sb.append("objectType:"); if (this.objectType == null) { sb.append("null"); } else { sb.append(this.objectType); } first = false; if (!first) sb.append(", "); sb.append("permissions:"); if (this.permissions == null) { sb.append("null"); } else { sb.append(this.permissions); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class has_object_privilege_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public has_object_privilege_argsStandardScheme getScheme() { return new has_object_privilege_argsStandardScheme(); } } private static class has_object_privilege_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<has_object_privilege_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, has_object_privilege_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // GRANTEE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.granteeName = iprot.readString(); struct.setGranteeNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // OBJECT_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.ObjectName = iprot.readString(); struct.setObjectNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // OBJECT_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.objectType = ai.heavy.thrift.server.TDBObjectType.findByValue(iprot.readI32()); struct.setObjectTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.permissions = new TDBObjectPermissions(); struct.permissions.read(iprot); struct.setPermissionsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, has_object_privilege_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.granteeName != null) { oprot.writeFieldBegin(GRANTEE_NAME_FIELD_DESC); oprot.writeString(struct.granteeName); oprot.writeFieldEnd(); } if (struct.ObjectName != null) { oprot.writeFieldBegin(OBJECT_NAME_FIELD_DESC); oprot.writeString(struct.ObjectName); oprot.writeFieldEnd(); } if (struct.objectType != null) { oprot.writeFieldBegin(OBJECT_TYPE_FIELD_DESC); oprot.writeI32(struct.objectType.getValue()); oprot.writeFieldEnd(); } if (struct.permissions != null) { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); struct.permissions.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class has_object_privilege_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public has_object_privilege_argsTupleScheme getScheme() { return new has_object_privilege_argsTupleScheme(); } } private static class has_object_privilege_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<has_object_privilege_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, has_object_privilege_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetGranteeName()) { optionals.set(1); } if (struct.isSetObjectName()) { optionals.set(2); } if (struct.isSetObjectType()) { optionals.set(3); } if (struct.isSetPermissions()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetGranteeName()) { oprot.writeString(struct.granteeName); } if (struct.isSetObjectName()) { oprot.writeString(struct.ObjectName); } if (struct.isSetObjectType()) { oprot.writeI32(struct.objectType.getValue()); } if (struct.isSetPermissions()) { struct.permissions.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, has_object_privilege_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.granteeName = iprot.readString(); struct.setGranteeNameIsSet(true); } if (incoming.get(2)) { struct.ObjectName = iprot.readString(); struct.setObjectNameIsSet(true); } if (incoming.get(3)) { struct.objectType = ai.heavy.thrift.server.TDBObjectType.findByValue(iprot.readI32()); struct.setObjectTypeIsSet(true); } if (incoming.get(4)) { struct.permissions = new TDBObjectPermissions(); struct.permissions.read(iprot); struct.setPermissionsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class has_object_privilege_result implements org.apache.thrift.TBase<has_object_privilege_result, has_object_privilege_result._Fields>, java.io.Serializable, Cloneable, Comparable<has_object_privilege_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("has_object_privilege_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new has_object_privilege_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new has_object_privilege_resultTupleSchemeFactory(); public boolean success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(has_object_privilege_result.class, metaDataMap); } public has_object_privilege_result() { } public has_object_privilege_result( boolean success, TDBException e) { this(); this.success = success; setSuccessIsSet(true); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public has_object_privilege_result(has_object_privilege_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetE()) { this.e = new TDBException(other.e); } } public has_object_privilege_result deepCopy() { return new has_object_privilege_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.e = null; } public boolean isSuccess() { return this.success; } public has_object_privilege_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public has_object_privilege_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.Boolean)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof has_object_privilege_result) return this.equals((has_object_privilege_result)that); return false; } public boolean equals(has_object_privilege_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((success) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(has_object_privilege_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("has_object_privilege_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class has_object_privilege_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public has_object_privilege_resultStandardScheme getScheme() { return new has_object_privilege_resultStandardScheme(); } } private static class has_object_privilege_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<has_object_privilege_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, has_object_privilege_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, has_object_privilege_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class has_object_privilege_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public has_object_privilege_resultTupleScheme getScheme() { return new has_object_privilege_resultTupleScheme(); } } private static class has_object_privilege_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<has_object_privilege_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, has_object_privilege_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, has_object_privilege_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_license_key_args implements org.apache.thrift.TBase<set_license_key_args, set_license_key_args._Fields>, java.io.Serializable, Cloneable, Comparable<set_license_key_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_license_key_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NONCE_FIELD_DESC = new org.apache.thrift.protocol.TField("nonce", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_license_key_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_license_key_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String key; // required public @org.apache.thrift.annotation.Nullable java.lang.String nonce; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), KEY((short)2, "key"), NONCE((short)3, "nonce"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // KEY return KEY; case 3: // NONCE return NONCE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NONCE, new org.apache.thrift.meta_data.FieldMetaData("nonce", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_license_key_args.class, metaDataMap); } public set_license_key_args() { this.nonce = ""; } public set_license_key_args( java.lang.String session, java.lang.String key, java.lang.String nonce) { this(); this.session = session; this.key = key; this.nonce = nonce; } /** * Performs a deep copy on <i>other</i>. */ public set_license_key_args(set_license_key_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetNonce()) { this.nonce = other.nonce; } } public set_license_key_args deepCopy() { return new set_license_key_args(this); } @Override public void clear() { this.session = null; this.key = null; this.nonce = ""; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public set_license_key_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getKey() { return this.key; } public set_license_key_args setKey(@org.apache.thrift.annotation.Nullable java.lang.String key) { this.key = key; return this; } public void unsetKey() { this.key = null; } /** Returns true if field key is set (has been assigned a value) and false otherwise */ public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getNonce() { return this.nonce; } public set_license_key_args setNonce(@org.apache.thrift.annotation.Nullable java.lang.String nonce) { this.nonce = nonce; return this; } public void unsetNonce() { this.nonce = null; } /** Returns true if field nonce is set (has been assigned a value) and false otherwise */ public boolean isSetNonce() { return this.nonce != null; } public void setNonceIsSet(boolean value) { if (!value) { this.nonce = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((java.lang.String)value); } break; case NONCE: if (value == null) { unsetNonce(); } else { setNonce((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case KEY: return getKey(); case NONCE: return getNonce(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case KEY: return isSetKey(); case NONCE: return isSetNonce(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_license_key_args) return this.equals((set_license_key_args)that); return false; } public boolean equals(set_license_key_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_nonce = true && this.isSetNonce(); boolean that_present_nonce = true && that.isSetNonce(); if (this_present_nonce || that_present_nonce) { if (!(this_present_nonce && that_present_nonce)) return false; if (!this.nonce.equals(that.nonce)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetKey()) ? 131071 : 524287); if (isSetKey()) hashCode = hashCode * 8191 + key.hashCode(); hashCode = hashCode * 8191 + ((isSetNonce()) ? 131071 : 524287); if (isSetNonce()) hashCode = hashCode * 8191 + nonce.hashCode(); return hashCode; } @Override public int compareTo(set_license_key_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetKey(), other.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNonce(), other.isSetNonce()); if (lastComparison != 0) { return lastComparison; } if (isSetNonce()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonce, other.nonce); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_license_key_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("nonce:"); if (this.nonce == null) { sb.append("null"); } else { sb.append(this.nonce); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_license_key_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_license_key_argsStandardScheme getScheme() { return new set_license_key_argsStandardScheme(); } } private static class set_license_key_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_license_key_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_license_key_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NONCE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.nonce = iprot.readString(); struct.setNonceIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_license_key_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } if (struct.nonce != null) { oprot.writeFieldBegin(NONCE_FIELD_DESC); oprot.writeString(struct.nonce); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_license_key_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_license_key_argsTupleScheme getScheme() { return new set_license_key_argsTupleScheme(); } } private static class set_license_key_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_license_key_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_license_key_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetKey()) { optionals.set(1); } if (struct.isSetNonce()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetKey()) { oprot.writeString(struct.key); } if (struct.isSetNonce()) { oprot.writeString(struct.nonce); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_license_key_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(2)) { struct.nonce = iprot.readString(); struct.setNonceIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class set_license_key_result implements org.apache.thrift.TBase<set_license_key_result, set_license_key_result._Fields>, java.io.Serializable, Cloneable, Comparable<set_license_key_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_license_key_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new set_license_key_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new set_license_key_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TLicenseInfo success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TLicenseInfo.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_license_key_result.class, metaDataMap); } public set_license_key_result() { } public set_license_key_result( TLicenseInfo success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public set_license_key_result(set_license_key_result other) { if (other.isSetSuccess()) { this.success = new TLicenseInfo(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public set_license_key_result deepCopy() { return new set_license_key_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TLicenseInfo getSuccess() { return this.success; } public set_license_key_result setSuccess(@org.apache.thrift.annotation.Nullable TLicenseInfo success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public set_license_key_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TLicenseInfo)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof set_license_key_result) return this.equals((set_license_key_result)that); return false; } public boolean equals(set_license_key_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(set_license_key_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("set_license_key_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_license_key_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_license_key_resultStandardScheme getScheme() { return new set_license_key_resultStandardScheme(); } } private static class set_license_key_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<set_license_key_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_license_key_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TLicenseInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_license_key_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_license_key_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public set_license_key_resultTupleScheme getScheme() { return new set_license_key_resultTupleScheme(); } } private static class set_license_key_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<set_license_key_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_license_key_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_license_key_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TLicenseInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_license_claims_args implements org.apache.thrift.TBase<get_license_claims_args, get_license_claims_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_license_claims_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_license_claims_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField NONCE_FIELD_DESC = new org.apache.thrift.protocol.TField("nonce", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_license_claims_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_license_claims_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.lang.String nonce; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), NONCE((short)2, "nonce"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // NONCE return NONCE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.NONCE, new org.apache.thrift.meta_data.FieldMetaData("nonce", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_license_claims_args.class, metaDataMap); } public get_license_claims_args() { this.nonce = ""; } public get_license_claims_args( java.lang.String session, java.lang.String nonce) { this(); this.session = session; this.nonce = nonce; } /** * Performs a deep copy on <i>other</i>. */ public get_license_claims_args(get_license_claims_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetNonce()) { this.nonce = other.nonce; } } public get_license_claims_args deepCopy() { return new get_license_claims_args(this); } @Override public void clear() { this.session = null; this.nonce = ""; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_license_claims_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getNonce() { return this.nonce; } public get_license_claims_args setNonce(@org.apache.thrift.annotation.Nullable java.lang.String nonce) { this.nonce = nonce; return this; } public void unsetNonce() { this.nonce = null; } /** Returns true if field nonce is set (has been assigned a value) and false otherwise */ public boolean isSetNonce() { return this.nonce != null; } public void setNonceIsSet(boolean value) { if (!value) { this.nonce = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case NONCE: if (value == null) { unsetNonce(); } else { setNonce((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case NONCE: return getNonce(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case NONCE: return isSetNonce(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_license_claims_args) return this.equals((get_license_claims_args)that); return false; } public boolean equals(get_license_claims_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_nonce = true && this.isSetNonce(); boolean that_present_nonce = true && that.isSetNonce(); if (this_present_nonce || that_present_nonce) { if (!(this_present_nonce && that_present_nonce)) return false; if (!this.nonce.equals(that.nonce)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetNonce()) ? 131071 : 524287); if (isSetNonce()) hashCode = hashCode * 8191 + nonce.hashCode(); return hashCode; } @Override public int compareTo(get_license_claims_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNonce(), other.isSetNonce()); if (lastComparison != 0) { return lastComparison; } if (isSetNonce()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonce, other.nonce); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_license_claims_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("nonce:"); if (this.nonce == null) { sb.append("null"); } else { sb.append(this.nonce); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_license_claims_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_license_claims_argsStandardScheme getScheme() { return new get_license_claims_argsStandardScheme(); } } private static class get_license_claims_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_license_claims_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_license_claims_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NONCE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.nonce = iprot.readString(); struct.setNonceIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_license_claims_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.nonce != null) { oprot.writeFieldBegin(NONCE_FIELD_DESC); oprot.writeString(struct.nonce); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_license_claims_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_license_claims_argsTupleScheme getScheme() { return new get_license_claims_argsTupleScheme(); } } private static class get_license_claims_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_license_claims_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_license_claims_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetNonce()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetNonce()) { oprot.writeString(struct.nonce); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_license_claims_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { struct.nonce = iprot.readString(); struct.setNonceIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_license_claims_result implements org.apache.thrift.TBase<get_license_claims_result, get_license_claims_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_license_claims_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_license_claims_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_license_claims_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_license_claims_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TLicenseInfo success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TLicenseInfo.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_license_claims_result.class, metaDataMap); } public get_license_claims_result() { } public get_license_claims_result( TLicenseInfo success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_license_claims_result(get_license_claims_result other) { if (other.isSetSuccess()) { this.success = new TLicenseInfo(other.success); } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_license_claims_result deepCopy() { return new get_license_claims_result(this); } @Override public void clear() { this.success = null; this.e = null; } @org.apache.thrift.annotation.Nullable public TLicenseInfo getSuccess() { return this.success; } public get_license_claims_result setSuccess(@org.apache.thrift.annotation.Nullable TLicenseInfo success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_license_claims_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TLicenseInfo)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_license_claims_result) return this.equals((get_license_claims_result)that); return false; } public boolean equals(get_license_claims_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_license_claims_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_license_claims_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_license_claims_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_license_claims_resultStandardScheme getScheme() { return new get_license_claims_resultStandardScheme(); } } private static class get_license_claims_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_license_claims_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_license_claims_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TLicenseInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_license_claims_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_license_claims_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_license_claims_resultTupleScheme getScheme() { return new get_license_claims_resultTupleScheme(); } } private static class get_license_claims_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_license_claims_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_license_claims_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_license_claims_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TLicenseInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_device_parameters_args implements org.apache.thrift.TBase<get_device_parameters_args, get_device_parameters_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_device_parameters_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_device_parameters_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_device_parameters_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_device_parameters_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_device_parameters_args.class, metaDataMap); } public get_device_parameters_args() { } public get_device_parameters_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_device_parameters_args(get_device_parameters_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_device_parameters_args deepCopy() { return new get_device_parameters_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_device_parameters_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_device_parameters_args) return this.equals((get_device_parameters_args)that); return false; } public boolean equals(get_device_parameters_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_device_parameters_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_device_parameters_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_device_parameters_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_device_parameters_argsStandardScheme getScheme() { return new get_device_parameters_argsStandardScheme(); } } private static class get_device_parameters_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_device_parameters_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_device_parameters_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_device_parameters_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_device_parameters_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_device_parameters_argsTupleScheme getScheme() { return new get_device_parameters_argsTupleScheme(); } } private static class get_device_parameters_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_device_parameters_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_device_parameters_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_device_parameters_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_device_parameters_result implements org.apache.thrift.TBase<get_device_parameters_result, get_device_parameters_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_device_parameters_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_device_parameters_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_device_parameters_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_device_parameters_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_device_parameters_result.class, metaDataMap); } public get_device_parameters_result() { } public get_device_parameters_result( java.util.Map<java.lang.String,java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_device_parameters_result(get_device_parameters_result other) { if (other.isSetSuccess()) { java.util.Map<java.lang.String,java.lang.String> __this__success = new java.util.HashMap<java.lang.String,java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_device_parameters_result deepCopy() { return new get_device_parameters_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(java.lang.String key, java.lang.String val) { if (this.success == null) { this.success = new java.util.HashMap<java.lang.String,java.lang.String>(); } this.success.put(key, val); } @org.apache.thrift.annotation.Nullable public java.util.Map<java.lang.String,java.lang.String> getSuccess() { return this.success; } public get_device_parameters_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_device_parameters_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.Map<java.lang.String,java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_device_parameters_result) return this.equals((get_device_parameters_result)that); return false; } public boolean equals(get_device_parameters_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_device_parameters_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_device_parameters_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_device_parameters_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_device_parameters_resultStandardScheme getScheme() { return new get_device_parameters_resultStandardScheme(); } } private static class get_device_parameters_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_device_parameters_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_device_parameters_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map748 = iprot.readMapBegin(); struct.success = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map748.size); @org.apache.thrift.annotation.Nullable java.lang.String _key749; @org.apache.thrift.annotation.Nullable java.lang.String _val750; for (int _i751 = 0; _i751 < _map748.size; ++_i751) { _key749 = iprot.readString(); _val750 = iprot.readString(); struct.success.put(_key749, _val750); } iprot.readMapEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_device_parameters_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter752 : struct.success.entrySet()) { oprot.writeString(_iter752.getKey()); oprot.writeString(_iter752.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_device_parameters_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_device_parameters_resultTupleScheme getScheme() { return new get_device_parameters_resultTupleScheme(); } } private static class get_device_parameters_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_device_parameters_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_device_parameters_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter753 : struct.success.entrySet()) { oprot.writeString(_iter753.getKey()); oprot.writeString(_iter753.getValue()); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_device_parameters_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map754 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map754.size); @org.apache.thrift.annotation.Nullable java.lang.String _key755; @org.apache.thrift.annotation.Nullable java.lang.String _val756; for (int _i757 = 0; _i757 < _map754.size; ++_i757) { _key755 = iprot.readString(); _val756 = iprot.readString(); struct.success.put(_key755, _val756); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class register_runtime_extension_functions_args implements org.apache.thrift.TBase<register_runtime_extension_functions_args, register_runtime_extension_functions_args._Fields>, java.io.Serializable, Cloneable, Comparable<register_runtime_extension_functions_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("register_runtime_extension_functions_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField UDFS_FIELD_DESC = new org.apache.thrift.protocol.TField("udfs", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField UDTFS_FIELD_DESC = new org.apache.thrift.protocol.TField("udtfs", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField DEVICE_IR_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("device_ir_map", org.apache.thrift.protocol.TType.MAP, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new register_runtime_extension_functions_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new register_runtime_extension_functions_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs; // required public @org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs; // required public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> device_ir_map; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), UDFS((short)2, "udfs"), UDTFS((short)3, "udtfs"), DEVICE_IR_MAP((short)4, "device_ir_map"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // UDFS return UDFS; case 3: // UDTFS return UDTFS; case 4: // DEVICE_IR_MAP return DEVICE_IR_MAP; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.UDFS, new org.apache.thrift.meta_data.FieldMetaData("udfs", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ai.heavy.thrift.calciteserver.TUserDefinedFunction.class)))); tmpMap.put(_Fields.UDTFS, new org.apache.thrift.meta_data.FieldMetaData("udtfs", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ai.heavy.thrift.calciteserver.TUserDefinedTableFunction.class)))); tmpMap.put(_Fields.DEVICE_IR_MAP, new org.apache.thrift.meta_data.FieldMetaData("device_ir_map", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(register_runtime_extension_functions_args.class, metaDataMap); } public register_runtime_extension_functions_args() { } public register_runtime_extension_functions_args( java.lang.String session, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs, java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs, java.util.Map<java.lang.String,java.lang.String> device_ir_map) { this(); this.session = session; this.udfs = udfs; this.udtfs = udtfs; this.device_ir_map = device_ir_map; } /** * Performs a deep copy on <i>other</i>. */ public register_runtime_extension_functions_args(register_runtime_extension_functions_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetUdfs()) { java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> __this__udfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(other.udfs.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedFunction other_element : other.udfs) { __this__udfs.add(new ai.heavy.thrift.calciteserver.TUserDefinedFunction(other_element)); } this.udfs = __this__udfs; } if (other.isSetUdtfs()) { java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> __this__udtfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(other.udtfs.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedTableFunction other_element : other.udtfs) { __this__udtfs.add(new ai.heavy.thrift.calciteserver.TUserDefinedTableFunction(other_element)); } this.udtfs = __this__udtfs; } if (other.isSetDevice_ir_map()) { java.util.Map<java.lang.String,java.lang.String> __this__device_ir_map = new java.util.HashMap<java.lang.String,java.lang.String>(other.device_ir_map); this.device_ir_map = __this__device_ir_map; } } public register_runtime_extension_functions_args deepCopy() { return new register_runtime_extension_functions_args(this); } @Override public void clear() { this.session = null; this.udfs = null; this.udtfs = null; this.device_ir_map = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public register_runtime_extension_functions_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getUdfsSize() { return (this.udfs == null) ? 0 : this.udfs.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<ai.heavy.thrift.calciteserver.TUserDefinedFunction> getUdfsIterator() { return (this.udfs == null) ? null : this.udfs.iterator(); } public void addToUdfs(ai.heavy.thrift.calciteserver.TUserDefinedFunction elem) { if (this.udfs == null) { this.udfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(); } this.udfs.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> getUdfs() { return this.udfs; } public register_runtime_extension_functions_args setUdfs(@org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> udfs) { this.udfs = udfs; return this; } public void unsetUdfs() { this.udfs = null; } /** Returns true if field udfs is set (has been assigned a value) and false otherwise */ public boolean isSetUdfs() { return this.udfs != null; } public void setUdfsIsSet(boolean value) { if (!value) { this.udfs = null; } } public int getUdtfsSize() { return (this.udtfs == null) ? 0 : this.udtfs.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> getUdtfsIterator() { return (this.udtfs == null) ? null : this.udtfs.iterator(); } public void addToUdtfs(ai.heavy.thrift.calciteserver.TUserDefinedTableFunction elem) { if (this.udtfs == null) { this.udtfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(); } this.udtfs.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> getUdtfs() { return this.udtfs; } public register_runtime_extension_functions_args setUdtfs(@org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> udtfs) { this.udtfs = udtfs; return this; } public void unsetUdtfs() { this.udtfs = null; } /** Returns true if field udtfs is set (has been assigned a value) and false otherwise */ public boolean isSetUdtfs() { return this.udtfs != null; } public void setUdtfsIsSet(boolean value) { if (!value) { this.udtfs = null; } } public int getDevice_ir_mapSize() { return (this.device_ir_map == null) ? 0 : this.device_ir_map.size(); } public void putToDevice_ir_map(java.lang.String key, java.lang.String val) { if (this.device_ir_map == null) { this.device_ir_map = new java.util.HashMap<java.lang.String,java.lang.String>(); } this.device_ir_map.put(key, val); } @org.apache.thrift.annotation.Nullable public java.util.Map<java.lang.String,java.lang.String> getDevice_ir_map() { return this.device_ir_map; } public register_runtime_extension_functions_args setDevice_ir_map(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> device_ir_map) { this.device_ir_map = device_ir_map; return this; } public void unsetDevice_ir_map() { this.device_ir_map = null; } /** Returns true if field device_ir_map is set (has been assigned a value) and false otherwise */ public boolean isSetDevice_ir_map() { return this.device_ir_map != null; } public void setDevice_ir_mapIsSet(boolean value) { if (!value) { this.device_ir_map = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case UDFS: if (value == null) { unsetUdfs(); } else { setUdfs((java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>)value); } break; case UDTFS: if (value == null) { unsetUdtfs(); } else { setUdtfs((java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>)value); } break; case DEVICE_IR_MAP: if (value == null) { unsetDevice_ir_map(); } else { setDevice_ir_map((java.util.Map<java.lang.String,java.lang.String>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case UDFS: return getUdfs(); case UDTFS: return getUdtfs(); case DEVICE_IR_MAP: return getDevice_ir_map(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case UDFS: return isSetUdfs(); case UDTFS: return isSetUdtfs(); case DEVICE_IR_MAP: return isSetDevice_ir_map(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof register_runtime_extension_functions_args) return this.equals((register_runtime_extension_functions_args)that); return false; } public boolean equals(register_runtime_extension_functions_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_udfs = true && this.isSetUdfs(); boolean that_present_udfs = true && that.isSetUdfs(); if (this_present_udfs || that_present_udfs) { if (!(this_present_udfs && that_present_udfs)) return false; if (!this.udfs.equals(that.udfs)) return false; } boolean this_present_udtfs = true && this.isSetUdtfs(); boolean that_present_udtfs = true && that.isSetUdtfs(); if (this_present_udtfs || that_present_udtfs) { if (!(this_present_udtfs && that_present_udtfs)) return false; if (!this.udtfs.equals(that.udtfs)) return false; } boolean this_present_device_ir_map = true && this.isSetDevice_ir_map(); boolean that_present_device_ir_map = true && that.isSetDevice_ir_map(); if (this_present_device_ir_map || that_present_device_ir_map) { if (!(this_present_device_ir_map && that_present_device_ir_map)) return false; if (!this.device_ir_map.equals(that.device_ir_map)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetUdfs()) ? 131071 : 524287); if (isSetUdfs()) hashCode = hashCode * 8191 + udfs.hashCode(); hashCode = hashCode * 8191 + ((isSetUdtfs()) ? 131071 : 524287); if (isSetUdtfs()) hashCode = hashCode * 8191 + udtfs.hashCode(); hashCode = hashCode * 8191 + ((isSetDevice_ir_map()) ? 131071 : 524287); if (isSetDevice_ir_map()) hashCode = hashCode * 8191 + device_ir_map.hashCode(); return hashCode; } @Override public int compareTo(register_runtime_extension_functions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetUdfs(), other.isSetUdfs()); if (lastComparison != 0) { return lastComparison; } if (isSetUdfs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.udfs, other.udfs); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetUdtfs(), other.isSetUdtfs()); if (lastComparison != 0) { return lastComparison; } if (isSetUdtfs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.udtfs, other.udtfs); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDevice_ir_map(), other.isSetDevice_ir_map()); if (lastComparison != 0) { return lastComparison; } if (isSetDevice_ir_map()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.device_ir_map, other.device_ir_map); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("register_runtime_extension_functions_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("udfs:"); if (this.udfs == null) { sb.append("null"); } else { sb.append(this.udfs); } first = false; if (!first) sb.append(", "); sb.append("udtfs:"); if (this.udtfs == null) { sb.append("null"); } else { sb.append(this.udtfs); } first = false; if (!first) sb.append(", "); sb.append("device_ir_map:"); if (this.device_ir_map == null) { sb.append("null"); } else { sb.append(this.device_ir_map); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class register_runtime_extension_functions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public register_runtime_extension_functions_argsStandardScheme getScheme() { return new register_runtime_extension_functions_argsStandardScheme(); } } private static class register_runtime_extension_functions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<register_runtime_extension_functions_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, register_runtime_extension_functions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // UDFS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list758 = iprot.readListBegin(); struct.udfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(_list758.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedFunction _elem759; for (int _i760 = 0; _i760 < _list758.size; ++_i760) { _elem759 = new ai.heavy.thrift.calciteserver.TUserDefinedFunction(); _elem759.read(iprot); struct.udfs.add(_elem759); } iprot.readListEnd(); } struct.setUdfsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // UDTFS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list761 = iprot.readListBegin(); struct.udtfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(_list761.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _elem762; for (int _i763 = 0; _i763 < _list761.size; ++_i763) { _elem762 = new ai.heavy.thrift.calciteserver.TUserDefinedTableFunction(); _elem762.read(iprot); struct.udtfs.add(_elem762); } iprot.readListEnd(); } struct.setUdtfsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DEVICE_IR_MAP if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map764 = iprot.readMapBegin(); struct.device_ir_map = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map764.size); @org.apache.thrift.annotation.Nullable java.lang.String _key765; @org.apache.thrift.annotation.Nullable java.lang.String _val766; for (int _i767 = 0; _i767 < _map764.size; ++_i767) { _key765 = iprot.readString(); _val766 = iprot.readString(); struct.device_ir_map.put(_key765, _val766); } iprot.readMapEnd(); } struct.setDevice_ir_mapIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, register_runtime_extension_functions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.udfs != null) { oprot.writeFieldBegin(UDFS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.udfs.size())); for (ai.heavy.thrift.calciteserver.TUserDefinedFunction _iter768 : struct.udfs) { _iter768.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.udtfs != null) { oprot.writeFieldBegin(UDTFS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.udtfs.size())); for (ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _iter769 : struct.udtfs) { _iter769.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.device_ir_map != null) { oprot.writeFieldBegin(DEVICE_IR_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.device_ir_map.size())); for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter770 : struct.device_ir_map.entrySet()) { oprot.writeString(_iter770.getKey()); oprot.writeString(_iter770.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class register_runtime_extension_functions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public register_runtime_extension_functions_argsTupleScheme getScheme() { return new register_runtime_extension_functions_argsTupleScheme(); } } private static class register_runtime_extension_functions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<register_runtime_extension_functions_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, register_runtime_extension_functions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetUdfs()) { optionals.set(1); } if (struct.isSetUdtfs()) { optionals.set(2); } if (struct.isSetDevice_ir_map()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetUdfs()) { { oprot.writeI32(struct.udfs.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedFunction _iter771 : struct.udfs) { _iter771.write(oprot); } } } if (struct.isSetUdtfs()) { { oprot.writeI32(struct.udtfs.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _iter772 : struct.udtfs) { _iter772.write(oprot); } } } if (struct.isSetDevice_ir_map()) { { oprot.writeI32(struct.device_ir_map.size()); for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter773 : struct.device_ir_map.entrySet()) { oprot.writeString(_iter773.getKey()); oprot.writeString(_iter773.getValue()); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, register_runtime_extension_functions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list774 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.udfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(_list774.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedFunction _elem775; for (int _i776 = 0; _i776 < _list774.size; ++_i776) { _elem775 = new ai.heavy.thrift.calciteserver.TUserDefinedFunction(); _elem775.read(iprot); struct.udfs.add(_elem775); } } struct.setUdfsIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list777 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.udtfs = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(_list777.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _elem778; for (int _i779 = 0; _i779 < _list777.size; ++_i779) { _elem778 = new ai.heavy.thrift.calciteserver.TUserDefinedTableFunction(); _elem778.read(iprot); struct.udtfs.add(_elem778); } } struct.setUdtfsIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TMap _map780 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); struct.device_ir_map = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map780.size); @org.apache.thrift.annotation.Nullable java.lang.String _key781; @org.apache.thrift.annotation.Nullable java.lang.String _val782; for (int _i783 = 0; _i783 < _map780.size; ++_i783) { _key781 = iprot.readString(); _val782 = iprot.readString(); struct.device_ir_map.put(_key781, _val782); } } struct.setDevice_ir_mapIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class register_runtime_extension_functions_result implements org.apache.thrift.TBase<register_runtime_extension_functions_result, register_runtime_extension_functions_result._Fields>, java.io.Serializable, Cloneable, Comparable<register_runtime_extension_functions_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("register_runtime_extension_functions_result"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new register_runtime_extension_functions_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new register_runtime_extension_functions_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(register_runtime_extension_functions_result.class, metaDataMap); } public register_runtime_extension_functions_result() { } public register_runtime_extension_functions_result( TDBException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public register_runtime_extension_functions_result(register_runtime_extension_functions_result other) { if (other.isSetE()) { this.e = new TDBException(other.e); } } public register_runtime_extension_functions_result deepCopy() { return new register_runtime_extension_functions_result(this); } @Override public void clear() { this.e = null; } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public register_runtime_extension_functions_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof register_runtime_extension_functions_result) return this.equals((register_runtime_extension_functions_result)that); return false; } public boolean equals(register_runtime_extension_functions_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(register_runtime_extension_functions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("register_runtime_extension_functions_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class register_runtime_extension_functions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public register_runtime_extension_functions_resultStandardScheme getScheme() { return new register_runtime_extension_functions_resultStandardScheme(); } } private static class register_runtime_extension_functions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<register_runtime_extension_functions_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, register_runtime_extension_functions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, register_runtime_extension_functions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class register_runtime_extension_functions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public register_runtime_extension_functions_resultTupleScheme getScheme() { return new register_runtime_extension_functions_resultTupleScheme(); } } private static class register_runtime_extension_functions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<register_runtime_extension_functions_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, register_runtime_extension_functions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, register_runtime_extension_functions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_function_names_args implements org.apache.thrift.TBase<get_table_function_names_args, get_table_function_names_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_function_names_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_function_names_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_function_names_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_function_names_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_function_names_args.class, metaDataMap); } public get_table_function_names_args() { } public get_table_function_names_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_table_function_names_args(get_table_function_names_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_table_function_names_args deepCopy() { return new get_table_function_names_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_table_function_names_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_function_names_args) return this.equals((get_table_function_names_args)that); return false; } public boolean equals(get_table_function_names_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_table_function_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_function_names_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_function_names_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_function_names_argsStandardScheme getScheme() { return new get_table_function_names_argsStandardScheme(); } } private static class get_table_function_names_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_function_names_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_function_names_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_function_names_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_function_names_argsTupleScheme getScheme() { return new get_table_function_names_argsTupleScheme(); } } private static class get_table_function_names_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_function_names_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_function_names_result implements org.apache.thrift.TBase<get_table_function_names_result, get_table_function_names_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_function_names_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_function_names_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_function_names_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_function_names_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_function_names_result.class, metaDataMap); } public get_table_function_names_result() { } public get_table_function_names_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_table_function_names_result(get_table_function_names_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_table_function_names_result deepCopy() { return new get_table_function_names_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_table_function_names_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_table_function_names_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_function_names_result) return this.equals((get_table_function_names_result)that); return false; } public boolean equals(get_table_function_names_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_table_function_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_function_names_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_function_names_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_function_names_resultStandardScheme getScheme() { return new get_table_function_names_resultStandardScheme(); } } private static class get_table_function_names_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_function_names_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list784 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list784.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem785; for (int _i786 = 0; _i786 < _list784.size; ++_i786) { _elem785 = iprot.readString(); struct.success.add(_elem785); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_function_names_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter787 : struct.success) { oprot.writeString(_iter787); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_function_names_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_function_names_resultTupleScheme getScheme() { return new get_table_function_names_resultTupleScheme(); } } private static class get_table_function_names_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_function_names_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter788 : struct.success) { oprot.writeString(_iter788); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list789 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list789.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem790; for (int _i791 = 0; _i791 < _list789.size; ++_i791) { _elem790 = iprot.readString(); struct.success.add(_elem790); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_runtime_table_function_names_args implements org.apache.thrift.TBase<get_runtime_table_function_names_args, get_runtime_table_function_names_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_runtime_table_function_names_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_runtime_table_function_names_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_runtime_table_function_names_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_runtime_table_function_names_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_runtime_table_function_names_args.class, metaDataMap); } public get_runtime_table_function_names_args() { } public get_runtime_table_function_names_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_runtime_table_function_names_args(get_runtime_table_function_names_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_runtime_table_function_names_args deepCopy() { return new get_runtime_table_function_names_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_runtime_table_function_names_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_runtime_table_function_names_args) return this.equals((get_runtime_table_function_names_args)that); return false; } public boolean equals(get_runtime_table_function_names_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_runtime_table_function_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_runtime_table_function_names_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_runtime_table_function_names_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_runtime_table_function_names_argsStandardScheme getScheme() { return new get_runtime_table_function_names_argsStandardScheme(); } } private static class get_runtime_table_function_names_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_runtime_table_function_names_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_runtime_table_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_runtime_table_function_names_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_runtime_table_function_names_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_runtime_table_function_names_argsTupleScheme getScheme() { return new get_runtime_table_function_names_argsTupleScheme(); } } private static class get_runtime_table_function_names_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_runtime_table_function_names_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_runtime_table_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_runtime_table_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_runtime_table_function_names_result implements org.apache.thrift.TBase<get_runtime_table_function_names_result, get_runtime_table_function_names_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_runtime_table_function_names_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_runtime_table_function_names_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_runtime_table_function_names_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_runtime_table_function_names_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_runtime_table_function_names_result.class, metaDataMap); } public get_runtime_table_function_names_result() { } public get_runtime_table_function_names_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_runtime_table_function_names_result(get_runtime_table_function_names_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_runtime_table_function_names_result deepCopy() { return new get_runtime_table_function_names_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_runtime_table_function_names_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_runtime_table_function_names_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_runtime_table_function_names_result) return this.equals((get_runtime_table_function_names_result)that); return false; } public boolean equals(get_runtime_table_function_names_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_runtime_table_function_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_runtime_table_function_names_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_runtime_table_function_names_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_runtime_table_function_names_resultStandardScheme getScheme() { return new get_runtime_table_function_names_resultStandardScheme(); } } private static class get_runtime_table_function_names_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_runtime_table_function_names_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_runtime_table_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list792 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list792.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem793; for (int _i794 = 0; _i794 < _list792.size; ++_i794) { _elem793 = iprot.readString(); struct.success.add(_elem793); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_runtime_table_function_names_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter795 : struct.success) { oprot.writeString(_iter795); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_runtime_table_function_names_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_runtime_table_function_names_resultTupleScheme getScheme() { return new get_runtime_table_function_names_resultTupleScheme(); } } private static class get_runtime_table_function_names_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_runtime_table_function_names_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_runtime_table_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter796 : struct.success) { oprot.writeString(_iter796); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_runtime_table_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list797 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list797.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem798; for (int _i799 = 0; _i799 < _list797.size; ++_i799) { _elem798 = iprot.readString(); struct.success.add(_elem798); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_function_details_args implements org.apache.thrift.TBase<get_table_function_details_args, get_table_function_details_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_function_details_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_function_details_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField UDTF_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("udtf_names", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_function_details_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_function_details_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> udtf_names; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), UDTF_NAMES((short)2, "udtf_names"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // UDTF_NAMES return UDTF_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.UDTF_NAMES, new org.apache.thrift.meta_data.FieldMetaData("udtf_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_function_details_args.class, metaDataMap); } public get_table_function_details_args() { } public get_table_function_details_args( java.lang.String session, java.util.List<java.lang.String> udtf_names) { this(); this.session = session; this.udtf_names = udtf_names; } /** * Performs a deep copy on <i>other</i>. */ public get_table_function_details_args(get_table_function_details_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetUdtf_names()) { java.util.List<java.lang.String> __this__udtf_names = new java.util.ArrayList<java.lang.String>(other.udtf_names); this.udtf_names = __this__udtf_names; } } public get_table_function_details_args deepCopy() { return new get_table_function_details_args(this); } @Override public void clear() { this.session = null; this.udtf_names = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_table_function_details_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getUdtf_namesSize() { return (this.udtf_names == null) ? 0 : this.udtf_names.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getUdtf_namesIterator() { return (this.udtf_names == null) ? null : this.udtf_names.iterator(); } public void addToUdtf_names(java.lang.String elem) { if (this.udtf_names == null) { this.udtf_names = new java.util.ArrayList<java.lang.String>(); } this.udtf_names.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getUdtf_names() { return this.udtf_names; } public get_table_function_details_args setUdtf_names(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> udtf_names) { this.udtf_names = udtf_names; return this; } public void unsetUdtf_names() { this.udtf_names = null; } /** Returns true if field udtf_names is set (has been assigned a value) and false otherwise */ public boolean isSetUdtf_names() { return this.udtf_names != null; } public void setUdtf_namesIsSet(boolean value) { if (!value) { this.udtf_names = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case UDTF_NAMES: if (value == null) { unsetUdtf_names(); } else { setUdtf_names((java.util.List<java.lang.String>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case UDTF_NAMES: return getUdtf_names(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case UDTF_NAMES: return isSetUdtf_names(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_function_details_args) return this.equals((get_table_function_details_args)that); return false; } public boolean equals(get_table_function_details_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_udtf_names = true && this.isSetUdtf_names(); boolean that_present_udtf_names = true && that.isSetUdtf_names(); if (this_present_udtf_names || that_present_udtf_names) { if (!(this_present_udtf_names && that_present_udtf_names)) return false; if (!this.udtf_names.equals(that.udtf_names)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetUdtf_names()) ? 131071 : 524287); if (isSetUdtf_names()) hashCode = hashCode * 8191 + udtf_names.hashCode(); return hashCode; } @Override public int compareTo(get_table_function_details_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetUdtf_names(), other.isSetUdtf_names()); if (lastComparison != 0) { return lastComparison; } if (isSetUdtf_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.udtf_names, other.udtf_names); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_function_details_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("udtf_names:"); if (this.udtf_names == null) { sb.append("null"); } else { sb.append(this.udtf_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_function_details_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_function_details_argsStandardScheme getScheme() { return new get_table_function_details_argsStandardScheme(); } } private static class get_table_function_details_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_function_details_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_function_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // UDTF_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list800 = iprot.readListBegin(); struct.udtf_names = new java.util.ArrayList<java.lang.String>(_list800.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem801; for (int _i802 = 0; _i802 < _list800.size; ++_i802) { _elem801 = iprot.readString(); struct.udtf_names.add(_elem801); } iprot.readListEnd(); } struct.setUdtf_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_function_details_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.udtf_names != null) { oprot.writeFieldBegin(UDTF_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.udtf_names.size())); for (java.lang.String _iter803 : struct.udtf_names) { oprot.writeString(_iter803); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_function_details_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_function_details_argsTupleScheme getScheme() { return new get_table_function_details_argsTupleScheme(); } } private static class get_table_function_details_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_function_details_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_function_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetUdtf_names()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetUdtf_names()) { { oprot.writeI32(struct.udtf_names.size()); for (java.lang.String _iter804 : struct.udtf_names) { oprot.writeString(_iter804); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_function_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list805 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.udtf_names = new java.util.ArrayList<java.lang.String>(_list805.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem806; for (int _i807 = 0; _i807 < _list805.size; ++_i807) { _elem806 = iprot.readString(); struct.udtf_names.add(_elem806); } } struct.setUdtf_namesIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_table_function_details_result implements org.apache.thrift.TBase<get_table_function_details_result, get_table_function_details_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_function_details_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_function_details_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_table_function_details_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_table_function_details_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ai.heavy.thrift.calciteserver.TUserDefinedTableFunction.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_function_details_result.class, metaDataMap); } public get_table_function_details_result() { } public get_table_function_details_result( java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_table_function_details_result(get_table_function_details_result other) { if (other.isSetSuccess()) { java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> __this__success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(other.success.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedTableFunction other_element : other.success) { __this__success.add(new ai.heavy.thrift.calciteserver.TUserDefinedTableFunction(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_table_function_details_result deepCopy() { return new get_table_function_details_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(ai.heavy.thrift.calciteserver.TUserDefinedTableFunction elem) { if (this.success == null) { this.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> getSuccess() { return this.success; } public get_table_function_details_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_table_function_details_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_table_function_details_result) return this.equals((get_table_function_details_result)that); return false; } public boolean equals(get_table_function_details_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_table_function_details_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_table_function_details_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_function_details_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_function_details_resultStandardScheme getScheme() { return new get_table_function_details_resultStandardScheme(); } } private static class get_table_function_details_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_table_function_details_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_function_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list808 = iprot.readListBegin(); struct.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(_list808.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _elem809; for (int _i810 = 0; _i810 < _list808.size; ++_i810) { _elem809 = new ai.heavy.thrift.calciteserver.TUserDefinedTableFunction(); _elem809.read(iprot); struct.success.add(_elem809); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_function_details_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _iter811 : struct.success) { _iter811.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_function_details_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_table_function_details_resultTupleScheme getScheme() { return new get_table_function_details_resultTupleScheme(); } } private static class get_table_function_details_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_table_function_details_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_function_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _iter812 : struct.success) { _iter812.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_function_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list813 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedTableFunction>(_list813.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedTableFunction _elem814; for (int _i815 = 0; _i815 < _list813.size; ++_i815) { _elem814 = new ai.heavy.thrift.calciteserver.TUserDefinedTableFunction(); _elem814.read(iprot); struct.success.add(_elem814); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_function_names_args implements org.apache.thrift.TBase<get_function_names_args, get_function_names_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_function_names_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_function_names_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_function_names_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_function_names_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_names_args.class, metaDataMap); } public get_function_names_args() { } public get_function_names_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_function_names_args(get_function_names_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_function_names_args deepCopy() { return new get_function_names_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_function_names_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_function_names_args) return this.equals((get_function_names_args)that); return false; } public boolean equals(get_function_names_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_function_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_function_names_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_function_names_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_function_names_argsStandardScheme getScheme() { return new get_function_names_argsStandardScheme(); } } private static class get_function_names_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_function_names_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_function_names_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_function_names_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_function_names_argsTupleScheme getScheme() { return new get_function_names_argsTupleScheme(); } } private static class get_function_names_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_function_names_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_function_names_result implements org.apache.thrift.TBase<get_function_names_result, get_function_names_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_function_names_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_function_names_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_function_names_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_function_names_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_names_result.class, metaDataMap); } public get_function_names_result() { } public get_function_names_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_function_names_result(get_function_names_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_function_names_result deepCopy() { return new get_function_names_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_function_names_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_function_names_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_function_names_result) return this.equals((get_function_names_result)that); return false; } public boolean equals(get_function_names_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_function_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_function_names_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_function_names_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_function_names_resultStandardScheme getScheme() { return new get_function_names_resultStandardScheme(); } } private static class get_function_names_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_function_names_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list816 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list816.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem817; for (int _i818 = 0; _i818 < _list816.size; ++_i818) { _elem817 = iprot.readString(); struct.success.add(_elem817); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_function_names_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter819 : struct.success) { oprot.writeString(_iter819); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_function_names_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_function_names_resultTupleScheme getScheme() { return new get_function_names_resultTupleScheme(); } } private static class get_function_names_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_function_names_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter820 : struct.success) { oprot.writeString(_iter820); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list821 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list821.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem822; for (int _i823 = 0; _i823 < _list821.size; ++_i823) { _elem822 = iprot.readString(); struct.success.add(_elem822); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_runtime_function_names_args implements org.apache.thrift.TBase<get_runtime_function_names_args, get_runtime_function_names_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_runtime_function_names_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_runtime_function_names_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_runtime_function_names_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_runtime_function_names_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_runtime_function_names_args.class, metaDataMap); } public get_runtime_function_names_args() { } public get_runtime_function_names_args( java.lang.String session) { this(); this.session = session; } /** * Performs a deep copy on <i>other</i>. */ public get_runtime_function_names_args(get_runtime_function_names_args other) { if (other.isSetSession()) { this.session = other.session; } } public get_runtime_function_names_args deepCopy() { return new get_runtime_function_names_args(this); } @Override public void clear() { this.session = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_runtime_function_names_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_runtime_function_names_args) return this.equals((get_runtime_function_names_args)that); return false; } public boolean equals(get_runtime_function_names_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); return hashCode; } @Override public int compareTo(get_runtime_function_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_runtime_function_names_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_runtime_function_names_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_runtime_function_names_argsStandardScheme getScheme() { return new get_runtime_function_names_argsStandardScheme(); } } private static class get_runtime_function_names_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_runtime_function_names_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_runtime_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_runtime_function_names_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_runtime_function_names_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_runtime_function_names_argsTupleScheme getScheme() { return new get_runtime_function_names_argsTupleScheme(); } } private static class get_runtime_function_names_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_runtime_function_names_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_runtime_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSession()) { oprot.writeString(struct.session); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_runtime_function_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_runtime_function_names_result implements org.apache.thrift.TBase<get_runtime_function_names_result, get_runtime_function_names_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_runtime_function_names_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_runtime_function_names_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_runtime_function_names_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_runtime_function_names_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_runtime_function_names_result.class, metaDataMap); } public get_runtime_function_names_result() { } public get_runtime_function_names_result( java.util.List<java.lang.String> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_runtime_function_names_result(get_runtime_function_names_result other) { if (other.isSetSuccess()) { java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success); this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_runtime_function_names_result deepCopy() { return new get_runtime_function_names_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(java.lang.String elem) { if (this.success == null) { this.success = new java.util.ArrayList<java.lang.String>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getSuccess() { return this.success; } public get_runtime_function_names_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_runtime_function_names_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<java.lang.String>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_runtime_function_names_result) return this.equals((get_runtime_function_names_result)that); return false; } public boolean equals(get_runtime_function_names_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_runtime_function_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_runtime_function_names_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_runtime_function_names_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_runtime_function_names_resultStandardScheme getScheme() { return new get_runtime_function_names_resultStandardScheme(); } } private static class get_runtime_function_names_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_runtime_function_names_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_runtime_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list824 = iprot.readListBegin(); struct.success = new java.util.ArrayList<java.lang.String>(_list824.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem825; for (int _i826 = 0; _i826 < _list824.size; ++_i826) { _elem825 = iprot.readString(); struct.success.add(_elem825); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_runtime_function_names_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (java.lang.String _iter827 : struct.success) { oprot.writeString(_iter827); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_runtime_function_names_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_runtime_function_names_resultTupleScheme getScheme() { return new get_runtime_function_names_resultTupleScheme(); } } private static class get_runtime_function_names_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_runtime_function_names_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_runtime_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.lang.String _iter828 : struct.success) { oprot.writeString(_iter828); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_runtime_function_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list829 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.success = new java.util.ArrayList<java.lang.String>(_list829.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem830; for (int _i831 = 0; _i831 < _list829.size; ++_i831) { _elem830 = iprot.readString(); struct.success.add(_elem830); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_function_details_args implements org.apache.thrift.TBase<get_function_details_args, get_function_details_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_function_details_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_function_details_args"); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField UDF_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("udf_names", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_function_details_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_function_details_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String session; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> udf_names; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION((short)1, "session"), UDF_NAMES((short)2, "udf_names"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SESSION return SESSION; case 2: // UDF_NAMES return UDF_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TSessionId"))); tmpMap.put(_Fields.UDF_NAMES, new org.apache.thrift.meta_data.FieldMetaData("udf_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_details_args.class, metaDataMap); } public get_function_details_args() { } public get_function_details_args( java.lang.String session, java.util.List<java.lang.String> udf_names) { this(); this.session = session; this.udf_names = udf_names; } /** * Performs a deep copy on <i>other</i>. */ public get_function_details_args(get_function_details_args other) { if (other.isSetSession()) { this.session = other.session; } if (other.isSetUdf_names()) { java.util.List<java.lang.String> __this__udf_names = new java.util.ArrayList<java.lang.String>(other.udf_names); this.udf_names = __this__udf_names; } } public get_function_details_args deepCopy() { return new get_function_details_args(this); } @Override public void clear() { this.session = null; this.udf_names = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSession() { return this.session; } public get_function_details_args setSession(@org.apache.thrift.annotation.Nullable java.lang.String session) { this.session = session; return this; } public void unsetSession() { this.session = null; } /** Returns true if field session is set (has been assigned a value) and false otherwise */ public boolean isSetSession() { return this.session != null; } public void setSessionIsSet(boolean value) { if (!value) { this.session = null; } } public int getUdf_namesSize() { return (this.udf_names == null) ? 0 : this.udf_names.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getUdf_namesIterator() { return (this.udf_names == null) ? null : this.udf_names.iterator(); } public void addToUdf_names(java.lang.String elem) { if (this.udf_names == null) { this.udf_names = new java.util.ArrayList<java.lang.String>(); } this.udf_names.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getUdf_names() { return this.udf_names; } public get_function_details_args setUdf_names(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> udf_names) { this.udf_names = udf_names; return this; } public void unsetUdf_names() { this.udf_names = null; } /** Returns true if field udf_names is set (has been assigned a value) and false otherwise */ public boolean isSetUdf_names() { return this.udf_names != null; } public void setUdf_namesIsSet(boolean value) { if (!value) { this.udf_names = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION: if (value == null) { unsetSession(); } else { setSession((java.lang.String)value); } break; case UDF_NAMES: if (value == null) { unsetUdf_names(); } else { setUdf_names((java.util.List<java.lang.String>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION: return getSession(); case UDF_NAMES: return getUdf_names(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SESSION: return isSetSession(); case UDF_NAMES: return isSetUdf_names(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_function_details_args) return this.equals((get_function_details_args)that); return false; } public boolean equals(get_function_details_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_session = true && this.isSetSession(); boolean that_present_session = true && that.isSetSession(); if (this_present_session || that_present_session) { if (!(this_present_session && that_present_session)) return false; if (!this.session.equals(that.session)) return false; } boolean this_present_udf_names = true && this.isSetUdf_names(); boolean that_present_udf_names = true && that.isSetUdf_names(); if (this_present_udf_names || that_present_udf_names) { if (!(this_present_udf_names && that_present_udf_names)) return false; if (!this.udf_names.equals(that.udf_names)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSession()) ? 131071 : 524287); if (isSetSession()) hashCode = hashCode * 8191 + session.hashCode(); hashCode = hashCode * 8191 + ((isSetUdf_names()) ? 131071 : 524287); if (isSetUdf_names()) hashCode = hashCode * 8191 + udf_names.hashCode(); return hashCode; } @Override public int compareTo(get_function_details_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSession(), other.isSetSession()); if (lastComparison != 0) { return lastComparison; } if (isSetSession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, other.session); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetUdf_names(), other.isSetUdf_names()); if (lastComparison != 0) { return lastComparison; } if (isSetUdf_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.udf_names, other.udf_names); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_function_details_args("); boolean first = true; sb.append("session:"); if (this.session == null) { sb.append("null"); } else { sb.append(this.session); } first = false; if (!first) sb.append(", "); sb.append("udf_names:"); if (this.udf_names == null) { sb.append("null"); } else { sb.append(this.udf_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_function_details_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_function_details_argsStandardScheme getScheme() { return new get_function_details_argsStandardScheme(); } } private static class get_function_details_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_function_details_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // UDF_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list832 = iprot.readListBegin(); struct.udf_names = new java.util.ArrayList<java.lang.String>(_list832.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem833; for (int _i834 = 0; _i834 < _list832.size; ++_i834) { _elem833 = iprot.readString(); struct.udf_names.add(_elem833); } iprot.readListEnd(); } struct.setUdf_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_function_details_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.session != null) { oprot.writeFieldBegin(SESSION_FIELD_DESC); oprot.writeString(struct.session); oprot.writeFieldEnd(); } if (struct.udf_names != null) { oprot.writeFieldBegin(UDF_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.udf_names.size())); for (java.lang.String _iter835 : struct.udf_names) { oprot.writeString(_iter835); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_function_details_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_function_details_argsTupleScheme getScheme() { return new get_function_details_argsTupleScheme(); } } private static class get_function_details_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_function_details_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_function_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSession()) { optionals.set(0); } if (struct.isSetUdf_names()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSession()) { oprot.writeString(struct.session); } if (struct.isSetUdf_names()) { { oprot.writeI32(struct.udf_names.size()); for (java.lang.String _iter836 : struct.udf_names) { oprot.writeString(_iter836); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_function_details_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.session = iprot.readString(); struct.setSessionIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list837 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.udf_names = new java.util.ArrayList<java.lang.String>(_list837.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem838; for (int _i839 = 0; _i839 < _list837.size; ++_i839) { _elem838 = iprot.readString(); struct.udf_names.add(_elem838); } } struct.setUdf_namesIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } public static class get_function_details_result implements org.apache.thrift.TBase<get_function_details_result, get_function_details_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_function_details_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_function_details_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_function_details_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_function_details_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> success; // required public @org.apache.thrift.annotation.Nullable TDBException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ai.heavy.thrift.calciteserver.TUserDefinedFunction.class)))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDBException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_details_result.class, metaDataMap); } public get_function_details_result() { } public get_function_details_result( java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> success, TDBException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public get_function_details_result(get_function_details_result other) { if (other.isSetSuccess()) { java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> __this__success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(other.success.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedFunction other_element : other.success) { __this__success.add(new ai.heavy.thrift.calciteserver.TUserDefinedFunction(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new TDBException(other.e); } } public get_function_details_result deepCopy() { return new get_function_details_result(this); } @Override public void clear() { this.success = null; this.e = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<ai.heavy.thrift.calciteserver.TUserDefinedFunction> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(ai.heavy.thrift.calciteserver.TUserDefinedFunction elem) { if (this.success == null) { this.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> getSuccess() { return this.success; } public get_function_details_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TDBException getE() { return this.e; } public get_function_details_result setE(@org.apache.thrift.annotation.Nullable TDBException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List<ai.heavy.thrift.calciteserver.TUserDefinedFunction>)value); } break; case E: if (value == null) { unsetE(); } else { setE((TDBException)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof get_function_details_result) return this.equals((get_function_details_result)that); return false; } public boolean equals(get_function_details_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); if (isSetE()) hashCode = hashCode * 8191 + e.hashCode(); return hashCode; } @Override public int compareTo(get_function_details_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("get_function_details_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_function_details_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_function_details_resultStandardScheme getScheme() { return new get_function_details_resultStandardScheme(); } } private static class get_function_details_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_function_details_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list840 = iprot.readListBegin(); struct.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(_list840.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedFunction _elem841; for (int _i842 = 0; _i842 < _list840.size; ++_i842) { _elem841 = new ai.heavy.thrift.calciteserver.TUserDefinedFunction(); _elem841.read(iprot); struct.success.add(_elem841); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_function_details_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (ai.heavy.thrift.calciteserver.TUserDefinedFunction _iter843 : struct.success) { _iter843.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_function_details_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public get_function_details_resultTupleScheme getScheme() { return new get_function_details_resultTupleScheme(); } } private static class get_function_details_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_function_details_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_function_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (ai.heavy.thrift.calciteserver.TUserDefinedFunction _iter844 : struct.success) { _iter844.write(oprot); } } } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_function_details_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list845 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList<ai.heavy.thrift.calciteserver.TUserDefinedFunction>(_list845.size); @org.apache.thrift.annotation.Nullable ai.heavy.thrift.calciteserver.TUserDefinedFunction _elem846; for (int _i847 = 0; _i847 < _list845.size; ++_i847) { _elem846 = new ai.heavy.thrift.calciteserver.TUserDefinedFunction(); _elem846.read(iprot); struct.success.add(_elem846); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new TDBException(); struct.e.read(iprot); struct.setEIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TAggKind.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; public enum TAggKind implements org.apache.thrift.TEnum { AVG(0), MIN(1), MAX(2), SUM(3), COUNT(4), APPROX_COUNT_DISTINCT(5), SAMPLE(6), SINGLE_VALUE(7); private final int value; private TAggKind(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. */ @org.apache.thrift.annotation.Nullable public static TAggKind findByValue(int value) { switch (value) { case 0: return AVG; case 1: return MIN; case 2: return MAX; case 3: return SUM; case 4: return COUNT; case 5: return APPROX_COUNT_DISTINCT; case 6: return SAMPLE; case 7: return SINGLE_VALUE; default: return null; } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TArrowTransport.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; public enum TArrowTransport implements org.apache.thrift.TEnum { SHARED_MEMORY(0), WIRE(1); private final int value; private TArrowTransport(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. */ @org.apache.thrift.annotation.Nullable public static TArrowTransport findByValue(int value) { switch (value) { case 0: return SHARED_MEMORY; case 1: return WIRE; default: return null; } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TChunkData.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TChunkData extends org.apache.thrift.TUnion<TChunkData, TChunkData._Fields> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TChunkData"); private static final org.apache.thrift.protocol.TField DATA_BUFFER_FIELD_DESC = new org.apache.thrift.protocol.TField("data_buffer", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField INDEX_BUFFER_FIELD_DESC = new org.apache.thrift.protocol.TField("index_buffer", org.apache.thrift.protocol.TType.STRING, (short)2); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { DATA_BUFFER((short)1, "data_buffer"), INDEX_BUFFER((short)2, "index_buffer"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DATA_BUFFER return DATA_BUFFER; case 2: // INDEX_BUFFER return INDEX_BUFFER; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DATA_BUFFER, new org.apache.thrift.meta_data.FieldMetaData("data_buffer", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); tmpMap.put(_Fields.INDEX_BUFFER, new org.apache.thrift.meta_data.FieldMetaData("index_buffer", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TChunkData.class, metaDataMap); } public TChunkData() { super(); } public TChunkData(_Fields setField, java.lang.Object value) { super(setField, value); } public TChunkData(TChunkData other) { super(other); } public TChunkData deepCopy() { return new TChunkData(this); } public static TChunkData data_buffer(java.nio.ByteBuffer value) { TChunkData x = new TChunkData(); x.setData_buffer(value); return x; } public static TChunkData data_buffer(byte[] value) { TChunkData x = new TChunkData(); x.setData_buffer (java.nio.ByteBuffer.wrap(value.clone())); return x; } public static TChunkData index_buffer(java.nio.ByteBuffer value) { TChunkData x = new TChunkData(); x.setIndex_buffer(value); return x; } public static TChunkData index_buffer(byte[] value) { TChunkData x = new TChunkData(); x.setIndex_buffer (java.nio.ByteBuffer.wrap(value.clone())); return x; } @Override protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException { switch (setField) { case DATA_BUFFER: if (value instanceof java.nio.ByteBuffer) { break; } throw new java.lang.ClassCastException("Was expecting value of type java.nio.ByteBuffer for field 'data_buffer', but got " + value.getClass().getSimpleName()); case INDEX_BUFFER: if (value instanceof java.nio.ByteBuffer) { break; } throw new java.lang.ClassCastException("Was expecting value of type java.nio.ByteBuffer for field 'index_buffer', but got " + value.getClass().getSimpleName()); default: throw new java.lang.IllegalArgumentException("Unknown field id " + setField); } } @Override protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(field.id); if (setField != null) { switch (setField) { case DATA_BUFFER: if (field.type == DATA_BUFFER_FIELD_DESC.type) { java.nio.ByteBuffer data_buffer; data_buffer = iprot.readBinary(); return data_buffer; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case INDEX_BUFFER: if (field.type == INDEX_BUFFER_FIELD_DESC.type) { java.nio.ByteBuffer index_buffer; index_buffer = iprot.readBinary(); return index_buffer; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } default: throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @Override protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case DATA_BUFFER: java.nio.ByteBuffer data_buffer = (java.nio.ByteBuffer)value_; oprot.writeBinary(data_buffer); return; case INDEX_BUFFER: java.nio.ByteBuffer index_buffer = (java.nio.ByteBuffer)value_; oprot.writeBinary(index_buffer); return; default: throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_); } } @Override protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(fieldID); if (setField != null) { switch (setField) { case DATA_BUFFER: java.nio.ByteBuffer data_buffer; data_buffer = iprot.readBinary(); return data_buffer; case INDEX_BUFFER: java.nio.ByteBuffer index_buffer; index_buffer = iprot.readBinary(); return index_buffer; default: throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID); } } @Override protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case DATA_BUFFER: java.nio.ByteBuffer data_buffer = (java.nio.ByteBuffer)value_; oprot.writeBinary(data_buffer); return; case INDEX_BUFFER: java.nio.ByteBuffer index_buffer = (java.nio.ByteBuffer)value_; oprot.writeBinary(index_buffer); return; default: throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_); } } @Override protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { switch (setField) { case DATA_BUFFER: return DATA_BUFFER_FIELD_DESC; case INDEX_BUFFER: return INDEX_BUFFER_FIELD_DESC; default: throw new java.lang.IllegalArgumentException("Unknown field id " + setField); } } @Override protected org.apache.thrift.protocol.TStruct getStructDesc() { return STRUCT_DESC; } @Override protected _Fields enumForId(short id) { return _Fields.findByThriftIdOrThrow(id); } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public byte[] getData_buffer() { setData_buffer(org.apache.thrift.TBaseHelper.rightSize(bufferForData_buffer())); java.nio.ByteBuffer b = bufferForData_buffer(); return b == null ? null : b.array(); } public java.nio.ByteBuffer bufferForData_buffer() { if (getSetField() == _Fields.DATA_BUFFER) { return org.apache.thrift.TBaseHelper.copyBinary((java.nio.ByteBuffer)getFieldValue()); } else { throw new java.lang.RuntimeException("Cannot get field 'data_buffer' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void setData_buffer(byte[] value) { setData_buffer (java.nio.ByteBuffer.wrap(value.clone())); } public void setData_buffer(java.nio.ByteBuffer value) { setField_ = _Fields.DATA_BUFFER; value_ = java.util.Objects.requireNonNull(value,"_Fields.DATA_BUFFER"); } public byte[] getIndex_buffer() { setIndex_buffer(org.apache.thrift.TBaseHelper.rightSize(bufferForIndex_buffer())); java.nio.ByteBuffer b = bufferForIndex_buffer(); return b == null ? null : b.array(); } public java.nio.ByteBuffer bufferForIndex_buffer() { if (getSetField() == _Fields.INDEX_BUFFER) { return org.apache.thrift.TBaseHelper.copyBinary((java.nio.ByteBuffer)getFieldValue()); } else { throw new java.lang.RuntimeException("Cannot get field 'index_buffer' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void setIndex_buffer(byte[] value) { setIndex_buffer (java.nio.ByteBuffer.wrap(value.clone())); } public void setIndex_buffer(java.nio.ByteBuffer value) { setField_ = _Fields.INDEX_BUFFER; value_ = java.util.Objects.requireNonNull(value,"_Fields.INDEX_BUFFER"); } public boolean isSetData_buffer() { return setField_ == _Fields.DATA_BUFFER; } public boolean isSetIndex_buffer() { return setField_ == _Fields.INDEX_BUFFER; } public boolean equals(java.lang.Object other) { if (other instanceof TChunkData) { return equals((TChunkData)other); } else { return false; } } public boolean equals(TChunkData other) { return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); } @Override public int compareTo(TChunkData other) { int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); if (lastComparison == 0) { return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); } return lastComparison; } @Override public int hashCode() { java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>(); list.add(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { list.add(setField.getThriftFieldId()); java.lang.Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { list.add(value); } } return list.hashCode(); } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TClusterHardwareInfo.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TClusterHardwareInfo implements org.apache.thrift.TBase<TClusterHardwareInfo, TClusterHardwareInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TClusterHardwareInfo> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TClusterHardwareInfo"); private static final org.apache.thrift.protocol.TField HARDWARE_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("hardware_info", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TClusterHardwareInfoStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TClusterHardwareInfoTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<THardwareInfo> hardware_info; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { HARDWARE_INFO((short)1, "hardware_info"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // HARDWARE_INFO return HARDWARE_INFO; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.HARDWARE_INFO, new org.apache.thrift.meta_data.FieldMetaData("hardware_info", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THardwareInfo.class)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TClusterHardwareInfo.class, metaDataMap); } public TClusterHardwareInfo() { } public TClusterHardwareInfo( java.util.List<THardwareInfo> hardware_info) { this(); this.hardware_info = hardware_info; } /** * Performs a deep copy on <i>other</i>. */ public TClusterHardwareInfo(TClusterHardwareInfo other) { if (other.isSetHardware_info()) { java.util.List<THardwareInfo> __this__hardware_info = new java.util.ArrayList<THardwareInfo>(other.hardware_info.size()); for (THardwareInfo other_element : other.hardware_info) { __this__hardware_info.add(new THardwareInfo(other_element)); } this.hardware_info = __this__hardware_info; } } public TClusterHardwareInfo deepCopy() { return new TClusterHardwareInfo(this); } @Override public void clear() { this.hardware_info = null; } public int getHardware_infoSize() { return (this.hardware_info == null) ? 0 : this.hardware_info.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<THardwareInfo> getHardware_infoIterator() { return (this.hardware_info == null) ? null : this.hardware_info.iterator(); } public void addToHardware_info(THardwareInfo elem) { if (this.hardware_info == null) { this.hardware_info = new java.util.ArrayList<THardwareInfo>(); } this.hardware_info.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<THardwareInfo> getHardware_info() { return this.hardware_info; } public TClusterHardwareInfo setHardware_info(@org.apache.thrift.annotation.Nullable java.util.List<THardwareInfo> hardware_info) { this.hardware_info = hardware_info; return this; } public void unsetHardware_info() { this.hardware_info = null; } /** Returns true if field hardware_info is set (has been assigned a value) and false otherwise */ public boolean isSetHardware_info() { return this.hardware_info != null; } public void setHardware_infoIsSet(boolean value) { if (!value) { this.hardware_info = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case HARDWARE_INFO: if (value == null) { unsetHardware_info(); } else { setHardware_info((java.util.List<THardwareInfo>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case HARDWARE_INFO: return getHardware_info(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case HARDWARE_INFO: return isSetHardware_info(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TClusterHardwareInfo) return this.equals((TClusterHardwareInfo)that); return false; } public boolean equals(TClusterHardwareInfo that) { if (that == null) return false; if (this == that) return true; boolean this_present_hardware_info = true && this.isSetHardware_info(); boolean that_present_hardware_info = true && that.isSetHardware_info(); if (this_present_hardware_info || that_present_hardware_info) { if (!(this_present_hardware_info && that_present_hardware_info)) return false; if (!this.hardware_info.equals(that.hardware_info)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetHardware_info()) ? 131071 : 524287); if (isSetHardware_info()) hashCode = hashCode * 8191 + hardware_info.hashCode(); return hashCode; } @Override public int compareTo(TClusterHardwareInfo other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetHardware_info(), other.isSetHardware_info()); if (lastComparison != 0) { return lastComparison; } if (isSetHardware_info()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hardware_info, other.hardware_info); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TClusterHardwareInfo("); boolean first = true; sb.append("hardware_info:"); if (this.hardware_info == null) { sb.append("null"); } else { sb.append(this.hardware_info); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TClusterHardwareInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TClusterHardwareInfoStandardScheme getScheme() { return new TClusterHardwareInfoStandardScheme(); } } private static class TClusterHardwareInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TClusterHardwareInfo> { public void read(org.apache.thrift.protocol.TProtocol iprot, TClusterHardwareInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // HARDWARE_INFO if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list120 = iprot.readListBegin(); struct.hardware_info = new java.util.ArrayList<THardwareInfo>(_list120.size); @org.apache.thrift.annotation.Nullable THardwareInfo _elem121; for (int _i122 = 0; _i122 < _list120.size; ++_i122) { _elem121 = new THardwareInfo(); _elem121.read(iprot); struct.hardware_info.add(_elem121); } iprot.readListEnd(); } struct.setHardware_infoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TClusterHardwareInfo struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.hardware_info != null) { oprot.writeFieldBegin(HARDWARE_INFO_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.hardware_info.size())); for (THardwareInfo _iter123 : struct.hardware_info) { _iter123.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TClusterHardwareInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TClusterHardwareInfoTupleScheme getScheme() { return new TClusterHardwareInfoTupleScheme(); } } private static class TClusterHardwareInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TClusterHardwareInfo> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TClusterHardwareInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetHardware_info()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetHardware_info()) { { oprot.writeI32(struct.hardware_info.size()); for (THardwareInfo _iter124 : struct.hardware_info) { _iter124.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TClusterHardwareInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list125 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.hardware_info = new java.util.ArrayList<THardwareInfo>(_list125.size); @org.apache.thrift.annotation.Nullable THardwareInfo _elem126; for (int _i127 = 0; _i127 < _list125.size; ++_i127) { _elem126 = new THardwareInfo(); _elem126.read(iprot); struct.hardware_info.add(_elem126); } } struct.setHardware_infoIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TColSlotContext.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TColSlotContext implements org.apache.thrift.TBase<TColSlotContext, TColSlotContext._Fields>, java.io.Serializable, Cloneable, Comparable<TColSlotContext> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColSlotContext"); private static final org.apache.thrift.protocol.TField SLOT_SIZES_FIELD_DESC = new org.apache.thrift.protocol.TField("slot_sizes", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField COL_TO_SLOT_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("col_to_slot_map", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TColSlotContextStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TColSlotContextTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<TSlotSize> slot_sizes; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.Integer>> col_to_slot_map; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SLOT_SIZES((short)1, "slot_sizes"), COL_TO_SLOT_MAP((short)2, "col_to_slot_map"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SLOT_SIZES return SLOT_SIZES; case 2: // COL_TO_SLOT_MAP return COL_TO_SLOT_MAP; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SLOT_SIZES, new org.apache.thrift.meta_data.FieldMetaData("slot_sizes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSlotSize.class)))); tmpMap.put(_Fields.COL_TO_SLOT_MAP, new org.apache.thrift.meta_data.FieldMetaData("col_to_slot_map", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColSlotContext.class, metaDataMap); } public TColSlotContext() { } public TColSlotContext( java.util.List<TSlotSize> slot_sizes, java.util.List<java.util.List<java.lang.Integer>> col_to_slot_map) { this(); this.slot_sizes = slot_sizes; this.col_to_slot_map = col_to_slot_map; } /** * Performs a deep copy on <i>other</i>. */ public TColSlotContext(TColSlotContext other) { if (other.isSetSlot_sizes()) { java.util.List<TSlotSize> __this__slot_sizes = new java.util.ArrayList<TSlotSize>(other.slot_sizes.size()); for (TSlotSize other_element : other.slot_sizes) { __this__slot_sizes.add(new TSlotSize(other_element)); } this.slot_sizes = __this__slot_sizes; } if (other.isSetCol_to_slot_map()) { java.util.List<java.util.List<java.lang.Integer>> __this__col_to_slot_map = new java.util.ArrayList<java.util.List<java.lang.Integer>>(other.col_to_slot_map.size()); for (java.util.List<java.lang.Integer> other_element : other.col_to_slot_map) { java.util.List<java.lang.Integer> __this__col_to_slot_map_copy = new java.util.ArrayList<java.lang.Integer>(other_element); __this__col_to_slot_map.add(__this__col_to_slot_map_copy); } this.col_to_slot_map = __this__col_to_slot_map; } } public TColSlotContext deepCopy() { return new TColSlotContext(this); } @Override public void clear() { this.slot_sizes = null; this.col_to_slot_map = null; } public int getSlot_sizesSize() { return (this.slot_sizes == null) ? 0 : this.slot_sizes.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TSlotSize> getSlot_sizesIterator() { return (this.slot_sizes == null) ? null : this.slot_sizes.iterator(); } public void addToSlot_sizes(TSlotSize elem) { if (this.slot_sizes == null) { this.slot_sizes = new java.util.ArrayList<TSlotSize>(); } this.slot_sizes.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TSlotSize> getSlot_sizes() { return this.slot_sizes; } public TColSlotContext setSlot_sizes(@org.apache.thrift.annotation.Nullable java.util.List<TSlotSize> slot_sizes) { this.slot_sizes = slot_sizes; return this; } public void unsetSlot_sizes() { this.slot_sizes = null; } /** Returns true if field slot_sizes is set (has been assigned a value) and false otherwise */ public boolean isSetSlot_sizes() { return this.slot_sizes != null; } public void setSlot_sizesIsSet(boolean value) { if (!value) { this.slot_sizes = null; } } public int getCol_to_slot_mapSize() { return (this.col_to_slot_map == null) ? 0 : this.col_to_slot_map.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.util.List<java.lang.Integer>> getCol_to_slot_mapIterator() { return (this.col_to_slot_map == null) ? null : this.col_to_slot_map.iterator(); } public void addToCol_to_slot_map(java.util.List<java.lang.Integer> elem) { if (this.col_to_slot_map == null) { this.col_to_slot_map = new java.util.ArrayList<java.util.List<java.lang.Integer>>(); } this.col_to_slot_map.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.util.List<java.lang.Integer>> getCol_to_slot_map() { return this.col_to_slot_map; } public TColSlotContext setCol_to_slot_map(@org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.Integer>> col_to_slot_map) { this.col_to_slot_map = col_to_slot_map; return this; } public void unsetCol_to_slot_map() { this.col_to_slot_map = null; } /** Returns true if field col_to_slot_map is set (has been assigned a value) and false otherwise */ public boolean isSetCol_to_slot_map() { return this.col_to_slot_map != null; } public void setCol_to_slot_mapIsSet(boolean value) { if (!value) { this.col_to_slot_map = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SLOT_SIZES: if (value == null) { unsetSlot_sizes(); } else { setSlot_sizes((java.util.List<TSlotSize>)value); } break; case COL_TO_SLOT_MAP: if (value == null) { unsetCol_to_slot_map(); } else { setCol_to_slot_map((java.util.List<java.util.List<java.lang.Integer>>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SLOT_SIZES: return getSlot_sizes(); case COL_TO_SLOT_MAP: return getCol_to_slot_map(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SLOT_SIZES: return isSetSlot_sizes(); case COL_TO_SLOT_MAP: return isSetCol_to_slot_map(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TColSlotContext) return this.equals((TColSlotContext)that); return false; } public boolean equals(TColSlotContext that) { if (that == null) return false; if (this == that) return true; boolean this_present_slot_sizes = true && this.isSetSlot_sizes(); boolean that_present_slot_sizes = true && that.isSetSlot_sizes(); if (this_present_slot_sizes || that_present_slot_sizes) { if (!(this_present_slot_sizes && that_present_slot_sizes)) return false; if (!this.slot_sizes.equals(that.slot_sizes)) return false; } boolean this_present_col_to_slot_map = true && this.isSetCol_to_slot_map(); boolean that_present_col_to_slot_map = true && that.isSetCol_to_slot_map(); if (this_present_col_to_slot_map || that_present_col_to_slot_map) { if (!(this_present_col_to_slot_map && that_present_col_to_slot_map)) return false; if (!this.col_to_slot_map.equals(that.col_to_slot_map)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSlot_sizes()) ? 131071 : 524287); if (isSetSlot_sizes()) hashCode = hashCode * 8191 + slot_sizes.hashCode(); hashCode = hashCode * 8191 + ((isSetCol_to_slot_map()) ? 131071 : 524287); if (isSetCol_to_slot_map()) hashCode = hashCode * 8191 + col_to_slot_map.hashCode(); return hashCode; } @Override public int compareTo(TColSlotContext other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSlot_sizes(), other.isSetSlot_sizes()); if (lastComparison != 0) { return lastComparison; } if (isSetSlot_sizes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slot_sizes, other.slot_sizes); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCol_to_slot_map(), other.isSetCol_to_slot_map()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_to_slot_map()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_to_slot_map, other.col_to_slot_map); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TColSlotContext("); boolean first = true; sb.append("slot_sizes:"); if (this.slot_sizes == null) { sb.append("null"); } else { sb.append(this.slot_sizes); } first = false; if (!first) sb.append(", "); sb.append("col_to_slot_map:"); if (this.col_to_slot_map == null) { sb.append("null"); } else { sb.append(this.col_to_slot_map); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TColSlotContextStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TColSlotContextStandardScheme getScheme() { return new TColSlotContextStandardScheme(); } } private static class TColSlotContextStandardScheme extends org.apache.thrift.scheme.StandardScheme<TColSlotContext> { public void read(org.apache.thrift.protocol.TProtocol iprot, TColSlotContext struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SLOT_SIZES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.slot_sizes = new java.util.ArrayList<TSlotSize>(_list0.size); @org.apache.thrift.annotation.Nullable TSlotSize _elem1; for (int _i2 = 0; _i2 < _list0.size; ++_i2) { _elem1 = new TSlotSize(); _elem1.read(iprot); struct.slot_sizes.add(_elem1); } iprot.readListEnd(); } struct.setSlot_sizesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // COL_TO_SLOT_MAP if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); struct.col_to_slot_map = new java.util.ArrayList<java.util.List<java.lang.Integer>>(_list3.size); @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> _elem4; for (int _i5 = 0; _i5 < _list3.size; ++_i5) { { org.apache.thrift.protocol.TList _list6 = iprot.readListBegin(); _elem4 = new java.util.ArrayList<java.lang.Integer>(_list6.size); int _elem7; for (int _i8 = 0; _i8 < _list6.size; ++_i8) { _elem7 = iprot.readI32(); _elem4.add(_elem7); } iprot.readListEnd(); } struct.col_to_slot_map.add(_elem4); } iprot.readListEnd(); } struct.setCol_to_slot_mapIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TColSlotContext struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.slot_sizes != null) { oprot.writeFieldBegin(SLOT_SIZES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.slot_sizes.size())); for (TSlotSize _iter9 : struct.slot_sizes) { _iter9.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.col_to_slot_map != null) { oprot.writeFieldBegin(COL_TO_SLOT_MAP_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.col_to_slot_map.size())); for (java.util.List<java.lang.Integer> _iter10 : struct.col_to_slot_map) { { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, _iter10.size())); for (int _iter11 : _iter10) { oprot.writeI32(_iter11); } oprot.writeListEnd(); } } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TColSlotContextTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TColSlotContextTupleScheme getScheme() { return new TColSlotContextTupleScheme(); } } private static class TColSlotContextTupleScheme extends org.apache.thrift.scheme.TupleScheme<TColSlotContext> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TColSlotContext struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSlot_sizes()) { optionals.set(0); } if (struct.isSetCol_to_slot_map()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSlot_sizes()) { { oprot.writeI32(struct.slot_sizes.size()); for (TSlotSize _iter12 : struct.slot_sizes) { _iter12.write(oprot); } } } if (struct.isSetCol_to_slot_map()) { { oprot.writeI32(struct.col_to_slot_map.size()); for (java.util.List<java.lang.Integer> _iter13 : struct.col_to_slot_map) { { oprot.writeI32(_iter13.size()); for (int _iter14 : _iter13) { oprot.writeI32(_iter14); } } } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TColSlotContext struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list15 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.slot_sizes = new java.util.ArrayList<TSlotSize>(_list15.size); @org.apache.thrift.annotation.Nullable TSlotSize _elem16; for (int _i17 = 0; _i17 < _list15.size; ++_i17) { _elem16 = new TSlotSize(); _elem16.read(iprot); struct.slot_sizes.add(_elem16); } } struct.setSlot_sizesIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list18 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); struct.col_to_slot_map = new java.util.ArrayList<java.util.List<java.lang.Integer>>(_list18.size); @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> _elem19; for (int _i20 = 0; _i20 < _list18.size; ++_i20) { { org.apache.thrift.protocol.TList _list21 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); _elem19 = new java.util.ArrayList<java.lang.Integer>(_list21.size); int _elem22; for (int _i23 = 0; _i23 < _list21.size; ++_i23) { _elem22 = iprot.readI32(); _elem19.add(_elem22); } } struct.col_to_slot_map.add(_elem19); } } struct.setCol_to_slot_mapIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TColumn.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields>, java.io.Serializable, Cloneable, Comparable<TColumn> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn"); private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("nulls", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TColumnStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TColumnTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TColumnData data; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Boolean> nulls; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { DATA((short)1, "data"), NULLS((short)2, "nulls"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DATA return DATA; case 2: // NULLS return NULLS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumnData.class))); tmpMap.put(_Fields.NULLS, new org.apache.thrift.meta_data.FieldMetaData("nulls", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumn.class, metaDataMap); } public TColumn() { } public TColumn( TColumnData data, java.util.List<java.lang.Boolean> nulls) { this(); this.data = data; this.nulls = nulls; } /** * Performs a deep copy on <i>other</i>. */ public TColumn(TColumn other) { if (other.isSetData()) { this.data = new TColumnData(other.data); } if (other.isSetNulls()) { java.util.List<java.lang.Boolean> __this__nulls = new java.util.ArrayList<java.lang.Boolean>(other.nulls); this.nulls = __this__nulls; } } public TColumn deepCopy() { return new TColumn(this); } @Override public void clear() { this.data = null; this.nulls = null; } @org.apache.thrift.annotation.Nullable public TColumnData getData() { return this.data; } public TColumn setData(@org.apache.thrift.annotation.Nullable TColumnData data) { this.data = data; return this; } public void unsetData() { this.data = null; } /** Returns true if field data is set (has been assigned a value) and false otherwise */ public boolean isSetData() { return this.data != null; } public void setDataIsSet(boolean value) { if (!value) { this.data = null; } } public int getNullsSize() { return (this.nulls == null) ? 0 : this.nulls.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.Boolean> getNullsIterator() { return (this.nulls == null) ? null : this.nulls.iterator(); } public void addToNulls(boolean elem) { if (this.nulls == null) { this.nulls = new java.util.ArrayList<java.lang.Boolean>(); } this.nulls.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.Boolean> getNulls() { return this.nulls; } public TColumn setNulls(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Boolean> nulls) { this.nulls = nulls; return this; } public void unsetNulls() { this.nulls = null; } /** Returns true if field nulls is set (has been assigned a value) and false otherwise */ public boolean isSetNulls() { return this.nulls != null; } public void setNullsIsSet(boolean value) { if (!value) { this.nulls = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case DATA: if (value == null) { unsetData(); } else { setData((TColumnData)value); } break; case NULLS: if (value == null) { unsetNulls(); } else { setNulls((java.util.List<java.lang.Boolean>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case DATA: return getData(); case NULLS: return getNulls(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case DATA: return isSetData(); case NULLS: return isSetNulls(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TColumn) return this.equals((TColumn)that); return false; } public boolean equals(TColumn that) { if (that == null) return false; if (this == that) return true; boolean this_present_data = true && this.isSetData(); boolean that_present_data = true && that.isSetData(); if (this_present_data || that_present_data) { if (!(this_present_data && that_present_data)) return false; if (!this.data.equals(that.data)) return false; } boolean this_present_nulls = true && this.isSetNulls(); boolean that_present_nulls = true && that.isSetNulls(); if (this_present_nulls || that_present_nulls) { if (!(this_present_nulls && that_present_nulls)) return false; if (!this.nulls.equals(that.nulls)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287); if (isSetData()) hashCode = hashCode * 8191 + data.hashCode(); hashCode = hashCode * 8191 + ((isSetNulls()) ? 131071 : 524287); if (isSetNulls()) hashCode = hashCode * 8191 + nulls.hashCode(); return hashCode; } @Override public int compareTo(TColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetData(), other.isSetData()); if (lastComparison != 0) { return lastComparison; } if (isSetData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNulls(), other.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TColumn("); boolean first = true; sb.append("data:"); if (this.data == null) { sb.append("null"); } else { sb.append(this.data); } first = false; if (!first) sb.append(", "); sb.append("nulls:"); if (this.nulls == null) { sb.append("null"); } else { sb.append(this.nulls); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (data != null) { data.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TColumnStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TColumnStandardScheme getScheme() { return new TColumnStandardScheme(); } } private static class TColumnStandardScheme extends org.apache.thrift.scheme.StandardScheme<TColumn> { public void read(org.apache.thrift.protocol.TProtocol iprot, TColumn struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DATA if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.data = new TColumnData(); struct.data.read(iprot); struct.setDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NULLS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list48 = iprot.readListBegin(); struct.nulls = new java.util.ArrayList<java.lang.Boolean>(_list48.size); boolean _elem49; for (int _i50 = 0; _i50 < _list48.size; ++_i50) { _elem49 = iprot.readBool(); struct.nulls.add(_elem49); } iprot.readListEnd(); } struct.setNullsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TColumn struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.data != null) { oprot.writeFieldBegin(DATA_FIELD_DESC); struct.data.write(oprot); oprot.writeFieldEnd(); } if (struct.nulls != null) { oprot.writeFieldBegin(NULLS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, struct.nulls.size())); for (boolean _iter51 : struct.nulls) { oprot.writeBool(_iter51); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TColumnTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TColumnTupleScheme getScheme() { return new TColumnTupleScheme(); } } private static class TColumnTupleScheme extends org.apache.thrift.scheme.TupleScheme<TColumn> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetData()) { optionals.set(0); } if (struct.isSetNulls()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetData()) { struct.data.write(oprot); } if (struct.isSetNulls()) { { oprot.writeI32(struct.nulls.size()); for (boolean _iter52 : struct.nulls) { oprot.writeBool(_iter52); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.data = new TColumnData(); struct.data.read(iprot); struct.setDataIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list53 = iprot.readListBegin(org.apache.thrift.protocol.TType.BOOL); struct.nulls = new java.util.ArrayList<java.lang.Boolean>(_list53.size); boolean _elem54; for (int _i55 = 0; _i55 < _list53.size; ++_i55) { _elem54 = iprot.readBool(); struct.nulls.add(_elem54); } } struct.setNullsIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TColumnData.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TColumnData implements org.apache.thrift.TBase<TColumnData, TColumnData._Fields>, java.io.Serializable, Cloneable, Comparable<TColumnData> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnData"); private static final org.apache.thrift.protocol.TField INT_COL_FIELD_DESC = new org.apache.thrift.protocol.TField("int_col", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField REAL_COL_FIELD_DESC = new org.apache.thrift.protocol.TField("real_col", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField STR_COL_FIELD_DESC = new org.apache.thrift.protocol.TField("str_col", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField ARR_COL_FIELD_DESC = new org.apache.thrift.protocol.TField("arr_col", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TColumnDataStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TColumnDataTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> int_col; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Double> real_col; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> str_col; // required public @org.apache.thrift.annotation.Nullable java.util.List<TColumn> arr_col; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { INT_COL((short)1, "int_col"), REAL_COL((short)2, "real_col"), STR_COL((short)3, "str_col"), ARR_COL((short)4, "arr_col"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // INT_COL return INT_COL; case 2: // REAL_COL return REAL_COL; case 3: // STR_COL return STR_COL; case 4: // ARR_COL return ARR_COL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.INT_COL, new org.apache.thrift.meta_data.FieldMetaData("int_col", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); tmpMap.put(_Fields.REAL_COL, new org.apache.thrift.meta_data.FieldMetaData("real_col", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)))); tmpMap.put(_Fields.STR_COL, new org.apache.thrift.meta_data.FieldMetaData("str_col", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.ARR_COL, new org.apache.thrift.meta_data.FieldMetaData("arr_col", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "TColumn")))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumnData.class, metaDataMap); } public TColumnData() { } public TColumnData( java.util.List<java.lang.Long> int_col, java.util.List<java.lang.Double> real_col, java.util.List<java.lang.String> str_col, java.util.List<TColumn> arr_col) { this(); this.int_col = int_col; this.real_col = real_col; this.str_col = str_col; this.arr_col = arr_col; } /** * Performs a deep copy on <i>other</i>. */ public TColumnData(TColumnData other) { if (other.isSetInt_col()) { java.util.List<java.lang.Long> __this__int_col = new java.util.ArrayList<java.lang.Long>(other.int_col); this.int_col = __this__int_col; } if (other.isSetReal_col()) { java.util.List<java.lang.Double> __this__real_col = new java.util.ArrayList<java.lang.Double>(other.real_col); this.real_col = __this__real_col; } if (other.isSetStr_col()) { java.util.List<java.lang.String> __this__str_col = new java.util.ArrayList<java.lang.String>(other.str_col); this.str_col = __this__str_col; } if (other.isSetArr_col()) { java.util.List<TColumn> __this__arr_col = new java.util.ArrayList<TColumn>(other.arr_col.size()); for (TColumn other_element : other.arr_col) { __this__arr_col.add(new TColumn(other_element)); } this.arr_col = __this__arr_col; } } public TColumnData deepCopy() { return new TColumnData(this); } @Override public void clear() { this.int_col = null; this.real_col = null; this.str_col = null; this.arr_col = null; } public int getInt_colSize() { return (this.int_col == null) ? 0 : this.int_col.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.Long> getInt_colIterator() { return (this.int_col == null) ? null : this.int_col.iterator(); } public void addToInt_col(long elem) { if (this.int_col == null) { this.int_col = new java.util.ArrayList<java.lang.Long>(); } this.int_col.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.Long> getInt_col() { return this.int_col; } public TColumnData setInt_col(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> int_col) { this.int_col = int_col; return this; } public void unsetInt_col() { this.int_col = null; } /** Returns true if field int_col is set (has been assigned a value) and false otherwise */ public boolean isSetInt_col() { return this.int_col != null; } public void setInt_colIsSet(boolean value) { if (!value) { this.int_col = null; } } public int getReal_colSize() { return (this.real_col == null) ? 0 : this.real_col.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.Double> getReal_colIterator() { return (this.real_col == null) ? null : this.real_col.iterator(); } public void addToReal_col(double elem) { if (this.real_col == null) { this.real_col = new java.util.ArrayList<java.lang.Double>(); } this.real_col.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.Double> getReal_col() { return this.real_col; } public TColumnData setReal_col(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Double> real_col) { this.real_col = real_col; return this; } public void unsetReal_col() { this.real_col = null; } /** Returns true if field real_col is set (has been assigned a value) and false otherwise */ public boolean isSetReal_col() { return this.real_col != null; } public void setReal_colIsSet(boolean value) { if (!value) { this.real_col = null; } } public int getStr_colSize() { return (this.str_col == null) ? 0 : this.str_col.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<java.lang.String> getStr_colIterator() { return (this.str_col == null) ? null : this.str_col.iterator(); } public void addToStr_col(java.lang.String elem) { if (this.str_col == null) { this.str_col = new java.util.ArrayList<java.lang.String>(); } this.str_col.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<java.lang.String> getStr_col() { return this.str_col; } public TColumnData setStr_col(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> str_col) { this.str_col = str_col; return this; } public void unsetStr_col() { this.str_col = null; } /** Returns true if field str_col is set (has been assigned a value) and false otherwise */ public boolean isSetStr_col() { return this.str_col != null; } public void setStr_colIsSet(boolean value) { if (!value) { this.str_col = null; } } public int getArr_colSize() { return (this.arr_col == null) ? 0 : this.arr_col.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator<TColumn> getArr_colIterator() { return (this.arr_col == null) ? null : this.arr_col.iterator(); } public void addToArr_col(TColumn elem) { if (this.arr_col == null) { this.arr_col = new java.util.ArrayList<TColumn>(); } this.arr_col.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List<TColumn> getArr_col() { return this.arr_col; } public TColumnData setArr_col(@org.apache.thrift.annotation.Nullable java.util.List<TColumn> arr_col) { this.arr_col = arr_col; return this; } public void unsetArr_col() { this.arr_col = null; } /** Returns true if field arr_col is set (has been assigned a value) and false otherwise */ public boolean isSetArr_col() { return this.arr_col != null; } public void setArr_colIsSet(boolean value) { if (!value) { this.arr_col = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case INT_COL: if (value == null) { unsetInt_col(); } else { setInt_col((java.util.List<java.lang.Long>)value); } break; case REAL_COL: if (value == null) { unsetReal_col(); } else { setReal_col((java.util.List<java.lang.Double>)value); } break; case STR_COL: if (value == null) { unsetStr_col(); } else { setStr_col((java.util.List<java.lang.String>)value); } break; case ARR_COL: if (value == null) { unsetArr_col(); } else { setArr_col((java.util.List<TColumn>)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case INT_COL: return getInt_col(); case REAL_COL: return getReal_col(); case STR_COL: return getStr_col(); case ARR_COL: return getArr_col(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case INT_COL: return isSetInt_col(); case REAL_COL: return isSetReal_col(); case STR_COL: return isSetStr_col(); case ARR_COL: return isSetArr_col(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TColumnData) return this.equals((TColumnData)that); return false; } public boolean equals(TColumnData that) { if (that == null) return false; if (this == that) return true; boolean this_present_int_col = true && this.isSetInt_col(); boolean that_present_int_col = true && that.isSetInt_col(); if (this_present_int_col || that_present_int_col) { if (!(this_present_int_col && that_present_int_col)) return false; if (!this.int_col.equals(that.int_col)) return false; } boolean this_present_real_col = true && this.isSetReal_col(); boolean that_present_real_col = true && that.isSetReal_col(); if (this_present_real_col || that_present_real_col) { if (!(this_present_real_col && that_present_real_col)) return false; if (!this.real_col.equals(that.real_col)) return false; } boolean this_present_str_col = true && this.isSetStr_col(); boolean that_present_str_col = true && that.isSetStr_col(); if (this_present_str_col || that_present_str_col) { if (!(this_present_str_col && that_present_str_col)) return false; if (!this.str_col.equals(that.str_col)) return false; } boolean this_present_arr_col = true && this.isSetArr_col(); boolean that_present_arr_col = true && that.isSetArr_col(); if (this_present_arr_col || that_present_arr_col) { if (!(this_present_arr_col && that_present_arr_col)) return false; if (!this.arr_col.equals(that.arr_col)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetInt_col()) ? 131071 : 524287); if (isSetInt_col()) hashCode = hashCode * 8191 + int_col.hashCode(); hashCode = hashCode * 8191 + ((isSetReal_col()) ? 131071 : 524287); if (isSetReal_col()) hashCode = hashCode * 8191 + real_col.hashCode(); hashCode = hashCode * 8191 + ((isSetStr_col()) ? 131071 : 524287); if (isSetStr_col()) hashCode = hashCode * 8191 + str_col.hashCode(); hashCode = hashCode * 8191 + ((isSetArr_col()) ? 131071 : 524287); if (isSetArr_col()) hashCode = hashCode * 8191 + arr_col.hashCode(); return hashCode; } @Override public int compareTo(TColumnData other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetInt_col(), other.isSetInt_col()); if (lastComparison != 0) { return lastComparison; } if (isSetInt_col()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.int_col, other.int_col); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetReal_col(), other.isSetReal_col()); if (lastComparison != 0) { return lastComparison; } if (isSetReal_col()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.real_col, other.real_col); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetStr_col(), other.isSetStr_col()); if (lastComparison != 0) { return lastComparison; } if (isSetStr_col()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.str_col, other.str_col); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetArr_col(), other.isSetArr_col()); if (lastComparison != 0) { return lastComparison; } if (isSetArr_col()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.arr_col, other.arr_col); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TColumnData("); boolean first = true; sb.append("int_col:"); if (this.int_col == null) { sb.append("null"); } else { sb.append(this.int_col); } first = false; if (!first) sb.append(", "); sb.append("real_col:"); if (this.real_col == null) { sb.append("null"); } else { sb.append(this.real_col); } first = false; if (!first) sb.append(", "); sb.append("str_col:"); if (this.str_col == null) { sb.append("null"); } else { sb.append(this.str_col); } first = false; if (!first) sb.append(", "); sb.append("arr_col:"); if (this.arr_col == null) { sb.append("null"); } else { sb.append(this.arr_col); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TColumnDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TColumnDataStandardScheme getScheme() { return new TColumnDataStandardScheme(); } } private static class TColumnDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<TColumnData> { public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnData struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // INT_COL if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); struct.int_col = new java.util.ArrayList<java.lang.Long>(_list16.size); long _elem17; for (int _i18 = 0; _i18 < _list16.size; ++_i18) { _elem17 = iprot.readI64(); struct.int_col.add(_elem17); } iprot.readListEnd(); } struct.setInt_colIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // REAL_COL if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list19 = iprot.readListBegin(); struct.real_col = new java.util.ArrayList<java.lang.Double>(_list19.size); double _elem20; for (int _i21 = 0; _i21 < _list19.size; ++_i21) { _elem20 = iprot.readDouble(); struct.real_col.add(_elem20); } iprot.readListEnd(); } struct.setReal_colIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // STR_COL if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list22 = iprot.readListBegin(); struct.str_col = new java.util.ArrayList<java.lang.String>(_list22.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem23; for (int _i24 = 0; _i24 < _list22.size; ++_i24) { _elem23 = iprot.readString(); struct.str_col.add(_elem23); } iprot.readListEnd(); } struct.setStr_colIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // ARR_COL if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list25 = iprot.readListBegin(); struct.arr_col = new java.util.ArrayList<TColumn>(_list25.size); @org.apache.thrift.annotation.Nullable TColumn _elem26; for (int _i27 = 0; _i27 < _list25.size; ++_i27) { _elem26 = new TColumn(); _elem26.read(iprot); struct.arr_col.add(_elem26); } iprot.readListEnd(); } struct.setArr_colIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TColumnData struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.int_col != null) { oprot.writeFieldBegin(INT_COL_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.int_col.size())); for (long _iter28 : struct.int_col) { oprot.writeI64(_iter28); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.real_col != null) { oprot.writeFieldBegin(REAL_COL_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, struct.real_col.size())); for (double _iter29 : struct.real_col) { oprot.writeDouble(_iter29); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.str_col != null) { oprot.writeFieldBegin(STR_COL_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.str_col.size())); for (java.lang.String _iter30 : struct.str_col) { oprot.writeString(_iter30); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.arr_col != null) { oprot.writeFieldBegin(ARR_COL_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.arr_col.size())); for (TColumn _iter31 : struct.arr_col) { _iter31.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TColumnDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TColumnDataTupleScheme getScheme() { return new TColumnDataTupleScheme(); } } private static class TColumnDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<TColumnData> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TColumnData struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetInt_col()) { optionals.set(0); } if (struct.isSetReal_col()) { optionals.set(1); } if (struct.isSetStr_col()) { optionals.set(2); } if (struct.isSetArr_col()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetInt_col()) { { oprot.writeI32(struct.int_col.size()); for (long _iter32 : struct.int_col) { oprot.writeI64(_iter32); } } } if (struct.isSetReal_col()) { { oprot.writeI32(struct.real_col.size()); for (double _iter33 : struct.real_col) { oprot.writeDouble(_iter33); } } } if (struct.isSetStr_col()) { { oprot.writeI32(struct.str_col.size()); for (java.lang.String _iter34 : struct.str_col) { oprot.writeString(_iter34); } } } if (struct.isSetArr_col()) { { oprot.writeI32(struct.arr_col.size()); for (TColumn _iter35 : struct.arr_col) { _iter35.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TColumnData struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list36 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); struct.int_col = new java.util.ArrayList<java.lang.Long>(_list36.size); long _elem37; for (int _i38 = 0; _i38 < _list36.size; ++_i38) { _elem37 = iprot.readI64(); struct.int_col.add(_elem37); } } struct.setInt_colIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list39 = iprot.readListBegin(org.apache.thrift.protocol.TType.DOUBLE); struct.real_col = new java.util.ArrayList<java.lang.Double>(_list39.size); double _elem40; for (int _i41 = 0; _i41 < _list39.size; ++_i41) { _elem40 = iprot.readDouble(); struct.real_col.add(_elem40); } } struct.setReal_colIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.str_col = new java.util.ArrayList<java.lang.String>(_list42.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem43; for (int _i44 = 0; _i44 < _list42.size; ++_i44) { _elem43 = iprot.readString(); struct.str_col.add(_elem43); } } struct.setStr_colIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list45 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.arr_col = new java.util.ArrayList<TColumn>(_list45.size); @org.apache.thrift.annotation.Nullable TColumn _elem46; for (int _i47 = 0; _i47 < _list45.size; ++_i47) { _elem46 = new TColumn(); _elem46.read(iprot); struct.arr_col.add(_elem46); } } struct.setArr_colIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TColumnRange.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TColumnRange implements org.apache.thrift.TBase<TColumnRange, TColumnRange._Fields>, java.io.Serializable, Cloneable, Comparable<TColumnRange> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnRange"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField COL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("col_id", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField HAS_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("has_nulls", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final org.apache.thrift.protocol.TField INT_MIN_FIELD_DESC = new org.apache.thrift.protocol.TField("int_min", org.apache.thrift.protocol.TType.I64, (short)5); private static final org.apache.thrift.protocol.TField INT_MAX_FIELD_DESC = new org.apache.thrift.protocol.TField("int_max", org.apache.thrift.protocol.TType.I64, (short)6); private static final org.apache.thrift.protocol.TField BUCKET_FIELD_DESC = new org.apache.thrift.protocol.TField("bucket", org.apache.thrift.protocol.TType.I64, (short)7); private static final org.apache.thrift.protocol.TField FP_MIN_FIELD_DESC = new org.apache.thrift.protocol.TField("fp_min", org.apache.thrift.protocol.TType.DOUBLE, (short)8); private static final org.apache.thrift.protocol.TField FP_MAX_FIELD_DESC = new org.apache.thrift.protocol.TField("fp_max", org.apache.thrift.protocol.TType.DOUBLE, (short)9); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TColumnRangeStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TColumnRangeTupleSchemeFactory(); /** * * @see TExpressionRangeType */ public @org.apache.thrift.annotation.Nullable TExpressionRangeType type; // required public int col_id; // required public int table_id; // required public boolean has_nulls; // required public long int_min; // required public long int_max; // required public long bucket; // required public double fp_min; // required public double fp_max; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * * @see TExpressionRangeType */ TYPE((short)1, "type"), COL_ID((short)2, "col_id"), TABLE_ID((short)3, "table_id"), HAS_NULLS((short)4, "has_nulls"), INT_MIN((short)5, "int_min"), INT_MAX((short)6, "int_max"), BUCKET((short)7, "bucket"), FP_MIN((short)8, "fp_min"), FP_MAX((short)9, "fp_max"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TYPE return TYPE; case 2: // COL_ID return COL_ID; case 3: // TABLE_ID return TABLE_ID; case 4: // HAS_NULLS return HAS_NULLS; case 5: // INT_MIN return INT_MIN; case 6: // INT_MAX return INT_MAX; case 7: // BUCKET return BUCKET; case 8: // FP_MIN return FP_MIN; case 9: // FP_MAX return FP_MAX; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __COL_ID_ISSET_ID = 0; private static final int __TABLE_ID_ISSET_ID = 1; private static final int __HAS_NULLS_ISSET_ID = 2; private static final int __INT_MIN_ISSET_ID = 3; private static final int __INT_MAX_ISSET_ID = 4; private static final int __BUCKET_ISSET_ID = 5; private static final int __FP_MIN_ISSET_ID = 6; private static final int __FP_MAX_ISSET_ID = 7; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TExpressionRangeType.class))); tmpMap.put(_Fields.COL_ID, new org.apache.thrift.meta_data.FieldMetaData("col_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.HAS_NULLS, new org.apache.thrift.meta_data.FieldMetaData("has_nulls", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.INT_MIN, new org.apache.thrift.meta_data.FieldMetaData("int_min", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.INT_MAX, new org.apache.thrift.meta_data.FieldMetaData("int_max", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.BUCKET, new org.apache.thrift.meta_data.FieldMetaData("bucket", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.FP_MIN, new org.apache.thrift.meta_data.FieldMetaData("fp_min", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.FP_MAX, new org.apache.thrift.meta_data.FieldMetaData("fp_max", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumnRange.class, metaDataMap); } public TColumnRange() { } public TColumnRange( TExpressionRangeType type, int col_id, int table_id, boolean has_nulls, long int_min, long int_max, long bucket, double fp_min, double fp_max) { this(); this.type = type; this.col_id = col_id; setCol_idIsSet(true); this.table_id = table_id; setTable_idIsSet(true); this.has_nulls = has_nulls; setHas_nullsIsSet(true); this.int_min = int_min; setInt_minIsSet(true); this.int_max = int_max; setInt_maxIsSet(true); this.bucket = bucket; setBucketIsSet(true); this.fp_min = fp_min; setFp_minIsSet(true); this.fp_max = fp_max; setFp_maxIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public TColumnRange(TColumnRange other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetType()) { this.type = other.type; } this.col_id = other.col_id; this.table_id = other.table_id; this.has_nulls = other.has_nulls; this.int_min = other.int_min; this.int_max = other.int_max; this.bucket = other.bucket; this.fp_min = other.fp_min; this.fp_max = other.fp_max; } public TColumnRange deepCopy() { return new TColumnRange(this); } @Override public void clear() { this.type = null; setCol_idIsSet(false); this.col_id = 0; setTable_idIsSet(false); this.table_id = 0; setHas_nullsIsSet(false); this.has_nulls = false; setInt_minIsSet(false); this.int_min = 0; setInt_maxIsSet(false); this.int_max = 0; setBucketIsSet(false); this.bucket = 0; setFp_minIsSet(false); this.fp_min = 0.0; setFp_maxIsSet(false); this.fp_max = 0.0; } /** * * @see TExpressionRangeType */ @org.apache.thrift.annotation.Nullable public TExpressionRangeType getType() { return this.type; } /** * * @see TExpressionRangeType */ public TColumnRange setType(@org.apache.thrift.annotation.Nullable TExpressionRangeType type) { this.type = type; return this; } public void unsetType() { this.type = null; } /** Returns true if field type is set (has been assigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } public void setTypeIsSet(boolean value) { if (!value) { this.type = null; } } public int getCol_id() { return this.col_id; } public TColumnRange setCol_id(int col_id) { this.col_id = col_id; setCol_idIsSet(true); return this; } public void unsetCol_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COL_ID_ISSET_ID); } /** Returns true if field col_id is set (has been assigned a value) and false otherwise */ public boolean isSetCol_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COL_ID_ISSET_ID); } public void setCol_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COL_ID_ISSET_ID, value); } public int getTable_id() { return this.table_id; } public TColumnRange setTable_id(int table_id) { this.table_id = table_id; setTable_idIsSet(true); return this; } public void unsetTable_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } /** Returns true if field table_id is set (has been assigned a value) and false otherwise */ public boolean isSetTable_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLE_ID_ISSET_ID); } public void setTable_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLE_ID_ISSET_ID, value); } public boolean isHas_nulls() { return this.has_nulls; } public TColumnRange setHas_nulls(boolean has_nulls) { this.has_nulls = has_nulls; setHas_nullsIsSet(true); return this; } public void unsetHas_nulls() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HAS_NULLS_ISSET_ID); } /** Returns true if field has_nulls is set (has been assigned a value) and false otherwise */ public boolean isSetHas_nulls() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HAS_NULLS_ISSET_ID); } public void setHas_nullsIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HAS_NULLS_ISSET_ID, value); } public long getInt_min() { return this.int_min; } public TColumnRange setInt_min(long int_min) { this.int_min = int_min; setInt_minIsSet(true); return this; } public void unsetInt_min() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INT_MIN_ISSET_ID); } /** Returns true if field int_min is set (has been assigned a value) and false otherwise */ public boolean isSetInt_min() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INT_MIN_ISSET_ID); } public void setInt_minIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INT_MIN_ISSET_ID, value); } public long getInt_max() { return this.int_max; } public TColumnRange setInt_max(long int_max) { this.int_max = int_max; setInt_maxIsSet(true); return this; } public void unsetInt_max() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INT_MAX_ISSET_ID); } /** Returns true if field int_max is set (has been assigned a value) and false otherwise */ public boolean isSetInt_max() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INT_MAX_ISSET_ID); } public void setInt_maxIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INT_MAX_ISSET_ID, value); } public long getBucket() { return this.bucket; } public TColumnRange setBucket(long bucket) { this.bucket = bucket; setBucketIsSet(true); return this; } public void unsetBucket() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BUCKET_ISSET_ID); } /** Returns true if field bucket is set (has been assigned a value) and false otherwise */ public boolean isSetBucket() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BUCKET_ISSET_ID); } public void setBucketIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BUCKET_ISSET_ID, value); } public double getFp_min() { return this.fp_min; } public TColumnRange setFp_min(double fp_min) { this.fp_min = fp_min; setFp_minIsSet(true); return this; } public void unsetFp_min() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FP_MIN_ISSET_ID); } /** Returns true if field fp_min is set (has been assigned a value) and false otherwise */ public boolean isSetFp_min() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FP_MIN_ISSET_ID); } public void setFp_minIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FP_MIN_ISSET_ID, value); } public double getFp_max() { return this.fp_max; } public TColumnRange setFp_max(double fp_max) { this.fp_max = fp_max; setFp_maxIsSet(true); return this; } public void unsetFp_max() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FP_MAX_ISSET_ID); } /** Returns true if field fp_max is set (has been assigned a value) and false otherwise */ public boolean isSetFp_max() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FP_MAX_ISSET_ID); } public void setFp_maxIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FP_MAX_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TYPE: if (value == null) { unsetType(); } else { setType((TExpressionRangeType)value); } break; case COL_ID: if (value == null) { unsetCol_id(); } else { setCol_id((java.lang.Integer)value); } break; case TABLE_ID: if (value == null) { unsetTable_id(); } else { setTable_id((java.lang.Integer)value); } break; case HAS_NULLS: if (value == null) { unsetHas_nulls(); } else { setHas_nulls((java.lang.Boolean)value); } break; case INT_MIN: if (value == null) { unsetInt_min(); } else { setInt_min((java.lang.Long)value); } break; case INT_MAX: if (value == null) { unsetInt_max(); } else { setInt_max((java.lang.Long)value); } break; case BUCKET: if (value == null) { unsetBucket(); } else { setBucket((java.lang.Long)value); } break; case FP_MIN: if (value == null) { unsetFp_min(); } else { setFp_min((java.lang.Double)value); } break; case FP_MAX: if (value == null) { unsetFp_max(); } else { setFp_max((java.lang.Double)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TYPE: return getType(); case COL_ID: return getCol_id(); case TABLE_ID: return getTable_id(); case HAS_NULLS: return isHas_nulls(); case INT_MIN: return getInt_min(); case INT_MAX: return getInt_max(); case BUCKET: return getBucket(); case FP_MIN: return getFp_min(); case FP_MAX: return getFp_max(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case TYPE: return isSetType(); case COL_ID: return isSetCol_id(); case TABLE_ID: return isSetTable_id(); case HAS_NULLS: return isSetHas_nulls(); case INT_MIN: return isSetInt_min(); case INT_MAX: return isSetInt_max(); case BUCKET: return isSetBucket(); case FP_MIN: return isSetFp_min(); case FP_MAX: return isSetFp_max(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TColumnRange) return this.equals((TColumnRange)that); return false; } public boolean equals(TColumnRange that) { if (that == null) return false; if (this == that) return true; boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) return false; } boolean this_present_col_id = true; boolean that_present_col_id = true; if (this_present_col_id || that_present_col_id) { if (!(this_present_col_id && that_present_col_id)) return false; if (this.col_id != that.col_id) return false; } boolean this_present_table_id = true; boolean that_present_table_id = true; if (this_present_table_id || that_present_table_id) { if (!(this_present_table_id && that_present_table_id)) return false; if (this.table_id != that.table_id) return false; } boolean this_present_has_nulls = true; boolean that_present_has_nulls = true; if (this_present_has_nulls || that_present_has_nulls) { if (!(this_present_has_nulls && that_present_has_nulls)) return false; if (this.has_nulls != that.has_nulls) return false; } boolean this_present_int_min = true; boolean that_present_int_min = true; if (this_present_int_min || that_present_int_min) { if (!(this_present_int_min && that_present_int_min)) return false; if (this.int_min != that.int_min) return false; } boolean this_present_int_max = true; boolean that_present_int_max = true; if (this_present_int_max || that_present_int_max) { if (!(this_present_int_max && that_present_int_max)) return false; if (this.int_max != that.int_max) return false; } boolean this_present_bucket = true; boolean that_present_bucket = true; if (this_present_bucket || that_present_bucket) { if (!(this_present_bucket && that_present_bucket)) return false; if (this.bucket != that.bucket) return false; } boolean this_present_fp_min = true; boolean that_present_fp_min = true; if (this_present_fp_min || that_present_fp_min) { if (!(this_present_fp_min && that_present_fp_min)) return false; if (this.fp_min != that.fp_min) return false; } boolean this_present_fp_max = true; boolean that_present_fp_max = true; if (this_present_fp_max || that_present_fp_max) { if (!(this_present_fp_max && that_present_fp_max)) return false; if (this.fp_max != that.fp_max) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); if (isSetType()) hashCode = hashCode * 8191 + type.getValue(); hashCode = hashCode * 8191 + col_id; hashCode = hashCode * 8191 + table_id; hashCode = hashCode * 8191 + ((has_nulls) ? 131071 : 524287); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(int_min); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(int_max); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(bucket); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fp_min); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fp_max); return hashCode; } @Override public int compareTo(TColumnRange other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCol_id(), other.isSetCol_id()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_id, other.col_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTable_id(), other.isSetTable_id()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_id, other.table_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetHas_nulls(), other.isSetHas_nulls()); if (lastComparison != 0) { return lastComparison; } if (isSetHas_nulls()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.has_nulls, other.has_nulls); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetInt_min(), other.isSetInt_min()); if (lastComparison != 0) { return lastComparison; } if (isSetInt_min()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.int_min, other.int_min); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetInt_max(), other.isSetInt_max()); if (lastComparison != 0) { return lastComparison; } if (isSetInt_max()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.int_max, other.int_max); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetBucket(), other.isSetBucket()); if (lastComparison != 0) { return lastComparison; } if (isSetBucket()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bucket, other.bucket); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFp_min(), other.isSetFp_min()); if (lastComparison != 0) { return lastComparison; } if (isSetFp_min()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fp_min, other.fp_min); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFp_max(), other.isSetFp_max()); if (lastComparison != 0) { return lastComparison; } if (isSetFp_max()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fp_max, other.fp_max); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TColumnRange("); boolean first = true; sb.append("type:"); if (this.type == null) { sb.append("null"); } else { sb.append(this.type); } first = false; if (!first) sb.append(", "); sb.append("col_id:"); sb.append(this.col_id); first = false; if (!first) sb.append(", "); sb.append("table_id:"); sb.append(this.table_id); first = false; if (!first) sb.append(", "); sb.append("has_nulls:"); sb.append(this.has_nulls); first = false; if (!first) sb.append(", "); sb.append("int_min:"); sb.append(this.int_min); first = false; if (!first) sb.append(", "); sb.append("int_max:"); sb.append(this.int_max); first = false; if (!first) sb.append(", "); sb.append("bucket:"); sb.append(this.bucket); first = false; if (!first) sb.append(", "); sb.append("fp_min:"); sb.append(this.fp_min); first = false; if (!first) sb.append(", "); sb.append("fp_max:"); sb.append(this.fp_max); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TColumnRangeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TColumnRangeStandardScheme getScheme() { return new TColumnRangeStandardScheme(); } } private static class TColumnRangeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TColumnRange> { public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnRange struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.type = ai.heavy.thrift.server.TExpressionRangeType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // COL_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.col_id = iprot.readI32(); struct.setCol_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TABLE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // HAS_NULLS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.has_nulls = iprot.readBool(); struct.setHas_nullsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // INT_MIN if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.int_min = iprot.readI64(); struct.setInt_minIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // INT_MAX if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.int_max = iprot.readI64(); struct.setInt_maxIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // BUCKET if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.bucket = iprot.readI64(); struct.setBucketIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // FP_MIN if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.fp_min = iprot.readDouble(); struct.setFp_minIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // FP_MAX if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.fp_max = iprot.readDouble(); struct.setFp_maxIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TColumnRange struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(COL_ID_FIELD_DESC); oprot.writeI32(struct.col_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(TABLE_ID_FIELD_DESC); oprot.writeI32(struct.table_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(HAS_NULLS_FIELD_DESC); oprot.writeBool(struct.has_nulls); oprot.writeFieldEnd(); oprot.writeFieldBegin(INT_MIN_FIELD_DESC); oprot.writeI64(struct.int_min); oprot.writeFieldEnd(); oprot.writeFieldBegin(INT_MAX_FIELD_DESC); oprot.writeI64(struct.int_max); oprot.writeFieldEnd(); oprot.writeFieldBegin(BUCKET_FIELD_DESC); oprot.writeI64(struct.bucket); oprot.writeFieldEnd(); oprot.writeFieldBegin(FP_MIN_FIELD_DESC); oprot.writeDouble(struct.fp_min); oprot.writeFieldEnd(); oprot.writeFieldBegin(FP_MAX_FIELD_DESC); oprot.writeDouble(struct.fp_max); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TColumnRangeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TColumnRangeTupleScheme getScheme() { return new TColumnRangeTupleScheme(); } } private static class TColumnRangeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TColumnRange> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TColumnRange struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetType()) { optionals.set(0); } if (struct.isSetCol_id()) { optionals.set(1); } if (struct.isSetTable_id()) { optionals.set(2); } if (struct.isSetHas_nulls()) { optionals.set(3); } if (struct.isSetInt_min()) { optionals.set(4); } if (struct.isSetInt_max()) { optionals.set(5); } if (struct.isSetBucket()) { optionals.set(6); } if (struct.isSetFp_min()) { optionals.set(7); } if (struct.isSetFp_max()) { optionals.set(8); } oprot.writeBitSet(optionals, 9); if (struct.isSetType()) { oprot.writeI32(struct.type.getValue()); } if (struct.isSetCol_id()) { oprot.writeI32(struct.col_id); } if (struct.isSetTable_id()) { oprot.writeI32(struct.table_id); } if (struct.isSetHas_nulls()) { oprot.writeBool(struct.has_nulls); } if (struct.isSetInt_min()) { oprot.writeI64(struct.int_min); } if (struct.isSetInt_max()) { oprot.writeI64(struct.int_max); } if (struct.isSetBucket()) { oprot.writeI64(struct.bucket); } if (struct.isSetFp_min()) { oprot.writeDouble(struct.fp_min); } if (struct.isSetFp_max()) { oprot.writeDouble(struct.fp_max); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TColumnRange struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { struct.type = ai.heavy.thrift.server.TExpressionRangeType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } if (incoming.get(1)) { struct.col_id = iprot.readI32(); struct.setCol_idIsSet(true); } if (incoming.get(2)) { struct.table_id = iprot.readI32(); struct.setTable_idIsSet(true); } if (incoming.get(3)) { struct.has_nulls = iprot.readBool(); struct.setHas_nullsIsSet(true); } if (incoming.get(4)) { struct.int_min = iprot.readI64(); struct.setInt_minIsSet(true); } if (incoming.get(5)) { struct.int_max = iprot.readI64(); struct.setInt_maxIsSet(true); } if (incoming.get(6)) { struct.bucket = iprot.readI64(); struct.setBucketIsSet(true); } if (incoming.get(7)) { struct.fp_min = iprot.readDouble(); struct.setFp_minIsSet(true); } if (incoming.get(8)) { struct.fp_max = iprot.readDouble(); struct.setFp_maxIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TColumnType.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TColumnType implements org.apache.thrift.TBase<TColumnType, TColumnType._Fields>, java.io.Serializable, Cloneable, Comparable<TColumnType> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnType"); private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField COL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("col_type", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField IS_RESERVED_KEYWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("is_reserved_keyword", org.apache.thrift.protocol.TType.BOOL, (short)3); private static final org.apache.thrift.protocol.TField SRC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("src_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField IS_SYSTEM_FIELD_DESC = new org.apache.thrift.protocol.TField("is_system", org.apache.thrift.protocol.TType.BOOL, (short)5); private static final org.apache.thrift.protocol.TField IS_PHYSICAL_FIELD_DESC = new org.apache.thrift.protocol.TField("is_physical", org.apache.thrift.protocol.TType.BOOL, (short)6); private static final org.apache.thrift.protocol.TField COL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("col_id", org.apache.thrift.protocol.TType.I64, (short)7); private static final org.apache.thrift.protocol.TField DEFAULT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("default_value", org.apache.thrift.protocol.TType.STRING, (short)8); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TColumnTypeStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TColumnTypeTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String col_name; // required public @org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TTypeInfo col_type; // required public boolean is_reserved_keyword; // required public @org.apache.thrift.annotation.Nullable java.lang.String src_name; // required public boolean is_system; // required public boolean is_physical; // required public long col_id; // required public @org.apache.thrift.annotation.Nullable java.lang.String default_value; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { COL_NAME((short)1, "col_name"), COL_TYPE((short)2, "col_type"), IS_RESERVED_KEYWORD((short)3, "is_reserved_keyword"), SRC_NAME((short)4, "src_name"), IS_SYSTEM((short)5, "is_system"), IS_PHYSICAL((short)6, "is_physical"), COL_ID((short)7, "col_id"), DEFAULT_VALUE((short)8, "default_value"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // COL_NAME return COL_NAME; case 2: // COL_TYPE return COL_TYPE; case 3: // IS_RESERVED_KEYWORD return IS_RESERVED_KEYWORD; case 4: // SRC_NAME return SRC_NAME; case 5: // IS_SYSTEM return IS_SYSTEM; case 6: // IS_PHYSICAL return IS_PHYSICAL; case 7: // COL_ID return COL_ID; case 8: // DEFAULT_VALUE return DEFAULT_VALUE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __IS_RESERVED_KEYWORD_ISSET_ID = 0; private static final int __IS_SYSTEM_ISSET_ID = 1; private static final int __IS_PHYSICAL_ISSET_ID = 2; private static final int __COL_ID_ISSET_ID = 3; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.DEFAULT_VALUE}; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("col_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ai.heavy.thrift.server.TTypeInfo.class))); tmpMap.put(_Fields.IS_RESERVED_KEYWORD, new org.apache.thrift.meta_data.FieldMetaData("is_reserved_keyword", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.SRC_NAME, new org.apache.thrift.meta_data.FieldMetaData("src_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IS_SYSTEM, new org.apache.thrift.meta_data.FieldMetaData("is_system", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.IS_PHYSICAL, new org.apache.thrift.meta_data.FieldMetaData("is_physical", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.COL_ID, new org.apache.thrift.meta_data.FieldMetaData("col_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.DEFAULT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("default_value", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumnType.class, metaDataMap); } public TColumnType() { } public TColumnType( java.lang.String col_name, ai.heavy.thrift.server.TTypeInfo col_type, boolean is_reserved_keyword, java.lang.String src_name, boolean is_system, boolean is_physical, long col_id) { this(); this.col_name = col_name; this.col_type = col_type; this.is_reserved_keyword = is_reserved_keyword; setIs_reserved_keywordIsSet(true); this.src_name = src_name; this.is_system = is_system; setIs_systemIsSet(true); this.is_physical = is_physical; setIs_physicalIsSet(true); this.col_id = col_id; setCol_idIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public TColumnType(TColumnType other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetCol_name()) { this.col_name = other.col_name; } if (other.isSetCol_type()) { this.col_type = new ai.heavy.thrift.server.TTypeInfo(other.col_type); } this.is_reserved_keyword = other.is_reserved_keyword; if (other.isSetSrc_name()) { this.src_name = other.src_name; } this.is_system = other.is_system; this.is_physical = other.is_physical; this.col_id = other.col_id; if (other.isSetDefault_value()) { this.default_value = other.default_value; } } public TColumnType deepCopy() { return new TColumnType(this); } @Override public void clear() { this.col_name = null; this.col_type = null; setIs_reserved_keywordIsSet(false); this.is_reserved_keyword = false; this.src_name = null; setIs_systemIsSet(false); this.is_system = false; setIs_physicalIsSet(false); this.is_physical = false; setCol_idIsSet(false); this.col_id = 0; this.default_value = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getCol_name() { return this.col_name; } public TColumnType setCol_name(@org.apache.thrift.annotation.Nullable java.lang.String col_name) { this.col_name = col_name; return this; } public void unsetCol_name() { this.col_name = null; } /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ public boolean isSetCol_name() { return this.col_name != null; } public void setCol_nameIsSet(boolean value) { if (!value) { this.col_name = null; } } @org.apache.thrift.annotation.Nullable public ai.heavy.thrift.server.TTypeInfo getCol_type() { return this.col_type; } public TColumnType setCol_type(@org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TTypeInfo col_type) { this.col_type = col_type; return this; } public void unsetCol_type() { this.col_type = null; } /** Returns true if field col_type is set (has been assigned a value) and false otherwise */ public boolean isSetCol_type() { return this.col_type != null; } public void setCol_typeIsSet(boolean value) { if (!value) { this.col_type = null; } } public boolean isIs_reserved_keyword() { return this.is_reserved_keyword; } public TColumnType setIs_reserved_keyword(boolean is_reserved_keyword) { this.is_reserved_keyword = is_reserved_keyword; setIs_reserved_keywordIsSet(true); return this; } public void unsetIs_reserved_keyword() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_RESERVED_KEYWORD_ISSET_ID); } /** Returns true if field is_reserved_keyword is set (has been assigned a value) and false otherwise */ public boolean isSetIs_reserved_keyword() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_RESERVED_KEYWORD_ISSET_ID); } public void setIs_reserved_keywordIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_RESERVED_KEYWORD_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getSrc_name() { return this.src_name; } public TColumnType setSrc_name(@org.apache.thrift.annotation.Nullable java.lang.String src_name) { this.src_name = src_name; return this; } public void unsetSrc_name() { this.src_name = null; } /** Returns true if field src_name is set (has been assigned a value) and false otherwise */ public boolean isSetSrc_name() { return this.src_name != null; } public void setSrc_nameIsSet(boolean value) { if (!value) { this.src_name = null; } } public boolean isIs_system() { return this.is_system; } public TColumnType setIs_system(boolean is_system) { this.is_system = is_system; setIs_systemIsSet(true); return this; } public void unsetIs_system() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_SYSTEM_ISSET_ID); } /** Returns true if field is_system is set (has been assigned a value) and false otherwise */ public boolean isSetIs_system() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_SYSTEM_ISSET_ID); } public void setIs_systemIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_SYSTEM_ISSET_ID, value); } public boolean isIs_physical() { return this.is_physical; } public TColumnType setIs_physical(boolean is_physical) { this.is_physical = is_physical; setIs_physicalIsSet(true); return this; } public void unsetIs_physical() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_PHYSICAL_ISSET_ID); } /** Returns true if field is_physical is set (has been assigned a value) and false otherwise */ public boolean isSetIs_physical() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_PHYSICAL_ISSET_ID); } public void setIs_physicalIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_PHYSICAL_ISSET_ID, value); } public long getCol_id() { return this.col_id; } public TColumnType setCol_id(long col_id) { this.col_id = col_id; setCol_idIsSet(true); return this; } public void unsetCol_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COL_ID_ISSET_ID); } /** Returns true if field col_id is set (has been assigned a value) and false otherwise */ public boolean isSetCol_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COL_ID_ISSET_ID); } public void setCol_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COL_ID_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getDefault_value() { return this.default_value; } public TColumnType setDefault_value(@org.apache.thrift.annotation.Nullable java.lang.String default_value) { this.default_value = default_value; return this; } public void unsetDefault_value() { this.default_value = null; } /** Returns true if field default_value is set (has been assigned a value) and false otherwise */ public boolean isSetDefault_value() { return this.default_value != null; } public void setDefault_valueIsSet(boolean value) { if (!value) { this.default_value = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case COL_NAME: if (value == null) { unsetCol_name(); } else { setCol_name((java.lang.String)value); } break; case COL_TYPE: if (value == null) { unsetCol_type(); } else { setCol_type((ai.heavy.thrift.server.TTypeInfo)value); } break; case IS_RESERVED_KEYWORD: if (value == null) { unsetIs_reserved_keyword(); } else { setIs_reserved_keyword((java.lang.Boolean)value); } break; case SRC_NAME: if (value == null) { unsetSrc_name(); } else { setSrc_name((java.lang.String)value); } break; case IS_SYSTEM: if (value == null) { unsetIs_system(); } else { setIs_system((java.lang.Boolean)value); } break; case IS_PHYSICAL: if (value == null) { unsetIs_physical(); } else { setIs_physical((java.lang.Boolean)value); } break; case COL_ID: if (value == null) { unsetCol_id(); } else { setCol_id((java.lang.Long)value); } break; case DEFAULT_VALUE: if (value == null) { unsetDefault_value(); } else { setDefault_value((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case COL_NAME: return getCol_name(); case COL_TYPE: return getCol_type(); case IS_RESERVED_KEYWORD: return isIs_reserved_keyword(); case SRC_NAME: return getSrc_name(); case IS_SYSTEM: return isIs_system(); case IS_PHYSICAL: return isIs_physical(); case COL_ID: return getCol_id(); case DEFAULT_VALUE: return getDefault_value(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case COL_NAME: return isSetCol_name(); case COL_TYPE: return isSetCol_type(); case IS_RESERVED_KEYWORD: return isSetIs_reserved_keyword(); case SRC_NAME: return isSetSrc_name(); case IS_SYSTEM: return isSetIs_system(); case IS_PHYSICAL: return isSetIs_physical(); case COL_ID: return isSetCol_id(); case DEFAULT_VALUE: return isSetDefault_value(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TColumnType) return this.equals((TColumnType)that); return false; } public boolean equals(TColumnType that) { if (that == null) return false; if (this == that) return true; boolean this_present_col_name = true && this.isSetCol_name(); boolean that_present_col_name = true && that.isSetCol_name(); if (this_present_col_name || that_present_col_name) { if (!(this_present_col_name && that_present_col_name)) return false; if (!this.col_name.equals(that.col_name)) return false; } boolean this_present_col_type = true && this.isSetCol_type(); boolean that_present_col_type = true && that.isSetCol_type(); if (this_present_col_type || that_present_col_type) { if (!(this_present_col_type && that_present_col_type)) return false; if (!this.col_type.equals(that.col_type)) return false; } boolean this_present_is_reserved_keyword = true; boolean that_present_is_reserved_keyword = true; if (this_present_is_reserved_keyword || that_present_is_reserved_keyword) { if (!(this_present_is_reserved_keyword && that_present_is_reserved_keyword)) return false; if (this.is_reserved_keyword != that.is_reserved_keyword) return false; } boolean this_present_src_name = true && this.isSetSrc_name(); boolean that_present_src_name = true && that.isSetSrc_name(); if (this_present_src_name || that_present_src_name) { if (!(this_present_src_name && that_present_src_name)) return false; if (!this.src_name.equals(that.src_name)) return false; } boolean this_present_is_system = true; boolean that_present_is_system = true; if (this_present_is_system || that_present_is_system) { if (!(this_present_is_system && that_present_is_system)) return false; if (this.is_system != that.is_system) return false; } boolean this_present_is_physical = true; boolean that_present_is_physical = true; if (this_present_is_physical || that_present_is_physical) { if (!(this_present_is_physical && that_present_is_physical)) return false; if (this.is_physical != that.is_physical) return false; } boolean this_present_col_id = true; boolean that_present_col_id = true; if (this_present_col_id || that_present_col_id) { if (!(this_present_col_id && that_present_col_id)) return false; if (this.col_id != that.col_id) return false; } boolean this_present_default_value = true && this.isSetDefault_value(); boolean that_present_default_value = true && that.isSetDefault_value(); if (this_present_default_value || that_present_default_value) { if (!(this_present_default_value && that_present_default_value)) return false; if (!this.default_value.equals(that.default_value)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetCol_name()) ? 131071 : 524287); if (isSetCol_name()) hashCode = hashCode * 8191 + col_name.hashCode(); hashCode = hashCode * 8191 + ((isSetCol_type()) ? 131071 : 524287); if (isSetCol_type()) hashCode = hashCode * 8191 + col_type.hashCode(); hashCode = hashCode * 8191 + ((is_reserved_keyword) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetSrc_name()) ? 131071 : 524287); if (isSetSrc_name()) hashCode = hashCode * 8191 + src_name.hashCode(); hashCode = hashCode * 8191 + ((is_system) ? 131071 : 524287); hashCode = hashCode * 8191 + ((is_physical) ? 131071 : 524287); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(col_id); hashCode = hashCode * 8191 + ((isSetDefault_value()) ? 131071 : 524287); if (isSetDefault_value()) hashCode = hashCode * 8191 + default_value.hashCode(); return hashCode; } @Override public int compareTo(TColumnType other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetCol_name(), other.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.col_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCol_type(), other.isSetCol_type()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_type, other.col_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetIs_reserved_keyword(), other.isSetIs_reserved_keyword()); if (lastComparison != 0) { return lastComparison; } if (isSetIs_reserved_keyword()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_reserved_keyword, other.is_reserved_keyword); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSrc_name(), other.isSetSrc_name()); if (lastComparison != 0) { return lastComparison; } if (isSetSrc_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.src_name, other.src_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetIs_system(), other.isSetIs_system()); if (lastComparison != 0) { return lastComparison; } if (isSetIs_system()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_system, other.is_system); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetIs_physical(), other.isSetIs_physical()); if (lastComparison != 0) { return lastComparison; } if (isSetIs_physical()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_physical, other.is_physical); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCol_id(), other.isSetCol_id()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_id, other.col_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDefault_value(), other.isSetDefault_value()); if (lastComparison != 0) { return lastComparison; } if (isSetDefault_value()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.default_value, other.default_value); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TColumnType("); boolean first = true; sb.append("col_name:"); if (this.col_name == null) { sb.append("null"); } else { sb.append(this.col_name); } first = false; if (!first) sb.append(", "); sb.append("col_type:"); if (this.col_type == null) { sb.append("null"); } else { sb.append(this.col_type); } first = false; if (!first) sb.append(", "); sb.append("is_reserved_keyword:"); sb.append(this.is_reserved_keyword); first = false; if (!first) sb.append(", "); sb.append("src_name:"); if (this.src_name == null) { sb.append("null"); } else { sb.append(this.src_name); } first = false; if (!first) sb.append(", "); sb.append("is_system:"); sb.append(this.is_system); first = false; if (!first) sb.append(", "); sb.append("is_physical:"); sb.append(this.is_physical); first = false; if (!first) sb.append(", "); sb.append("col_id:"); sb.append(this.col_id); first = false; if (isSetDefault_value()) { if (!first) sb.append(", "); sb.append("default_value:"); if (this.default_value == null) { sb.append("null"); } else { sb.append(this.default_value); } first = false; } sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (col_type != null) { col_type.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TColumnTypeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TColumnTypeStandardScheme getScheme() { return new TColumnTypeStandardScheme(); } } private static class TColumnTypeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TColumnType> { public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnType struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // COL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.col_name = iprot.readString(); struct.setCol_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // COL_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.col_type = new ai.heavy.thrift.server.TTypeInfo(); struct.col_type.read(iprot); struct.setCol_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // IS_RESERVED_KEYWORD if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.is_reserved_keyword = iprot.readBool(); struct.setIs_reserved_keywordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // SRC_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.src_name = iprot.readString(); struct.setSrc_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // IS_SYSTEM if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.is_system = iprot.readBool(); struct.setIs_systemIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // IS_PHYSICAL if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.is_physical = iprot.readBool(); struct.setIs_physicalIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // COL_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.col_id = iprot.readI64(); struct.setCol_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // DEFAULT_VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.default_value = iprot.readString(); struct.setDefault_valueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TColumnType struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.col_name != null) { oprot.writeFieldBegin(COL_NAME_FIELD_DESC); oprot.writeString(struct.col_name); oprot.writeFieldEnd(); } if (struct.col_type != null) { oprot.writeFieldBegin(COL_TYPE_FIELD_DESC); struct.col_type.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(IS_RESERVED_KEYWORD_FIELD_DESC); oprot.writeBool(struct.is_reserved_keyword); oprot.writeFieldEnd(); if (struct.src_name != null) { oprot.writeFieldBegin(SRC_NAME_FIELD_DESC); oprot.writeString(struct.src_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(IS_SYSTEM_FIELD_DESC); oprot.writeBool(struct.is_system); oprot.writeFieldEnd(); oprot.writeFieldBegin(IS_PHYSICAL_FIELD_DESC); oprot.writeBool(struct.is_physical); oprot.writeFieldEnd(); oprot.writeFieldBegin(COL_ID_FIELD_DESC); oprot.writeI64(struct.col_id); oprot.writeFieldEnd(); if (struct.default_value != null) { if (struct.isSetDefault_value()) { oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); oprot.writeString(struct.default_value); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TColumnTypeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TColumnTypeTupleScheme getScheme() { return new TColumnTypeTupleScheme(); } } private static class TColumnTypeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TColumnType> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TColumnType struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetCol_name()) { optionals.set(0); } if (struct.isSetCol_type()) { optionals.set(1); } if (struct.isSetIs_reserved_keyword()) { optionals.set(2); } if (struct.isSetSrc_name()) { optionals.set(3); } if (struct.isSetIs_system()) { optionals.set(4); } if (struct.isSetIs_physical()) { optionals.set(5); } if (struct.isSetCol_id()) { optionals.set(6); } if (struct.isSetDefault_value()) { optionals.set(7); } oprot.writeBitSet(optionals, 8); if (struct.isSetCol_name()) { oprot.writeString(struct.col_name); } if (struct.isSetCol_type()) { struct.col_type.write(oprot); } if (struct.isSetIs_reserved_keyword()) { oprot.writeBool(struct.is_reserved_keyword); } if (struct.isSetSrc_name()) { oprot.writeString(struct.src_name); } if (struct.isSetIs_system()) { oprot.writeBool(struct.is_system); } if (struct.isSetIs_physical()) { oprot.writeBool(struct.is_physical); } if (struct.isSetCol_id()) { oprot.writeI64(struct.col_id); } if (struct.isSetDefault_value()) { oprot.writeString(struct.default_value); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TColumnType struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(8); if (incoming.get(0)) { struct.col_name = iprot.readString(); struct.setCol_nameIsSet(true); } if (incoming.get(1)) { struct.col_type = new ai.heavy.thrift.server.TTypeInfo(); struct.col_type.read(iprot); struct.setCol_typeIsSet(true); } if (incoming.get(2)) { struct.is_reserved_keyword = iprot.readBool(); struct.setIs_reserved_keywordIsSet(true); } if (incoming.get(3)) { struct.src_name = iprot.readString(); struct.setSrc_nameIsSet(true); } if (incoming.get(4)) { struct.is_system = iprot.readBool(); struct.setIs_systemIsSet(true); } if (incoming.get(5)) { struct.is_physical = iprot.readBool(); struct.setIs_physicalIsSet(true); } if (incoming.get(6)) { struct.col_id = iprot.readI64(); struct.setCol_idIsSet(true); } if (incoming.get(7)) { struct.default_value = iprot.readString(); struct.setDefault_valueIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TCopyParams.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TCopyParams implements org.apache.thrift.TBase<TCopyParams, TCopyParams._Fields>, java.io.Serializable, Cloneable, Comparable<TCopyParams> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCopyParams"); private static final org.apache.thrift.protocol.TField DELIMITER_FIELD_DESC = new org.apache.thrift.protocol.TField("delimiter", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField NULL_STR_FIELD_DESC = new org.apache.thrift.protocol.TField("null_str", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField HAS_HEADER_FIELD_DESC = new org.apache.thrift.protocol.TField("has_header", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField QUOTED_FIELD_DESC = new org.apache.thrift.protocol.TField("quoted", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final org.apache.thrift.protocol.TField QUOTE_FIELD_DESC = new org.apache.thrift.protocol.TField("quote", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.protocol.TField ESCAPE_FIELD_DESC = new org.apache.thrift.protocol.TField("escape", org.apache.thrift.protocol.TType.STRING, (short)6); private static final org.apache.thrift.protocol.TField LINE_DELIM_FIELD_DESC = new org.apache.thrift.protocol.TField("line_delim", org.apache.thrift.protocol.TType.STRING, (short)7); private static final org.apache.thrift.protocol.TField ARRAY_DELIM_FIELD_DESC = new org.apache.thrift.protocol.TField("array_delim", org.apache.thrift.protocol.TType.STRING, (short)8); private static final org.apache.thrift.protocol.TField ARRAY_BEGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("array_begin", org.apache.thrift.protocol.TType.STRING, (short)9); private static final org.apache.thrift.protocol.TField ARRAY_END_FIELD_DESC = new org.apache.thrift.protocol.TField("array_end", org.apache.thrift.protocol.TType.STRING, (short)10); private static final org.apache.thrift.protocol.TField THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("threads", org.apache.thrift.protocol.TType.I32, (short)11); private static final org.apache.thrift.protocol.TField SOURCE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("source_type", org.apache.thrift.protocol.TType.I32, (short)12); private static final org.apache.thrift.protocol.TField S3_ACCESS_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("s3_access_key", org.apache.thrift.protocol.TType.STRING, (short)13); private static final org.apache.thrift.protocol.TField S3_SECRET_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("s3_secret_key", org.apache.thrift.protocol.TType.STRING, (short)14); private static final org.apache.thrift.protocol.TField S3_REGION_FIELD_DESC = new org.apache.thrift.protocol.TField("s3_region", org.apache.thrift.protocol.TType.STRING, (short)15); private static final org.apache.thrift.protocol.TField GEO_COORDS_ENCODING_FIELD_DESC = new org.apache.thrift.protocol.TField("geo_coords_encoding", org.apache.thrift.protocol.TType.I32, (short)16); private static final org.apache.thrift.protocol.TField GEO_COORDS_COMP_PARAM_FIELD_DESC = new org.apache.thrift.protocol.TField("geo_coords_comp_param", org.apache.thrift.protocol.TType.I32, (short)17); private static final org.apache.thrift.protocol.TField GEO_COORDS_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("geo_coords_type", org.apache.thrift.protocol.TType.I32, (short)18); private static final org.apache.thrift.protocol.TField GEO_COORDS_SRID_FIELD_DESC = new org.apache.thrift.protocol.TField("geo_coords_srid", org.apache.thrift.protocol.TType.I32, (short)19); private static final org.apache.thrift.protocol.TField SANITIZE_COLUMN_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("sanitize_column_names", org.apache.thrift.protocol.TType.BOOL, (short)20); private static final org.apache.thrift.protocol.TField GEO_LAYER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("geo_layer_name", org.apache.thrift.protocol.TType.STRING, (short)21); private static final org.apache.thrift.protocol.TField S3_ENDPOINT_FIELD_DESC = new org.apache.thrift.protocol.TField("s3_endpoint", org.apache.thrift.protocol.TType.STRING, (short)22); private static final org.apache.thrift.protocol.TField GEO_ASSIGN_RENDER_GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("geo_assign_render_groups", org.apache.thrift.protocol.TType.BOOL, (short)23); private static final org.apache.thrift.protocol.TField GEO_EXPLODE_COLLECTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("geo_explode_collections", org.apache.thrift.protocol.TType.BOOL, (short)24); private static final org.apache.thrift.protocol.TField SOURCE_SRID_FIELD_DESC = new org.apache.thrift.protocol.TField("source_srid", org.apache.thrift.protocol.TType.I32, (short)25); private static final org.apache.thrift.protocol.TField S3_SESSION_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("s3_session_token", org.apache.thrift.protocol.TType.STRING, (short)26); private static final org.apache.thrift.protocol.TField RASTER_POINT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("raster_point_type", org.apache.thrift.protocol.TType.I32, (short)27); private static final org.apache.thrift.protocol.TField RASTER_IMPORT_BANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("raster_import_bands", org.apache.thrift.protocol.TType.STRING, (short)28); private static final org.apache.thrift.protocol.TField RASTER_SCANLINES_PER_THREAD_FIELD_DESC = new org.apache.thrift.protocol.TField("raster_scanlines_per_thread", org.apache.thrift.protocol.TType.I32, (short)29); private static final org.apache.thrift.protocol.TField RASTER_POINT_TRANSFORM_FIELD_DESC = new org.apache.thrift.protocol.TField("raster_point_transform", org.apache.thrift.protocol.TType.I32, (short)30); private static final org.apache.thrift.protocol.TField RASTER_POINT_COMPUTE_ANGLE_FIELD_DESC = new org.apache.thrift.protocol.TField("raster_point_compute_angle", org.apache.thrift.protocol.TType.BOOL, (short)31); private static final org.apache.thrift.protocol.TField RASTER_IMPORT_DIMENSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("raster_import_dimensions", org.apache.thrift.protocol.TType.STRING, (short)32); private static final org.apache.thrift.protocol.TField ODBC_DSN_FIELD_DESC = new org.apache.thrift.protocol.TField("odbc_dsn", org.apache.thrift.protocol.TType.STRING, (short)33); private static final org.apache.thrift.protocol.TField ODBC_CONNECTION_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("odbc_connection_string", org.apache.thrift.protocol.TType.STRING, (short)34); private static final org.apache.thrift.protocol.TField ODBC_SQL_SELECT_FIELD_DESC = new org.apache.thrift.protocol.TField("odbc_sql_select", org.apache.thrift.protocol.TType.STRING, (short)35); private static final org.apache.thrift.protocol.TField ODBC_SQL_ORDER_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("odbc_sql_order_by", org.apache.thrift.protocol.TType.STRING, (short)36); private static final org.apache.thrift.protocol.TField ODBC_USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("odbc_username", org.apache.thrift.protocol.TType.STRING, (short)37); private static final org.apache.thrift.protocol.TField ODBC_PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("odbc_password", org.apache.thrift.protocol.TType.STRING, (short)38); private static final org.apache.thrift.protocol.TField ODBC_CREDENTIAL_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("odbc_credential_string", org.apache.thrift.protocol.TType.STRING, (short)39); private static final org.apache.thrift.protocol.TField ADD_METADATA_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("add_metadata_columns", org.apache.thrift.protocol.TType.STRING, (short)40); private static final org.apache.thrift.protocol.TField TRIM_SPACES_FIELD_DESC = new org.apache.thrift.protocol.TField("trim_spaces", org.apache.thrift.protocol.TType.BOOL, (short)41); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCopyParamsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCopyParamsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String delimiter; // required public @org.apache.thrift.annotation.Nullable java.lang.String null_str; // required /** * * @see TImportHeaderRow */ public @org.apache.thrift.annotation.Nullable TImportHeaderRow has_header; // required public boolean quoted; // required public @org.apache.thrift.annotation.Nullable java.lang.String quote; // required public @org.apache.thrift.annotation.Nullable java.lang.String escape; // required public @org.apache.thrift.annotation.Nullable java.lang.String line_delim; // required public @org.apache.thrift.annotation.Nullable java.lang.String array_delim; // required public @org.apache.thrift.annotation.Nullable java.lang.String array_begin; // required public @org.apache.thrift.annotation.Nullable java.lang.String array_end; // required public int threads; // required /** * * @see TSourceType */ public @org.apache.thrift.annotation.Nullable TSourceType source_type; // required public @org.apache.thrift.annotation.Nullable java.lang.String s3_access_key; // required public @org.apache.thrift.annotation.Nullable java.lang.String s3_secret_key; // required public @org.apache.thrift.annotation.Nullable java.lang.String s3_region; // required /** * * @see ai.heavy.thrift.server.TEncodingType */ public @org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TEncodingType geo_coords_encoding; // required public int geo_coords_comp_param; // required /** * * @see ai.heavy.thrift.server.TDatumType */ public @org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TDatumType geo_coords_type; // required public int geo_coords_srid; // required public boolean sanitize_column_names; // required public @org.apache.thrift.annotation.Nullable java.lang.String geo_layer_name; // required public @org.apache.thrift.annotation.Nullable java.lang.String s3_endpoint; // required public boolean geo_assign_render_groups; // required public boolean geo_explode_collections; // required public int source_srid; // required public @org.apache.thrift.annotation.Nullable java.lang.String s3_session_token; // required /** * * @see TRasterPointType */ public @org.apache.thrift.annotation.Nullable TRasterPointType raster_point_type; // required public @org.apache.thrift.annotation.Nullable java.lang.String raster_import_bands; // required public int raster_scanlines_per_thread; // required /** * * @see TRasterPointTransform */ public @org.apache.thrift.annotation.Nullable TRasterPointTransform raster_point_transform; // required public boolean raster_point_compute_angle; // required public @org.apache.thrift.annotation.Nullable java.lang.String raster_import_dimensions; // required public @org.apache.thrift.annotation.Nullable java.lang.String odbc_dsn; // required public @org.apache.thrift.annotation.Nullable java.lang.String odbc_connection_string; // required public @org.apache.thrift.annotation.Nullable java.lang.String odbc_sql_select; // required public @org.apache.thrift.annotation.Nullable java.lang.String odbc_sql_order_by; // required public @org.apache.thrift.annotation.Nullable java.lang.String odbc_username; // required public @org.apache.thrift.annotation.Nullable java.lang.String odbc_password; // required public @org.apache.thrift.annotation.Nullable java.lang.String odbc_credential_string; // required public @org.apache.thrift.annotation.Nullable java.lang.String add_metadata_columns; // required public boolean trim_spaces; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { DELIMITER((short)1, "delimiter"), NULL_STR((short)2, "null_str"), /** * * @see TImportHeaderRow */ HAS_HEADER((short)3, "has_header"), QUOTED((short)4, "quoted"), QUOTE((short)5, "quote"), ESCAPE((short)6, "escape"), LINE_DELIM((short)7, "line_delim"), ARRAY_DELIM((short)8, "array_delim"), ARRAY_BEGIN((short)9, "array_begin"), ARRAY_END((short)10, "array_end"), THREADS((short)11, "threads"), /** * * @see TSourceType */ SOURCE_TYPE((short)12, "source_type"), S3_ACCESS_KEY((short)13, "s3_access_key"), S3_SECRET_KEY((short)14, "s3_secret_key"), S3_REGION((short)15, "s3_region"), /** * * @see ai.heavy.thrift.server.TEncodingType */ GEO_COORDS_ENCODING((short)16, "geo_coords_encoding"), GEO_COORDS_COMP_PARAM((short)17, "geo_coords_comp_param"), /** * * @see ai.heavy.thrift.server.TDatumType */ GEO_COORDS_TYPE((short)18, "geo_coords_type"), GEO_COORDS_SRID((short)19, "geo_coords_srid"), SANITIZE_COLUMN_NAMES((short)20, "sanitize_column_names"), GEO_LAYER_NAME((short)21, "geo_layer_name"), S3_ENDPOINT((short)22, "s3_endpoint"), GEO_ASSIGN_RENDER_GROUPS((short)23, "geo_assign_render_groups"), GEO_EXPLODE_COLLECTIONS((short)24, "geo_explode_collections"), SOURCE_SRID((short)25, "source_srid"), S3_SESSION_TOKEN((short)26, "s3_session_token"), /** * * @see TRasterPointType */ RASTER_POINT_TYPE((short)27, "raster_point_type"), RASTER_IMPORT_BANDS((short)28, "raster_import_bands"), RASTER_SCANLINES_PER_THREAD((short)29, "raster_scanlines_per_thread"), /** * * @see TRasterPointTransform */ RASTER_POINT_TRANSFORM((short)30, "raster_point_transform"), RASTER_POINT_COMPUTE_ANGLE((short)31, "raster_point_compute_angle"), RASTER_IMPORT_DIMENSIONS((short)32, "raster_import_dimensions"), ODBC_DSN((short)33, "odbc_dsn"), ODBC_CONNECTION_STRING((short)34, "odbc_connection_string"), ODBC_SQL_SELECT((short)35, "odbc_sql_select"), ODBC_SQL_ORDER_BY((short)36, "odbc_sql_order_by"), ODBC_USERNAME((short)37, "odbc_username"), ODBC_PASSWORD((short)38, "odbc_password"), ODBC_CREDENTIAL_STRING((short)39, "odbc_credential_string"), ADD_METADATA_COLUMNS((short)40, "add_metadata_columns"), TRIM_SPACES((short)41, "trim_spaces"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DELIMITER return DELIMITER; case 2: // NULL_STR return NULL_STR; case 3: // HAS_HEADER return HAS_HEADER; case 4: // QUOTED return QUOTED; case 5: // QUOTE return QUOTE; case 6: // ESCAPE return ESCAPE; case 7: // LINE_DELIM return LINE_DELIM; case 8: // ARRAY_DELIM return ARRAY_DELIM; case 9: // ARRAY_BEGIN return ARRAY_BEGIN; case 10: // ARRAY_END return ARRAY_END; case 11: // THREADS return THREADS; case 12: // SOURCE_TYPE return SOURCE_TYPE; case 13: // S3_ACCESS_KEY return S3_ACCESS_KEY; case 14: // S3_SECRET_KEY return S3_SECRET_KEY; case 15: // S3_REGION return S3_REGION; case 16: // GEO_COORDS_ENCODING return GEO_COORDS_ENCODING; case 17: // GEO_COORDS_COMP_PARAM return GEO_COORDS_COMP_PARAM; case 18: // GEO_COORDS_TYPE return GEO_COORDS_TYPE; case 19: // GEO_COORDS_SRID return GEO_COORDS_SRID; case 20: // SANITIZE_COLUMN_NAMES return SANITIZE_COLUMN_NAMES; case 21: // GEO_LAYER_NAME return GEO_LAYER_NAME; case 22: // S3_ENDPOINT return S3_ENDPOINT; case 23: // GEO_ASSIGN_RENDER_GROUPS return GEO_ASSIGN_RENDER_GROUPS; case 24: // GEO_EXPLODE_COLLECTIONS return GEO_EXPLODE_COLLECTIONS; case 25: // SOURCE_SRID return SOURCE_SRID; case 26: // S3_SESSION_TOKEN return S3_SESSION_TOKEN; case 27: // RASTER_POINT_TYPE return RASTER_POINT_TYPE; case 28: // RASTER_IMPORT_BANDS return RASTER_IMPORT_BANDS; case 29: // RASTER_SCANLINES_PER_THREAD return RASTER_SCANLINES_PER_THREAD; case 30: // RASTER_POINT_TRANSFORM return RASTER_POINT_TRANSFORM; case 31: // RASTER_POINT_COMPUTE_ANGLE return RASTER_POINT_COMPUTE_ANGLE; case 32: // RASTER_IMPORT_DIMENSIONS return RASTER_IMPORT_DIMENSIONS; case 33: // ODBC_DSN return ODBC_DSN; case 34: // ODBC_CONNECTION_STRING return ODBC_CONNECTION_STRING; case 35: // ODBC_SQL_SELECT return ODBC_SQL_SELECT; case 36: // ODBC_SQL_ORDER_BY return ODBC_SQL_ORDER_BY; case 37: // ODBC_USERNAME return ODBC_USERNAME; case 38: // ODBC_PASSWORD return ODBC_PASSWORD; case 39: // ODBC_CREDENTIAL_STRING return ODBC_CREDENTIAL_STRING; case 40: // ADD_METADATA_COLUMNS return ADD_METADATA_COLUMNS; case 41: // TRIM_SPACES return TRIM_SPACES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __QUOTED_ISSET_ID = 0; private static final int __THREADS_ISSET_ID = 1; private static final int __GEO_COORDS_COMP_PARAM_ISSET_ID = 2; private static final int __GEO_COORDS_SRID_ISSET_ID = 3; private static final int __SANITIZE_COLUMN_NAMES_ISSET_ID = 4; private static final int __GEO_ASSIGN_RENDER_GROUPS_ISSET_ID = 5; private static final int __GEO_EXPLODE_COLLECTIONS_ISSET_ID = 6; private static final int __SOURCE_SRID_ISSET_ID = 7; private static final int __RASTER_SCANLINES_PER_THREAD_ISSET_ID = 8; private static final int __RASTER_POINT_COMPUTE_ANGLE_ISSET_ID = 9; private static final int __TRIM_SPACES_ISSET_ID = 10; private short __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DELIMITER, new org.apache.thrift.meta_data.FieldMetaData("delimiter", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NULL_STR, new org.apache.thrift.meta_data.FieldMetaData("null_str", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.HAS_HEADER, new org.apache.thrift.meta_data.FieldMetaData("has_header", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TImportHeaderRow.class))); tmpMap.put(_Fields.QUOTED, new org.apache.thrift.meta_data.FieldMetaData("quoted", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.QUOTE, new org.apache.thrift.meta_data.FieldMetaData("quote", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ESCAPE, new org.apache.thrift.meta_data.FieldMetaData("escape", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.LINE_DELIM, new org.apache.thrift.meta_data.FieldMetaData("line_delim", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ARRAY_DELIM, new org.apache.thrift.meta_data.FieldMetaData("array_delim", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ARRAY_BEGIN, new org.apache.thrift.meta_data.FieldMetaData("array_begin", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ARRAY_END, new org.apache.thrift.meta_data.FieldMetaData("array_end", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.THREADS, new org.apache.thrift.meta_data.FieldMetaData("threads", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.SOURCE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("source_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TSourceType.class))); tmpMap.put(_Fields.S3_ACCESS_KEY, new org.apache.thrift.meta_data.FieldMetaData("s3_access_key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.S3_SECRET_KEY, new org.apache.thrift.meta_data.FieldMetaData("s3_secret_key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.S3_REGION, new org.apache.thrift.meta_data.FieldMetaData("s3_region", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GEO_COORDS_ENCODING, new org.apache.thrift.meta_data.FieldMetaData("geo_coords_encoding", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ai.heavy.thrift.server.TEncodingType.class))); tmpMap.put(_Fields.GEO_COORDS_COMP_PARAM, new org.apache.thrift.meta_data.FieldMetaData("geo_coords_comp_param", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.GEO_COORDS_TYPE, new org.apache.thrift.meta_data.FieldMetaData("geo_coords_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ai.heavy.thrift.server.TDatumType.class))); tmpMap.put(_Fields.GEO_COORDS_SRID, new org.apache.thrift.meta_data.FieldMetaData("geo_coords_srid", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.SANITIZE_COLUMN_NAMES, new org.apache.thrift.meta_data.FieldMetaData("sanitize_column_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.GEO_LAYER_NAME, new org.apache.thrift.meta_data.FieldMetaData("geo_layer_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.S3_ENDPOINT, new org.apache.thrift.meta_data.FieldMetaData("s3_endpoint", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GEO_ASSIGN_RENDER_GROUPS, new org.apache.thrift.meta_data.FieldMetaData("geo_assign_render_groups", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.GEO_EXPLODE_COLLECTIONS, new org.apache.thrift.meta_data.FieldMetaData("geo_explode_collections", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.SOURCE_SRID, new org.apache.thrift.meta_data.FieldMetaData("source_srid", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.S3_SESSION_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("s3_session_token", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RASTER_POINT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("raster_point_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TRasterPointType.class))); tmpMap.put(_Fields.RASTER_IMPORT_BANDS, new org.apache.thrift.meta_data.FieldMetaData("raster_import_bands", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RASTER_SCANLINES_PER_THREAD, new org.apache.thrift.meta_data.FieldMetaData("raster_scanlines_per_thread", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.RASTER_POINT_TRANSFORM, new org.apache.thrift.meta_data.FieldMetaData("raster_point_transform", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TRasterPointTransform.class))); tmpMap.put(_Fields.RASTER_POINT_COMPUTE_ANGLE, new org.apache.thrift.meta_data.FieldMetaData("raster_point_compute_angle", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.RASTER_IMPORT_DIMENSIONS, new org.apache.thrift.meta_data.FieldMetaData("raster_import_dimensions", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ODBC_DSN, new org.apache.thrift.meta_data.FieldMetaData("odbc_dsn", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ODBC_CONNECTION_STRING, new org.apache.thrift.meta_data.FieldMetaData("odbc_connection_string", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ODBC_SQL_SELECT, new org.apache.thrift.meta_data.FieldMetaData("odbc_sql_select", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ODBC_SQL_ORDER_BY, new org.apache.thrift.meta_data.FieldMetaData("odbc_sql_order_by", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ODBC_USERNAME, new org.apache.thrift.meta_data.FieldMetaData("odbc_username", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ODBC_PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("odbc_password", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ODBC_CREDENTIAL_STRING, new org.apache.thrift.meta_data.FieldMetaData("odbc_credential_string", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ADD_METADATA_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("add_metadata_columns", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TRIM_SPACES, new org.apache.thrift.meta_data.FieldMetaData("trim_spaces", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCopyParams.class, metaDataMap); } public TCopyParams() { this.has_header = ai.heavy.thrift.server.TImportHeaderRow.AUTODETECT; this.source_type = ai.heavy.thrift.server.TSourceType.DELIMITED_FILE; this.geo_coords_encoding = ai.heavy.thrift.server.TEncodingType.GEOINT; this.geo_coords_comp_param = 32; this.geo_coords_type = ai.heavy.thrift.server.TDatumType.GEOMETRY; this.geo_coords_srid = 4326; this.sanitize_column_names = true; this.geo_assign_render_groups = true; this.geo_explode_collections = false; this.source_srid = 0; this.raster_point_type = ai.heavy.thrift.server.TRasterPointType.AUTO; this.raster_point_transform = ai.heavy.thrift.server.TRasterPointTransform.AUTO; this.raster_point_compute_angle = false; } public TCopyParams( java.lang.String delimiter, java.lang.String null_str, TImportHeaderRow has_header, boolean quoted, java.lang.String quote, java.lang.String escape, java.lang.String line_delim, java.lang.String array_delim, java.lang.String array_begin, java.lang.String array_end, int threads, TSourceType source_type, java.lang.String s3_access_key, java.lang.String s3_secret_key, java.lang.String s3_region, ai.heavy.thrift.server.TEncodingType geo_coords_encoding, int geo_coords_comp_param, ai.heavy.thrift.server.TDatumType geo_coords_type, int geo_coords_srid, boolean sanitize_column_names, java.lang.String geo_layer_name, java.lang.String s3_endpoint, boolean geo_assign_render_groups, boolean geo_explode_collections, int source_srid, java.lang.String s3_session_token, TRasterPointType raster_point_type, java.lang.String raster_import_bands, int raster_scanlines_per_thread, TRasterPointTransform raster_point_transform, boolean raster_point_compute_angle, java.lang.String raster_import_dimensions, java.lang.String odbc_dsn, java.lang.String odbc_connection_string, java.lang.String odbc_sql_select, java.lang.String odbc_sql_order_by, java.lang.String odbc_username, java.lang.String odbc_password, java.lang.String odbc_credential_string, java.lang.String add_metadata_columns, boolean trim_spaces) { this(); this.delimiter = delimiter; this.null_str = null_str; this.has_header = has_header; this.quoted = quoted; setQuotedIsSet(true); this.quote = quote; this.escape = escape; this.line_delim = line_delim; this.array_delim = array_delim; this.array_begin = array_begin; this.array_end = array_end; this.threads = threads; setThreadsIsSet(true); this.source_type = source_type; this.s3_access_key = s3_access_key; this.s3_secret_key = s3_secret_key; this.s3_region = s3_region; this.geo_coords_encoding = geo_coords_encoding; this.geo_coords_comp_param = geo_coords_comp_param; setGeo_coords_comp_paramIsSet(true); this.geo_coords_type = geo_coords_type; this.geo_coords_srid = geo_coords_srid; setGeo_coords_sridIsSet(true); this.sanitize_column_names = sanitize_column_names; setSanitize_column_namesIsSet(true); this.geo_layer_name = geo_layer_name; this.s3_endpoint = s3_endpoint; this.geo_assign_render_groups = geo_assign_render_groups; setGeo_assign_render_groupsIsSet(true); this.geo_explode_collections = geo_explode_collections; setGeo_explode_collectionsIsSet(true); this.source_srid = source_srid; setSource_sridIsSet(true); this.s3_session_token = s3_session_token; this.raster_point_type = raster_point_type; this.raster_import_bands = raster_import_bands; this.raster_scanlines_per_thread = raster_scanlines_per_thread; setRaster_scanlines_per_threadIsSet(true); this.raster_point_transform = raster_point_transform; this.raster_point_compute_angle = raster_point_compute_angle; setRaster_point_compute_angleIsSet(true); this.raster_import_dimensions = raster_import_dimensions; this.odbc_dsn = odbc_dsn; this.odbc_connection_string = odbc_connection_string; this.odbc_sql_select = odbc_sql_select; this.odbc_sql_order_by = odbc_sql_order_by; this.odbc_username = odbc_username; this.odbc_password = odbc_password; this.odbc_credential_string = odbc_credential_string; this.add_metadata_columns = add_metadata_columns; this.trim_spaces = trim_spaces; setTrim_spacesIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public TCopyParams(TCopyParams other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDelimiter()) { this.delimiter = other.delimiter; } if (other.isSetNull_str()) { this.null_str = other.null_str; } if (other.isSetHas_header()) { this.has_header = other.has_header; } this.quoted = other.quoted; if (other.isSetQuote()) { this.quote = other.quote; } if (other.isSetEscape()) { this.escape = other.escape; } if (other.isSetLine_delim()) { this.line_delim = other.line_delim; } if (other.isSetArray_delim()) { this.array_delim = other.array_delim; } if (other.isSetArray_begin()) { this.array_begin = other.array_begin; } if (other.isSetArray_end()) { this.array_end = other.array_end; } this.threads = other.threads; if (other.isSetSource_type()) { this.source_type = other.source_type; } if (other.isSetS3_access_key()) { this.s3_access_key = other.s3_access_key; } if (other.isSetS3_secret_key()) { this.s3_secret_key = other.s3_secret_key; } if (other.isSetS3_region()) { this.s3_region = other.s3_region; } if (other.isSetGeo_coords_encoding()) { this.geo_coords_encoding = other.geo_coords_encoding; } this.geo_coords_comp_param = other.geo_coords_comp_param; if (other.isSetGeo_coords_type()) { this.geo_coords_type = other.geo_coords_type; } this.geo_coords_srid = other.geo_coords_srid; this.sanitize_column_names = other.sanitize_column_names; if (other.isSetGeo_layer_name()) { this.geo_layer_name = other.geo_layer_name; } if (other.isSetS3_endpoint()) { this.s3_endpoint = other.s3_endpoint; } this.geo_assign_render_groups = other.geo_assign_render_groups; this.geo_explode_collections = other.geo_explode_collections; this.source_srid = other.source_srid; if (other.isSetS3_session_token()) { this.s3_session_token = other.s3_session_token; } if (other.isSetRaster_point_type()) { this.raster_point_type = other.raster_point_type; } if (other.isSetRaster_import_bands()) { this.raster_import_bands = other.raster_import_bands; } this.raster_scanlines_per_thread = other.raster_scanlines_per_thread; if (other.isSetRaster_point_transform()) { this.raster_point_transform = other.raster_point_transform; } this.raster_point_compute_angle = other.raster_point_compute_angle; if (other.isSetRaster_import_dimensions()) { this.raster_import_dimensions = other.raster_import_dimensions; } if (other.isSetOdbc_dsn()) { this.odbc_dsn = other.odbc_dsn; } if (other.isSetOdbc_connection_string()) { this.odbc_connection_string = other.odbc_connection_string; } if (other.isSetOdbc_sql_select()) { this.odbc_sql_select = other.odbc_sql_select; } if (other.isSetOdbc_sql_order_by()) { this.odbc_sql_order_by = other.odbc_sql_order_by; } if (other.isSetOdbc_username()) { this.odbc_username = other.odbc_username; } if (other.isSetOdbc_password()) { this.odbc_password = other.odbc_password; } if (other.isSetOdbc_credential_string()) { this.odbc_credential_string = other.odbc_credential_string; } if (other.isSetAdd_metadata_columns()) { this.add_metadata_columns = other.add_metadata_columns; } this.trim_spaces = other.trim_spaces; } public TCopyParams deepCopy() { return new TCopyParams(this); } @Override public void clear() { this.delimiter = null; this.null_str = null; this.has_header = ai.heavy.thrift.server.TImportHeaderRow.AUTODETECT; setQuotedIsSet(false); this.quoted = false; this.quote = null; this.escape = null; this.line_delim = null; this.array_delim = null; this.array_begin = null; this.array_end = null; setThreadsIsSet(false); this.threads = 0; this.source_type = ai.heavy.thrift.server.TSourceType.DELIMITED_FILE; this.s3_access_key = null; this.s3_secret_key = null; this.s3_region = null; this.geo_coords_encoding = ai.heavy.thrift.server.TEncodingType.GEOINT; this.geo_coords_comp_param = 32; this.geo_coords_type = ai.heavy.thrift.server.TDatumType.GEOMETRY; this.geo_coords_srid = 4326; this.sanitize_column_names = true; this.geo_layer_name = null; this.s3_endpoint = null; this.geo_assign_render_groups = true; this.geo_explode_collections = false; this.source_srid = 0; this.s3_session_token = null; this.raster_point_type = ai.heavy.thrift.server.TRasterPointType.AUTO; this.raster_import_bands = null; setRaster_scanlines_per_threadIsSet(false); this.raster_scanlines_per_thread = 0; this.raster_point_transform = ai.heavy.thrift.server.TRasterPointTransform.AUTO; this.raster_point_compute_angle = false; this.raster_import_dimensions = null; this.odbc_dsn = null; this.odbc_connection_string = null; this.odbc_sql_select = null; this.odbc_sql_order_by = null; this.odbc_username = null; this.odbc_password = null; this.odbc_credential_string = null; this.add_metadata_columns = null; setTrim_spacesIsSet(false); this.trim_spaces = false; } @org.apache.thrift.annotation.Nullable public java.lang.String getDelimiter() { return this.delimiter; } public TCopyParams setDelimiter(@org.apache.thrift.annotation.Nullable java.lang.String delimiter) { this.delimiter = delimiter; return this; } public void unsetDelimiter() { this.delimiter = null; } /** Returns true if field delimiter is set (has been assigned a value) and false otherwise */ public boolean isSetDelimiter() { return this.delimiter != null; } public void setDelimiterIsSet(boolean value) { if (!value) { this.delimiter = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getNull_str() { return this.null_str; } public TCopyParams setNull_str(@org.apache.thrift.annotation.Nullable java.lang.String null_str) { this.null_str = null_str; return this; } public void unsetNull_str() { this.null_str = null; } /** Returns true if field null_str is set (has been assigned a value) and false otherwise */ public boolean isSetNull_str() { return this.null_str != null; } public void setNull_strIsSet(boolean value) { if (!value) { this.null_str = null; } } /** * * @see TImportHeaderRow */ @org.apache.thrift.annotation.Nullable public TImportHeaderRow getHas_header() { return this.has_header; } /** * * @see TImportHeaderRow */ public TCopyParams setHas_header(@org.apache.thrift.annotation.Nullable TImportHeaderRow has_header) { this.has_header = has_header; return this; } public void unsetHas_header() { this.has_header = null; } /** Returns true if field has_header is set (has been assigned a value) and false otherwise */ public boolean isSetHas_header() { return this.has_header != null; } public void setHas_headerIsSet(boolean value) { if (!value) { this.has_header = null; } } public boolean isQuoted() { return this.quoted; } public TCopyParams setQuoted(boolean quoted) { this.quoted = quoted; setQuotedIsSet(true); return this; } public void unsetQuoted() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUOTED_ISSET_ID); } /** Returns true if field quoted is set (has been assigned a value) and false otherwise */ public boolean isSetQuoted() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUOTED_ISSET_ID); } public void setQuotedIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUOTED_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getQuote() { return this.quote; } public TCopyParams setQuote(@org.apache.thrift.annotation.Nullable java.lang.String quote) { this.quote = quote; return this; } public void unsetQuote() { this.quote = null; } /** Returns true if field quote is set (has been assigned a value) and false otherwise */ public boolean isSetQuote() { return this.quote != null; } public void setQuoteIsSet(boolean value) { if (!value) { this.quote = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getEscape() { return this.escape; } public TCopyParams setEscape(@org.apache.thrift.annotation.Nullable java.lang.String escape) { this.escape = escape; return this; } public void unsetEscape() { this.escape = null; } /** Returns true if field escape is set (has been assigned a value) and false otherwise */ public boolean isSetEscape() { return this.escape != null; } public void setEscapeIsSet(boolean value) { if (!value) { this.escape = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLine_delim() { return this.line_delim; } public TCopyParams setLine_delim(@org.apache.thrift.annotation.Nullable java.lang.String line_delim) { this.line_delim = line_delim; return this; } public void unsetLine_delim() { this.line_delim = null; } /** Returns true if field line_delim is set (has been assigned a value) and false otherwise */ public boolean isSetLine_delim() { return this.line_delim != null; } public void setLine_delimIsSet(boolean value) { if (!value) { this.line_delim = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getArray_delim() { return this.array_delim; } public TCopyParams setArray_delim(@org.apache.thrift.annotation.Nullable java.lang.String array_delim) { this.array_delim = array_delim; return this; } public void unsetArray_delim() { this.array_delim = null; } /** Returns true if field array_delim is set (has been assigned a value) and false otherwise */ public boolean isSetArray_delim() { return this.array_delim != null; } public void setArray_delimIsSet(boolean value) { if (!value) { this.array_delim = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getArray_begin() { return this.array_begin; } public TCopyParams setArray_begin(@org.apache.thrift.annotation.Nullable java.lang.String array_begin) { this.array_begin = array_begin; return this; } public void unsetArray_begin() { this.array_begin = null; } /** Returns true if field array_begin is set (has been assigned a value) and false otherwise */ public boolean isSetArray_begin() { return this.array_begin != null; } public void setArray_beginIsSet(boolean value) { if (!value) { this.array_begin = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getArray_end() { return this.array_end; } public TCopyParams setArray_end(@org.apache.thrift.annotation.Nullable java.lang.String array_end) { this.array_end = array_end; return this; } public void unsetArray_end() { this.array_end = null; } /** Returns true if field array_end is set (has been assigned a value) and false otherwise */ public boolean isSetArray_end() { return this.array_end != null; } public void setArray_endIsSet(boolean value) { if (!value) { this.array_end = null; } } public int getThreads() { return this.threads; } public TCopyParams setThreads(int threads) { this.threads = threads; setThreadsIsSet(true); return this; } public void unsetThreads() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __THREADS_ISSET_ID); } /** Returns true if field threads is set (has been assigned a value) and false otherwise */ public boolean isSetThreads() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __THREADS_ISSET_ID); } public void setThreadsIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __THREADS_ISSET_ID, value); } /** * * @see TSourceType */ @org.apache.thrift.annotation.Nullable public TSourceType getSource_type() { return this.source_type; } /** * * @see TSourceType */ public TCopyParams setSource_type(@org.apache.thrift.annotation.Nullable TSourceType source_type) { this.source_type = source_type; return this; } public void unsetSource_type() { this.source_type = null; } /** Returns true if field source_type is set (has been assigned a value) and false otherwise */ public boolean isSetSource_type() { return this.source_type != null; } public void setSource_typeIsSet(boolean value) { if (!value) { this.source_type = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getS3_access_key() { return this.s3_access_key; } public TCopyParams setS3_access_key(@org.apache.thrift.annotation.Nullable java.lang.String s3_access_key) { this.s3_access_key = s3_access_key; return this; } public void unsetS3_access_key() { this.s3_access_key = null; } /** Returns true if field s3_access_key is set (has been assigned a value) and false otherwise */ public boolean isSetS3_access_key() { return this.s3_access_key != null; } public void setS3_access_keyIsSet(boolean value) { if (!value) { this.s3_access_key = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getS3_secret_key() { return this.s3_secret_key; } public TCopyParams setS3_secret_key(@org.apache.thrift.annotation.Nullable java.lang.String s3_secret_key) { this.s3_secret_key = s3_secret_key; return this; } public void unsetS3_secret_key() { this.s3_secret_key = null; } /** Returns true if field s3_secret_key is set (has been assigned a value) and false otherwise */ public boolean isSetS3_secret_key() { return this.s3_secret_key != null; } public void setS3_secret_keyIsSet(boolean value) { if (!value) { this.s3_secret_key = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getS3_region() { return this.s3_region; } public TCopyParams setS3_region(@org.apache.thrift.annotation.Nullable java.lang.String s3_region) { this.s3_region = s3_region; return this; } public void unsetS3_region() { this.s3_region = null; } /** Returns true if field s3_region is set (has been assigned a value) and false otherwise */ public boolean isSetS3_region() { return this.s3_region != null; } public void setS3_regionIsSet(boolean value) { if (!value) { this.s3_region = null; } } /** * * @see ai.heavy.thrift.server.TEncodingType */ @org.apache.thrift.annotation.Nullable public ai.heavy.thrift.server.TEncodingType getGeo_coords_encoding() { return this.geo_coords_encoding; } /** * * @see ai.heavy.thrift.server.TEncodingType */ public TCopyParams setGeo_coords_encoding(@org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TEncodingType geo_coords_encoding) { this.geo_coords_encoding = geo_coords_encoding; return this; } public void unsetGeo_coords_encoding() { this.geo_coords_encoding = null; } /** Returns true if field geo_coords_encoding is set (has been assigned a value) and false otherwise */ public boolean isSetGeo_coords_encoding() { return this.geo_coords_encoding != null; } public void setGeo_coords_encodingIsSet(boolean value) { if (!value) { this.geo_coords_encoding = null; } } public int getGeo_coords_comp_param() { return this.geo_coords_comp_param; } public TCopyParams setGeo_coords_comp_param(int geo_coords_comp_param) { this.geo_coords_comp_param = geo_coords_comp_param; setGeo_coords_comp_paramIsSet(true); return this; } public void unsetGeo_coords_comp_param() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __GEO_COORDS_COMP_PARAM_ISSET_ID); } /** Returns true if field geo_coords_comp_param is set (has been assigned a value) and false otherwise */ public boolean isSetGeo_coords_comp_param() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __GEO_COORDS_COMP_PARAM_ISSET_ID); } public void setGeo_coords_comp_paramIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __GEO_COORDS_COMP_PARAM_ISSET_ID, value); } /** * * @see ai.heavy.thrift.server.TDatumType */ @org.apache.thrift.annotation.Nullable public ai.heavy.thrift.server.TDatumType getGeo_coords_type() { return this.geo_coords_type; } /** * * @see ai.heavy.thrift.server.TDatumType */ public TCopyParams setGeo_coords_type(@org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TDatumType geo_coords_type) { this.geo_coords_type = geo_coords_type; return this; } public void unsetGeo_coords_type() { this.geo_coords_type = null; } /** Returns true if field geo_coords_type is set (has been assigned a value) and false otherwise */ public boolean isSetGeo_coords_type() { return this.geo_coords_type != null; } public void setGeo_coords_typeIsSet(boolean value) { if (!value) { this.geo_coords_type = null; } } public int getGeo_coords_srid() { return this.geo_coords_srid; } public TCopyParams setGeo_coords_srid(int geo_coords_srid) { this.geo_coords_srid = geo_coords_srid; setGeo_coords_sridIsSet(true); return this; } public void unsetGeo_coords_srid() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __GEO_COORDS_SRID_ISSET_ID); } /** Returns true if field geo_coords_srid is set (has been assigned a value) and false otherwise */ public boolean isSetGeo_coords_srid() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __GEO_COORDS_SRID_ISSET_ID); } public void setGeo_coords_sridIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __GEO_COORDS_SRID_ISSET_ID, value); } public boolean isSanitize_column_names() { return this.sanitize_column_names; } public TCopyParams setSanitize_column_names(boolean sanitize_column_names) { this.sanitize_column_names = sanitize_column_names; setSanitize_column_namesIsSet(true); return this; } public void unsetSanitize_column_names() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SANITIZE_COLUMN_NAMES_ISSET_ID); } /** Returns true if field sanitize_column_names is set (has been assigned a value) and false otherwise */ public boolean isSetSanitize_column_names() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SANITIZE_COLUMN_NAMES_ISSET_ID); } public void setSanitize_column_namesIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SANITIZE_COLUMN_NAMES_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getGeo_layer_name() { return this.geo_layer_name; } public TCopyParams setGeo_layer_name(@org.apache.thrift.annotation.Nullable java.lang.String geo_layer_name) { this.geo_layer_name = geo_layer_name; return this; } public void unsetGeo_layer_name() { this.geo_layer_name = null; } /** Returns true if field geo_layer_name is set (has been assigned a value) and false otherwise */ public boolean isSetGeo_layer_name() { return this.geo_layer_name != null; } public void setGeo_layer_nameIsSet(boolean value) { if (!value) { this.geo_layer_name = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getS3_endpoint() { return this.s3_endpoint; } public TCopyParams setS3_endpoint(@org.apache.thrift.annotation.Nullable java.lang.String s3_endpoint) { this.s3_endpoint = s3_endpoint; return this; } public void unsetS3_endpoint() { this.s3_endpoint = null; } /** Returns true if field s3_endpoint is set (has been assigned a value) and false otherwise */ public boolean isSetS3_endpoint() { return this.s3_endpoint != null; } public void setS3_endpointIsSet(boolean value) { if (!value) { this.s3_endpoint = null; } } public boolean isGeo_assign_render_groups() { return this.geo_assign_render_groups; } public TCopyParams setGeo_assign_render_groups(boolean geo_assign_render_groups) { this.geo_assign_render_groups = geo_assign_render_groups; setGeo_assign_render_groupsIsSet(true); return this; } public void unsetGeo_assign_render_groups() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __GEO_ASSIGN_RENDER_GROUPS_ISSET_ID); } /** Returns true if field geo_assign_render_groups is set (has been assigned a value) and false otherwise */ public boolean isSetGeo_assign_render_groups() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __GEO_ASSIGN_RENDER_GROUPS_ISSET_ID); } public void setGeo_assign_render_groupsIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __GEO_ASSIGN_RENDER_GROUPS_ISSET_ID, value); } public boolean isGeo_explode_collections() { return this.geo_explode_collections; } public TCopyParams setGeo_explode_collections(boolean geo_explode_collections) { this.geo_explode_collections = geo_explode_collections; setGeo_explode_collectionsIsSet(true); return this; } public void unsetGeo_explode_collections() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __GEO_EXPLODE_COLLECTIONS_ISSET_ID); } /** Returns true if field geo_explode_collections is set (has been assigned a value) and false otherwise */ public boolean isSetGeo_explode_collections() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __GEO_EXPLODE_COLLECTIONS_ISSET_ID); } public void setGeo_explode_collectionsIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __GEO_EXPLODE_COLLECTIONS_ISSET_ID, value); } public int getSource_srid() { return this.source_srid; } public TCopyParams setSource_srid(int source_srid) { this.source_srid = source_srid; setSource_sridIsSet(true); return this; } public void unsetSource_srid() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SOURCE_SRID_ISSET_ID); } /** Returns true if field source_srid is set (has been assigned a value) and false otherwise */ public boolean isSetSource_srid() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SOURCE_SRID_ISSET_ID); } public void setSource_sridIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SOURCE_SRID_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getS3_session_token() { return this.s3_session_token; } public TCopyParams setS3_session_token(@org.apache.thrift.annotation.Nullable java.lang.String s3_session_token) { this.s3_session_token = s3_session_token; return this; } public void unsetS3_session_token() { this.s3_session_token = null; } /** Returns true if field s3_session_token is set (has been assigned a value) and false otherwise */ public boolean isSetS3_session_token() { return this.s3_session_token != null; } public void setS3_session_tokenIsSet(boolean value) { if (!value) { this.s3_session_token = null; } } /** * * @see TRasterPointType */ @org.apache.thrift.annotation.Nullable public TRasterPointType getRaster_point_type() { return this.raster_point_type; } /** * * @see TRasterPointType */ public TCopyParams setRaster_point_type(@org.apache.thrift.annotation.Nullable TRasterPointType raster_point_type) { this.raster_point_type = raster_point_type; return this; } public void unsetRaster_point_type() { this.raster_point_type = null; } /** Returns true if field raster_point_type is set (has been assigned a value) and false otherwise */ public boolean isSetRaster_point_type() { return this.raster_point_type != null; } public void setRaster_point_typeIsSet(boolean value) { if (!value) { this.raster_point_type = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getRaster_import_bands() { return this.raster_import_bands; } public TCopyParams setRaster_import_bands(@org.apache.thrift.annotation.Nullable java.lang.String raster_import_bands) { this.raster_import_bands = raster_import_bands; return this; } public void unsetRaster_import_bands() { this.raster_import_bands = null; } /** Returns true if field raster_import_bands is set (has been assigned a value) and false otherwise */ public boolean isSetRaster_import_bands() { return this.raster_import_bands != null; } public void setRaster_import_bandsIsSet(boolean value) { if (!value) { this.raster_import_bands = null; } } public int getRaster_scanlines_per_thread() { return this.raster_scanlines_per_thread; } public TCopyParams setRaster_scanlines_per_thread(int raster_scanlines_per_thread) { this.raster_scanlines_per_thread = raster_scanlines_per_thread; setRaster_scanlines_per_threadIsSet(true); return this; } public void unsetRaster_scanlines_per_thread() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RASTER_SCANLINES_PER_THREAD_ISSET_ID); } /** Returns true if field raster_scanlines_per_thread is set (has been assigned a value) and false otherwise */ public boolean isSetRaster_scanlines_per_thread() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RASTER_SCANLINES_PER_THREAD_ISSET_ID); } public void setRaster_scanlines_per_threadIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RASTER_SCANLINES_PER_THREAD_ISSET_ID, value); } /** * * @see TRasterPointTransform */ @org.apache.thrift.annotation.Nullable public TRasterPointTransform getRaster_point_transform() { return this.raster_point_transform; } /** * * @see TRasterPointTransform */ public TCopyParams setRaster_point_transform(@org.apache.thrift.annotation.Nullable TRasterPointTransform raster_point_transform) { this.raster_point_transform = raster_point_transform; return this; } public void unsetRaster_point_transform() { this.raster_point_transform = null; } /** Returns true if field raster_point_transform is set (has been assigned a value) and false otherwise */ public boolean isSetRaster_point_transform() { return this.raster_point_transform != null; } public void setRaster_point_transformIsSet(boolean value) { if (!value) { this.raster_point_transform = null; } } public boolean isRaster_point_compute_angle() { return this.raster_point_compute_angle; } public TCopyParams setRaster_point_compute_angle(boolean raster_point_compute_angle) { this.raster_point_compute_angle = raster_point_compute_angle; setRaster_point_compute_angleIsSet(true); return this; } public void unsetRaster_point_compute_angle() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RASTER_POINT_COMPUTE_ANGLE_ISSET_ID); } /** Returns true if field raster_point_compute_angle is set (has been assigned a value) and false otherwise */ public boolean isSetRaster_point_compute_angle() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RASTER_POINT_COMPUTE_ANGLE_ISSET_ID); } public void setRaster_point_compute_angleIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RASTER_POINT_COMPUTE_ANGLE_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getRaster_import_dimensions() { return this.raster_import_dimensions; } public TCopyParams setRaster_import_dimensions(@org.apache.thrift.annotation.Nullable java.lang.String raster_import_dimensions) { this.raster_import_dimensions = raster_import_dimensions; return this; } public void unsetRaster_import_dimensions() { this.raster_import_dimensions = null; } /** Returns true if field raster_import_dimensions is set (has been assigned a value) and false otherwise */ public boolean isSetRaster_import_dimensions() { return this.raster_import_dimensions != null; } public void setRaster_import_dimensionsIsSet(boolean value) { if (!value) { this.raster_import_dimensions = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getOdbc_dsn() { return this.odbc_dsn; } public TCopyParams setOdbc_dsn(@org.apache.thrift.annotation.Nullable java.lang.String odbc_dsn) { this.odbc_dsn = odbc_dsn; return this; } public void unsetOdbc_dsn() { this.odbc_dsn = null; } /** Returns true if field odbc_dsn is set (has been assigned a value) and false otherwise */ public boolean isSetOdbc_dsn() { return this.odbc_dsn != null; } public void setOdbc_dsnIsSet(boolean value) { if (!value) { this.odbc_dsn = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getOdbc_connection_string() { return this.odbc_connection_string; } public TCopyParams setOdbc_connection_string(@org.apache.thrift.annotation.Nullable java.lang.String odbc_connection_string) { this.odbc_connection_string = odbc_connection_string; return this; } public void unsetOdbc_connection_string() { this.odbc_connection_string = null; } /** Returns true if field odbc_connection_string is set (has been assigned a value) and false otherwise */ public boolean isSetOdbc_connection_string() { return this.odbc_connection_string != null; } public void setOdbc_connection_stringIsSet(boolean value) { if (!value) { this.odbc_connection_string = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getOdbc_sql_select() { return this.odbc_sql_select; } public TCopyParams setOdbc_sql_select(@org.apache.thrift.annotation.Nullable java.lang.String odbc_sql_select) { this.odbc_sql_select = odbc_sql_select; return this; } public void unsetOdbc_sql_select() { this.odbc_sql_select = null; } /** Returns true if field odbc_sql_select is set (has been assigned a value) and false otherwise */ public boolean isSetOdbc_sql_select() { return this.odbc_sql_select != null; } public void setOdbc_sql_selectIsSet(boolean value) { if (!value) { this.odbc_sql_select = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getOdbc_sql_order_by() { return this.odbc_sql_order_by; } public TCopyParams setOdbc_sql_order_by(@org.apache.thrift.annotation.Nullable java.lang.String odbc_sql_order_by) { this.odbc_sql_order_by = odbc_sql_order_by; return this; } public void unsetOdbc_sql_order_by() { this.odbc_sql_order_by = null; } /** Returns true if field odbc_sql_order_by is set (has been assigned a value) and false otherwise */ public boolean isSetOdbc_sql_order_by() { return this.odbc_sql_order_by != null; } public void setOdbc_sql_order_byIsSet(boolean value) { if (!value) { this.odbc_sql_order_by = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getOdbc_username() { return this.odbc_username; } public TCopyParams setOdbc_username(@org.apache.thrift.annotation.Nullable java.lang.String odbc_username) { this.odbc_username = odbc_username; return this; } public void unsetOdbc_username() { this.odbc_username = null; } /** Returns true if field odbc_username is set (has been assigned a value) and false otherwise */ public boolean isSetOdbc_username() { return this.odbc_username != null; } public void setOdbc_usernameIsSet(boolean value) { if (!value) { this.odbc_username = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getOdbc_password() { return this.odbc_password; } public TCopyParams setOdbc_password(@org.apache.thrift.annotation.Nullable java.lang.String odbc_password) { this.odbc_password = odbc_password; return this; } public void unsetOdbc_password() { this.odbc_password = null; } /** Returns true if field odbc_password is set (has been assigned a value) and false otherwise */ public boolean isSetOdbc_password() { return this.odbc_password != null; } public void setOdbc_passwordIsSet(boolean value) { if (!value) { this.odbc_password = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getOdbc_credential_string() { return this.odbc_credential_string; } public TCopyParams setOdbc_credential_string(@org.apache.thrift.annotation.Nullable java.lang.String odbc_credential_string) { this.odbc_credential_string = odbc_credential_string; return this; } public void unsetOdbc_credential_string() { this.odbc_credential_string = null; } /** Returns true if field odbc_credential_string is set (has been assigned a value) and false otherwise */ public boolean isSetOdbc_credential_string() { return this.odbc_credential_string != null; } public void setOdbc_credential_stringIsSet(boolean value) { if (!value) { this.odbc_credential_string = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getAdd_metadata_columns() { return this.add_metadata_columns; } public TCopyParams setAdd_metadata_columns(@org.apache.thrift.annotation.Nullable java.lang.String add_metadata_columns) { this.add_metadata_columns = add_metadata_columns; return this; } public void unsetAdd_metadata_columns() { this.add_metadata_columns = null; } /** Returns true if field add_metadata_columns is set (has been assigned a value) and false otherwise */ public boolean isSetAdd_metadata_columns() { return this.add_metadata_columns != null; } public void setAdd_metadata_columnsIsSet(boolean value) { if (!value) { this.add_metadata_columns = null; } } public boolean isTrim_spaces() { return this.trim_spaces; } public TCopyParams setTrim_spaces(boolean trim_spaces) { this.trim_spaces = trim_spaces; setTrim_spacesIsSet(true); return this; } public void unsetTrim_spaces() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRIM_SPACES_ISSET_ID); } /** Returns true if field trim_spaces is set (has been assigned a value) and false otherwise */ public boolean isSetTrim_spaces() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRIM_SPACES_ISSET_ID); } public void setTrim_spacesIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRIM_SPACES_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case DELIMITER: if (value == null) { unsetDelimiter(); } else { setDelimiter((java.lang.String)value); } break; case NULL_STR: if (value == null) { unsetNull_str(); } else { setNull_str((java.lang.String)value); } break; case HAS_HEADER: if (value == null) { unsetHas_header(); } else { setHas_header((TImportHeaderRow)value); } break; case QUOTED: if (value == null) { unsetQuoted(); } else { setQuoted((java.lang.Boolean)value); } break; case QUOTE: if (value == null) { unsetQuote(); } else { setQuote((java.lang.String)value); } break; case ESCAPE: if (value == null) { unsetEscape(); } else { setEscape((java.lang.String)value); } break; case LINE_DELIM: if (value == null) { unsetLine_delim(); } else { setLine_delim((java.lang.String)value); } break; case ARRAY_DELIM: if (value == null) { unsetArray_delim(); } else { setArray_delim((java.lang.String)value); } break; case ARRAY_BEGIN: if (value == null) { unsetArray_begin(); } else { setArray_begin((java.lang.String)value); } break; case ARRAY_END: if (value == null) { unsetArray_end(); } else { setArray_end((java.lang.String)value); } break; case THREADS: if (value == null) { unsetThreads(); } else { setThreads((java.lang.Integer)value); } break; case SOURCE_TYPE: if (value == null) { unsetSource_type(); } else { setSource_type((TSourceType)value); } break; case S3_ACCESS_KEY: if (value == null) { unsetS3_access_key(); } else { setS3_access_key((java.lang.String)value); } break; case S3_SECRET_KEY: if (value == null) { unsetS3_secret_key(); } else { setS3_secret_key((java.lang.String)value); } break; case S3_REGION: if (value == null) { unsetS3_region(); } else { setS3_region((java.lang.String)value); } break; case GEO_COORDS_ENCODING: if (value == null) { unsetGeo_coords_encoding(); } else { setGeo_coords_encoding((ai.heavy.thrift.server.TEncodingType)value); } break; case GEO_COORDS_COMP_PARAM: if (value == null) { unsetGeo_coords_comp_param(); } else { setGeo_coords_comp_param((java.lang.Integer)value); } break; case GEO_COORDS_TYPE: if (value == null) { unsetGeo_coords_type(); } else { setGeo_coords_type((ai.heavy.thrift.server.TDatumType)value); } break; case GEO_COORDS_SRID: if (value == null) { unsetGeo_coords_srid(); } else { setGeo_coords_srid((java.lang.Integer)value); } break; case SANITIZE_COLUMN_NAMES: if (value == null) { unsetSanitize_column_names(); } else { setSanitize_column_names((java.lang.Boolean)value); } break; case GEO_LAYER_NAME: if (value == null) { unsetGeo_layer_name(); } else { setGeo_layer_name((java.lang.String)value); } break; case S3_ENDPOINT: if (value == null) { unsetS3_endpoint(); } else { setS3_endpoint((java.lang.String)value); } break; case GEO_ASSIGN_RENDER_GROUPS: if (value == null) { unsetGeo_assign_render_groups(); } else { setGeo_assign_render_groups((java.lang.Boolean)value); } break; case GEO_EXPLODE_COLLECTIONS: if (value == null) { unsetGeo_explode_collections(); } else { setGeo_explode_collections((java.lang.Boolean)value); } break; case SOURCE_SRID: if (value == null) { unsetSource_srid(); } else { setSource_srid((java.lang.Integer)value); } break; case S3_SESSION_TOKEN: if (value == null) { unsetS3_session_token(); } else { setS3_session_token((java.lang.String)value); } break; case RASTER_POINT_TYPE: if (value == null) { unsetRaster_point_type(); } else { setRaster_point_type((TRasterPointType)value); } break; case RASTER_IMPORT_BANDS: if (value == null) { unsetRaster_import_bands(); } else { setRaster_import_bands((java.lang.String)value); } break; case RASTER_SCANLINES_PER_THREAD: if (value == null) { unsetRaster_scanlines_per_thread(); } else { setRaster_scanlines_per_thread((java.lang.Integer)value); } break; case RASTER_POINT_TRANSFORM: if (value == null) { unsetRaster_point_transform(); } else { setRaster_point_transform((TRasterPointTransform)value); } break; case RASTER_POINT_COMPUTE_ANGLE: if (value == null) { unsetRaster_point_compute_angle(); } else { setRaster_point_compute_angle((java.lang.Boolean)value); } break; case RASTER_IMPORT_DIMENSIONS: if (value == null) { unsetRaster_import_dimensions(); } else { setRaster_import_dimensions((java.lang.String)value); } break; case ODBC_DSN: if (value == null) { unsetOdbc_dsn(); } else { setOdbc_dsn((java.lang.String)value); } break; case ODBC_CONNECTION_STRING: if (value == null) { unsetOdbc_connection_string(); } else { setOdbc_connection_string((java.lang.String)value); } break; case ODBC_SQL_SELECT: if (value == null) { unsetOdbc_sql_select(); } else { setOdbc_sql_select((java.lang.String)value); } break; case ODBC_SQL_ORDER_BY: if (value == null) { unsetOdbc_sql_order_by(); } else { setOdbc_sql_order_by((java.lang.String)value); } break; case ODBC_USERNAME: if (value == null) { unsetOdbc_username(); } else { setOdbc_username((java.lang.String)value); } break; case ODBC_PASSWORD: if (value == null) { unsetOdbc_password(); } else { setOdbc_password((java.lang.String)value); } break; case ODBC_CREDENTIAL_STRING: if (value == null) { unsetOdbc_credential_string(); } else { setOdbc_credential_string((java.lang.String)value); } break; case ADD_METADATA_COLUMNS: if (value == null) { unsetAdd_metadata_columns(); } else { setAdd_metadata_columns((java.lang.String)value); } break; case TRIM_SPACES: if (value == null) { unsetTrim_spaces(); } else { setTrim_spaces((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case DELIMITER: return getDelimiter(); case NULL_STR: return getNull_str(); case HAS_HEADER: return getHas_header(); case QUOTED: return isQuoted(); case QUOTE: return getQuote(); case ESCAPE: return getEscape(); case LINE_DELIM: return getLine_delim(); case ARRAY_DELIM: return getArray_delim(); case ARRAY_BEGIN: return getArray_begin(); case ARRAY_END: return getArray_end(); case THREADS: return getThreads(); case SOURCE_TYPE: return getSource_type(); case S3_ACCESS_KEY: return getS3_access_key(); case S3_SECRET_KEY: return getS3_secret_key(); case S3_REGION: return getS3_region(); case GEO_COORDS_ENCODING: return getGeo_coords_encoding(); case GEO_COORDS_COMP_PARAM: return getGeo_coords_comp_param(); case GEO_COORDS_TYPE: return getGeo_coords_type(); case GEO_COORDS_SRID: return getGeo_coords_srid(); case SANITIZE_COLUMN_NAMES: return isSanitize_column_names(); case GEO_LAYER_NAME: return getGeo_layer_name(); case S3_ENDPOINT: return getS3_endpoint(); case GEO_ASSIGN_RENDER_GROUPS: return isGeo_assign_render_groups(); case GEO_EXPLODE_COLLECTIONS: return isGeo_explode_collections(); case SOURCE_SRID: return getSource_srid(); case S3_SESSION_TOKEN: return getS3_session_token(); case RASTER_POINT_TYPE: return getRaster_point_type(); case RASTER_IMPORT_BANDS: return getRaster_import_bands(); case RASTER_SCANLINES_PER_THREAD: return getRaster_scanlines_per_thread(); case RASTER_POINT_TRANSFORM: return getRaster_point_transform(); case RASTER_POINT_COMPUTE_ANGLE: return isRaster_point_compute_angle(); case RASTER_IMPORT_DIMENSIONS: return getRaster_import_dimensions(); case ODBC_DSN: return getOdbc_dsn(); case ODBC_CONNECTION_STRING: return getOdbc_connection_string(); case ODBC_SQL_SELECT: return getOdbc_sql_select(); case ODBC_SQL_ORDER_BY: return getOdbc_sql_order_by(); case ODBC_USERNAME: return getOdbc_username(); case ODBC_PASSWORD: return getOdbc_password(); case ODBC_CREDENTIAL_STRING: return getOdbc_credential_string(); case ADD_METADATA_COLUMNS: return getAdd_metadata_columns(); case TRIM_SPACES: return isTrim_spaces(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case DELIMITER: return isSetDelimiter(); case NULL_STR: return isSetNull_str(); case HAS_HEADER: return isSetHas_header(); case QUOTED: return isSetQuoted(); case QUOTE: return isSetQuote(); case ESCAPE: return isSetEscape(); case LINE_DELIM: return isSetLine_delim(); case ARRAY_DELIM: return isSetArray_delim(); case ARRAY_BEGIN: return isSetArray_begin(); case ARRAY_END: return isSetArray_end(); case THREADS: return isSetThreads(); case SOURCE_TYPE: return isSetSource_type(); case S3_ACCESS_KEY: return isSetS3_access_key(); case S3_SECRET_KEY: return isSetS3_secret_key(); case S3_REGION: return isSetS3_region(); case GEO_COORDS_ENCODING: return isSetGeo_coords_encoding(); case GEO_COORDS_COMP_PARAM: return isSetGeo_coords_comp_param(); case GEO_COORDS_TYPE: return isSetGeo_coords_type(); case GEO_COORDS_SRID: return isSetGeo_coords_srid(); case SANITIZE_COLUMN_NAMES: return isSetSanitize_column_names(); case GEO_LAYER_NAME: return isSetGeo_layer_name(); case S3_ENDPOINT: return isSetS3_endpoint(); case GEO_ASSIGN_RENDER_GROUPS: return isSetGeo_assign_render_groups(); case GEO_EXPLODE_COLLECTIONS: return isSetGeo_explode_collections(); case SOURCE_SRID: return isSetSource_srid(); case S3_SESSION_TOKEN: return isSetS3_session_token(); case RASTER_POINT_TYPE: return isSetRaster_point_type(); case RASTER_IMPORT_BANDS: return isSetRaster_import_bands(); case RASTER_SCANLINES_PER_THREAD: return isSetRaster_scanlines_per_thread(); case RASTER_POINT_TRANSFORM: return isSetRaster_point_transform(); case RASTER_POINT_COMPUTE_ANGLE: return isSetRaster_point_compute_angle(); case RASTER_IMPORT_DIMENSIONS: return isSetRaster_import_dimensions(); case ODBC_DSN: return isSetOdbc_dsn(); case ODBC_CONNECTION_STRING: return isSetOdbc_connection_string(); case ODBC_SQL_SELECT: return isSetOdbc_sql_select(); case ODBC_SQL_ORDER_BY: return isSetOdbc_sql_order_by(); case ODBC_USERNAME: return isSetOdbc_username(); case ODBC_PASSWORD: return isSetOdbc_password(); case ODBC_CREDENTIAL_STRING: return isSetOdbc_credential_string(); case ADD_METADATA_COLUMNS: return isSetAdd_metadata_columns(); case TRIM_SPACES: return isSetTrim_spaces(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TCopyParams) return this.equals((TCopyParams)that); return false; } public boolean equals(TCopyParams that) { if (that == null) return false; if (this == that) return true; boolean this_present_delimiter = true && this.isSetDelimiter(); boolean that_present_delimiter = true && that.isSetDelimiter(); if (this_present_delimiter || that_present_delimiter) { if (!(this_present_delimiter && that_present_delimiter)) return false; if (!this.delimiter.equals(that.delimiter)) return false; } boolean this_present_null_str = true && this.isSetNull_str(); boolean that_present_null_str = true && that.isSetNull_str(); if (this_present_null_str || that_present_null_str) { if (!(this_present_null_str && that_present_null_str)) return false; if (!this.null_str.equals(that.null_str)) return false; } boolean this_present_has_header = true && this.isSetHas_header(); boolean that_present_has_header = true && that.isSetHas_header(); if (this_present_has_header || that_present_has_header) { if (!(this_present_has_header && that_present_has_header)) return false; if (!this.has_header.equals(that.has_header)) return false; } boolean this_present_quoted = true; boolean that_present_quoted = true; if (this_present_quoted || that_present_quoted) { if (!(this_present_quoted && that_present_quoted)) return false; if (this.quoted != that.quoted) return false; } boolean this_present_quote = true && this.isSetQuote(); boolean that_present_quote = true && that.isSetQuote(); if (this_present_quote || that_present_quote) { if (!(this_present_quote && that_present_quote)) return false; if (!this.quote.equals(that.quote)) return false; } boolean this_present_escape = true && this.isSetEscape(); boolean that_present_escape = true && that.isSetEscape(); if (this_present_escape || that_present_escape) { if (!(this_present_escape && that_present_escape)) return false; if (!this.escape.equals(that.escape)) return false; } boolean this_present_line_delim = true && this.isSetLine_delim(); boolean that_present_line_delim = true && that.isSetLine_delim(); if (this_present_line_delim || that_present_line_delim) { if (!(this_present_line_delim && that_present_line_delim)) return false; if (!this.line_delim.equals(that.line_delim)) return false; } boolean this_present_array_delim = true && this.isSetArray_delim(); boolean that_present_array_delim = true && that.isSetArray_delim(); if (this_present_array_delim || that_present_array_delim) { if (!(this_present_array_delim && that_present_array_delim)) return false; if (!this.array_delim.equals(that.array_delim)) return false; } boolean this_present_array_begin = true && this.isSetArray_begin(); boolean that_present_array_begin = true && that.isSetArray_begin(); if (this_present_array_begin || that_present_array_begin) { if (!(this_present_array_begin && that_present_array_begin)) return false; if (!this.array_begin.equals(that.array_begin)) return false; } boolean this_present_array_end = true && this.isSetArray_end(); boolean that_present_array_end = true && that.isSetArray_end(); if (this_present_array_end || that_present_array_end) { if (!(this_present_array_end && that_present_array_end)) return false; if (!this.array_end.equals(that.array_end)) return false; } boolean this_present_threads = true; boolean that_present_threads = true; if (this_present_threads || that_present_threads) { if (!(this_present_threads && that_present_threads)) return false; if (this.threads != that.threads) return false; } boolean this_present_source_type = true && this.isSetSource_type(); boolean that_present_source_type = true && that.isSetSource_type(); if (this_present_source_type || that_present_source_type) { if (!(this_present_source_type && that_present_source_type)) return false; if (!this.source_type.equals(that.source_type)) return false; } boolean this_present_s3_access_key = true && this.isSetS3_access_key(); boolean that_present_s3_access_key = true && that.isSetS3_access_key(); if (this_present_s3_access_key || that_present_s3_access_key) { if (!(this_present_s3_access_key && that_present_s3_access_key)) return false; if (!this.s3_access_key.equals(that.s3_access_key)) return false; } boolean this_present_s3_secret_key = true && this.isSetS3_secret_key(); boolean that_present_s3_secret_key = true && that.isSetS3_secret_key(); if (this_present_s3_secret_key || that_present_s3_secret_key) { if (!(this_present_s3_secret_key && that_present_s3_secret_key)) return false; if (!this.s3_secret_key.equals(that.s3_secret_key)) return false; } boolean this_present_s3_region = true && this.isSetS3_region(); boolean that_present_s3_region = true && that.isSetS3_region(); if (this_present_s3_region || that_present_s3_region) { if (!(this_present_s3_region && that_present_s3_region)) return false; if (!this.s3_region.equals(that.s3_region)) return false; } boolean this_present_geo_coords_encoding = true && this.isSetGeo_coords_encoding(); boolean that_present_geo_coords_encoding = true && that.isSetGeo_coords_encoding(); if (this_present_geo_coords_encoding || that_present_geo_coords_encoding) { if (!(this_present_geo_coords_encoding && that_present_geo_coords_encoding)) return false; if (!this.geo_coords_encoding.equals(that.geo_coords_encoding)) return false; } boolean this_present_geo_coords_comp_param = true; boolean that_present_geo_coords_comp_param = true; if (this_present_geo_coords_comp_param || that_present_geo_coords_comp_param) { if (!(this_present_geo_coords_comp_param && that_present_geo_coords_comp_param)) return false; if (this.geo_coords_comp_param != that.geo_coords_comp_param) return false; } boolean this_present_geo_coords_type = true && this.isSetGeo_coords_type(); boolean that_present_geo_coords_type = true && that.isSetGeo_coords_type(); if (this_present_geo_coords_type || that_present_geo_coords_type) { if (!(this_present_geo_coords_type && that_present_geo_coords_type)) return false; if (!this.geo_coords_type.equals(that.geo_coords_type)) return false; } boolean this_present_geo_coords_srid = true; boolean that_present_geo_coords_srid = true; if (this_present_geo_coords_srid || that_present_geo_coords_srid) { if (!(this_present_geo_coords_srid && that_present_geo_coords_srid)) return false; if (this.geo_coords_srid != that.geo_coords_srid) return false; } boolean this_present_sanitize_column_names = true; boolean that_present_sanitize_column_names = true; if (this_present_sanitize_column_names || that_present_sanitize_column_names) { if (!(this_present_sanitize_column_names && that_present_sanitize_column_names)) return false; if (this.sanitize_column_names != that.sanitize_column_names) return false; } boolean this_present_geo_layer_name = true && this.isSetGeo_layer_name(); boolean that_present_geo_layer_name = true && that.isSetGeo_layer_name(); if (this_present_geo_layer_name || that_present_geo_layer_name) { if (!(this_present_geo_layer_name && that_present_geo_layer_name)) return false; if (!this.geo_layer_name.equals(that.geo_layer_name)) return false; } boolean this_present_s3_endpoint = true && this.isSetS3_endpoint(); boolean that_present_s3_endpoint = true && that.isSetS3_endpoint(); if (this_present_s3_endpoint || that_present_s3_endpoint) { if (!(this_present_s3_endpoint && that_present_s3_endpoint)) return false; if (!this.s3_endpoint.equals(that.s3_endpoint)) return false; } boolean this_present_geo_assign_render_groups = true; boolean that_present_geo_assign_render_groups = true; if (this_present_geo_assign_render_groups || that_present_geo_assign_render_groups) { if (!(this_present_geo_assign_render_groups && that_present_geo_assign_render_groups)) return false; if (this.geo_assign_render_groups != that.geo_assign_render_groups) return false; } boolean this_present_geo_explode_collections = true; boolean that_present_geo_explode_collections = true; if (this_present_geo_explode_collections || that_present_geo_explode_collections) { if (!(this_present_geo_explode_collections && that_present_geo_explode_collections)) return false; if (this.geo_explode_collections != that.geo_explode_collections) return false; } boolean this_present_source_srid = true; boolean that_present_source_srid = true; if (this_present_source_srid || that_present_source_srid) { if (!(this_present_source_srid && that_present_source_srid)) return false; if (this.source_srid != that.source_srid) return false; } boolean this_present_s3_session_token = true && this.isSetS3_session_token(); boolean that_present_s3_session_token = true && that.isSetS3_session_token(); if (this_present_s3_session_token || that_present_s3_session_token) { if (!(this_present_s3_session_token && that_present_s3_session_token)) return false; if (!this.s3_session_token.equals(that.s3_session_token)) return false; } boolean this_present_raster_point_type = true && this.isSetRaster_point_type(); boolean that_present_raster_point_type = true && that.isSetRaster_point_type(); if (this_present_raster_point_type || that_present_raster_point_type) { if (!(this_present_raster_point_type && that_present_raster_point_type)) return false; if (!this.raster_point_type.equals(that.raster_point_type)) return false; } boolean this_present_raster_import_bands = true && this.isSetRaster_import_bands(); boolean that_present_raster_import_bands = true && that.isSetRaster_import_bands(); if (this_present_raster_import_bands || that_present_raster_import_bands) { if (!(this_present_raster_import_bands && that_present_raster_import_bands)) return false; if (!this.raster_import_bands.equals(that.raster_import_bands)) return false; } boolean this_present_raster_scanlines_per_thread = true; boolean that_present_raster_scanlines_per_thread = true; if (this_present_raster_scanlines_per_thread || that_present_raster_scanlines_per_thread) { if (!(this_present_raster_scanlines_per_thread && that_present_raster_scanlines_per_thread)) return false; if (this.raster_scanlines_per_thread != that.raster_scanlines_per_thread) return false; } boolean this_present_raster_point_transform = true && this.isSetRaster_point_transform(); boolean that_present_raster_point_transform = true && that.isSetRaster_point_transform(); if (this_present_raster_point_transform || that_present_raster_point_transform) { if (!(this_present_raster_point_transform && that_present_raster_point_transform)) return false; if (!this.raster_point_transform.equals(that.raster_point_transform)) return false; } boolean this_present_raster_point_compute_angle = true; boolean that_present_raster_point_compute_angle = true; if (this_present_raster_point_compute_angle || that_present_raster_point_compute_angle) { if (!(this_present_raster_point_compute_angle && that_present_raster_point_compute_angle)) return false; if (this.raster_point_compute_angle != that.raster_point_compute_angle) return false; } boolean this_present_raster_import_dimensions = true && this.isSetRaster_import_dimensions(); boolean that_present_raster_import_dimensions = true && that.isSetRaster_import_dimensions(); if (this_present_raster_import_dimensions || that_present_raster_import_dimensions) { if (!(this_present_raster_import_dimensions && that_present_raster_import_dimensions)) return false; if (!this.raster_import_dimensions.equals(that.raster_import_dimensions)) return false; } boolean this_present_odbc_dsn = true && this.isSetOdbc_dsn(); boolean that_present_odbc_dsn = true && that.isSetOdbc_dsn(); if (this_present_odbc_dsn || that_present_odbc_dsn) { if (!(this_present_odbc_dsn && that_present_odbc_dsn)) return false; if (!this.odbc_dsn.equals(that.odbc_dsn)) return false; } boolean this_present_odbc_connection_string = true && this.isSetOdbc_connection_string(); boolean that_present_odbc_connection_string = true && that.isSetOdbc_connection_string(); if (this_present_odbc_connection_string || that_present_odbc_connection_string) { if (!(this_present_odbc_connection_string && that_present_odbc_connection_string)) return false; if (!this.odbc_connection_string.equals(that.odbc_connection_string)) return false; } boolean this_present_odbc_sql_select = true && this.isSetOdbc_sql_select(); boolean that_present_odbc_sql_select = true && that.isSetOdbc_sql_select(); if (this_present_odbc_sql_select || that_present_odbc_sql_select) { if (!(this_present_odbc_sql_select && that_present_odbc_sql_select)) return false; if (!this.odbc_sql_select.equals(that.odbc_sql_select)) return false; } boolean this_present_odbc_sql_order_by = true && this.isSetOdbc_sql_order_by(); boolean that_present_odbc_sql_order_by = true && that.isSetOdbc_sql_order_by(); if (this_present_odbc_sql_order_by || that_present_odbc_sql_order_by) { if (!(this_present_odbc_sql_order_by && that_present_odbc_sql_order_by)) return false; if (!this.odbc_sql_order_by.equals(that.odbc_sql_order_by)) return false; } boolean this_present_odbc_username = true && this.isSetOdbc_username(); boolean that_present_odbc_username = true && that.isSetOdbc_username(); if (this_present_odbc_username || that_present_odbc_username) { if (!(this_present_odbc_username && that_present_odbc_username)) return false; if (!this.odbc_username.equals(that.odbc_username)) return false; } boolean this_present_odbc_password = true && this.isSetOdbc_password(); boolean that_present_odbc_password = true && that.isSetOdbc_password(); if (this_present_odbc_password || that_present_odbc_password) { if (!(this_present_odbc_password && that_present_odbc_password)) return false; if (!this.odbc_password.equals(that.odbc_password)) return false; } boolean this_present_odbc_credential_string = true && this.isSetOdbc_credential_string(); boolean that_present_odbc_credential_string = true && that.isSetOdbc_credential_string(); if (this_present_odbc_credential_string || that_present_odbc_credential_string) { if (!(this_present_odbc_credential_string && that_present_odbc_credential_string)) return false; if (!this.odbc_credential_string.equals(that.odbc_credential_string)) return false; } boolean this_present_add_metadata_columns = true && this.isSetAdd_metadata_columns(); boolean that_present_add_metadata_columns = true && that.isSetAdd_metadata_columns(); if (this_present_add_metadata_columns || that_present_add_metadata_columns) { if (!(this_present_add_metadata_columns && that_present_add_metadata_columns)) return false; if (!this.add_metadata_columns.equals(that.add_metadata_columns)) return false; } boolean this_present_trim_spaces = true; boolean that_present_trim_spaces = true; if (this_present_trim_spaces || that_present_trim_spaces) { if (!(this_present_trim_spaces && that_present_trim_spaces)) return false; if (this.trim_spaces != that.trim_spaces) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetDelimiter()) ? 131071 : 524287); if (isSetDelimiter()) hashCode = hashCode * 8191 + delimiter.hashCode(); hashCode = hashCode * 8191 + ((isSetNull_str()) ? 131071 : 524287); if (isSetNull_str()) hashCode = hashCode * 8191 + null_str.hashCode(); hashCode = hashCode * 8191 + ((isSetHas_header()) ? 131071 : 524287); if (isSetHas_header()) hashCode = hashCode * 8191 + has_header.getValue(); hashCode = hashCode * 8191 + ((quoted) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetQuote()) ? 131071 : 524287); if (isSetQuote()) hashCode = hashCode * 8191 + quote.hashCode(); hashCode = hashCode * 8191 + ((isSetEscape()) ? 131071 : 524287); if (isSetEscape()) hashCode = hashCode * 8191 + escape.hashCode(); hashCode = hashCode * 8191 + ((isSetLine_delim()) ? 131071 : 524287); if (isSetLine_delim()) hashCode = hashCode * 8191 + line_delim.hashCode(); hashCode = hashCode * 8191 + ((isSetArray_delim()) ? 131071 : 524287); if (isSetArray_delim()) hashCode = hashCode * 8191 + array_delim.hashCode(); hashCode = hashCode * 8191 + ((isSetArray_begin()) ? 131071 : 524287); if (isSetArray_begin()) hashCode = hashCode * 8191 + array_begin.hashCode(); hashCode = hashCode * 8191 + ((isSetArray_end()) ? 131071 : 524287); if (isSetArray_end()) hashCode = hashCode * 8191 + array_end.hashCode(); hashCode = hashCode * 8191 + threads; hashCode = hashCode * 8191 + ((isSetSource_type()) ? 131071 : 524287); if (isSetSource_type()) hashCode = hashCode * 8191 + source_type.getValue(); hashCode = hashCode * 8191 + ((isSetS3_access_key()) ? 131071 : 524287); if (isSetS3_access_key()) hashCode = hashCode * 8191 + s3_access_key.hashCode(); hashCode = hashCode * 8191 + ((isSetS3_secret_key()) ? 131071 : 524287); if (isSetS3_secret_key()) hashCode = hashCode * 8191 + s3_secret_key.hashCode(); hashCode = hashCode * 8191 + ((isSetS3_region()) ? 131071 : 524287); if (isSetS3_region()) hashCode = hashCode * 8191 + s3_region.hashCode(); hashCode = hashCode * 8191 + ((isSetGeo_coords_encoding()) ? 131071 : 524287); if (isSetGeo_coords_encoding()) hashCode = hashCode * 8191 + geo_coords_encoding.getValue(); hashCode = hashCode * 8191 + geo_coords_comp_param; hashCode = hashCode * 8191 + ((isSetGeo_coords_type()) ? 131071 : 524287); if (isSetGeo_coords_type()) hashCode = hashCode * 8191 + geo_coords_type.getValue(); hashCode = hashCode * 8191 + geo_coords_srid; hashCode = hashCode * 8191 + ((sanitize_column_names) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetGeo_layer_name()) ? 131071 : 524287); if (isSetGeo_layer_name()) hashCode = hashCode * 8191 + geo_layer_name.hashCode(); hashCode = hashCode * 8191 + ((isSetS3_endpoint()) ? 131071 : 524287); if (isSetS3_endpoint()) hashCode = hashCode * 8191 + s3_endpoint.hashCode(); hashCode = hashCode * 8191 + ((geo_assign_render_groups) ? 131071 : 524287); hashCode = hashCode * 8191 + ((geo_explode_collections) ? 131071 : 524287); hashCode = hashCode * 8191 + source_srid; hashCode = hashCode * 8191 + ((isSetS3_session_token()) ? 131071 : 524287); if (isSetS3_session_token()) hashCode = hashCode * 8191 + s3_session_token.hashCode(); hashCode = hashCode * 8191 + ((isSetRaster_point_type()) ? 131071 : 524287); if (isSetRaster_point_type()) hashCode = hashCode * 8191 + raster_point_type.getValue(); hashCode = hashCode * 8191 + ((isSetRaster_import_bands()) ? 131071 : 524287); if (isSetRaster_import_bands()) hashCode = hashCode * 8191 + raster_import_bands.hashCode(); hashCode = hashCode * 8191 + raster_scanlines_per_thread; hashCode = hashCode * 8191 + ((isSetRaster_point_transform()) ? 131071 : 524287); if (isSetRaster_point_transform()) hashCode = hashCode * 8191 + raster_point_transform.getValue(); hashCode = hashCode * 8191 + ((raster_point_compute_angle) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetRaster_import_dimensions()) ? 131071 : 524287); if (isSetRaster_import_dimensions()) hashCode = hashCode * 8191 + raster_import_dimensions.hashCode(); hashCode = hashCode * 8191 + ((isSetOdbc_dsn()) ? 131071 : 524287); if (isSetOdbc_dsn()) hashCode = hashCode * 8191 + odbc_dsn.hashCode(); hashCode = hashCode * 8191 + ((isSetOdbc_connection_string()) ? 131071 : 524287); if (isSetOdbc_connection_string()) hashCode = hashCode * 8191 + odbc_connection_string.hashCode(); hashCode = hashCode * 8191 + ((isSetOdbc_sql_select()) ? 131071 : 524287); if (isSetOdbc_sql_select()) hashCode = hashCode * 8191 + odbc_sql_select.hashCode(); hashCode = hashCode * 8191 + ((isSetOdbc_sql_order_by()) ? 131071 : 524287); if (isSetOdbc_sql_order_by()) hashCode = hashCode * 8191 + odbc_sql_order_by.hashCode(); hashCode = hashCode * 8191 + ((isSetOdbc_username()) ? 131071 : 524287); if (isSetOdbc_username()) hashCode = hashCode * 8191 + odbc_username.hashCode(); hashCode = hashCode * 8191 + ((isSetOdbc_password()) ? 131071 : 524287); if (isSetOdbc_password()) hashCode = hashCode * 8191 + odbc_password.hashCode(); hashCode = hashCode * 8191 + ((isSetOdbc_credential_string()) ? 131071 : 524287); if (isSetOdbc_credential_string()) hashCode = hashCode * 8191 + odbc_credential_string.hashCode(); hashCode = hashCode * 8191 + ((isSetAdd_metadata_columns()) ? 131071 : 524287); if (isSetAdd_metadata_columns()) hashCode = hashCode * 8191 + add_metadata_columns.hashCode(); hashCode = hashCode * 8191 + ((trim_spaces) ? 131071 : 524287); return hashCode; } @Override public int compareTo(TCopyParams other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetDelimiter(), other.isSetDelimiter()); if (lastComparison != 0) { return lastComparison; } if (isSetDelimiter()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delimiter, other.delimiter); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNull_str(), other.isSetNull_str()); if (lastComparison != 0) { return lastComparison; } if (isSetNull_str()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.null_str, other.null_str); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetHas_header(), other.isSetHas_header()); if (lastComparison != 0) { return lastComparison; } if (isSetHas_header()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.has_header, other.has_header); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetQuoted(), other.isSetQuoted()); if (lastComparison != 0) { return lastComparison; } if (isSetQuoted()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quoted, other.quoted); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetQuote(), other.isSetQuote()); if (lastComparison != 0) { return lastComparison; } if (isSetQuote()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quote, other.quote); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetEscape(), other.isSetEscape()); if (lastComparison != 0) { return lastComparison; } if (isSetEscape()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.escape, other.escape); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetLine_delim(), other.isSetLine_delim()); if (lastComparison != 0) { return lastComparison; } if (isSetLine_delim()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line_delim, other.line_delim); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetArray_delim(), other.isSetArray_delim()); if (lastComparison != 0) { return lastComparison; } if (isSetArray_delim()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.array_delim, other.array_delim); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetArray_begin(), other.isSetArray_begin()); if (lastComparison != 0) { return lastComparison; } if (isSetArray_begin()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.array_begin, other.array_begin); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetArray_end(), other.isSetArray_end()); if (lastComparison != 0) { return lastComparison; } if (isSetArray_end()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.array_end, other.array_end); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetThreads(), other.isSetThreads()); if (lastComparison != 0) { return lastComparison; } if (isSetThreads()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.threads, other.threads); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSource_type(), other.isSetSource_type()); if (lastComparison != 0) { return lastComparison; } if (isSetSource_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_type, other.source_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetS3_access_key(), other.isSetS3_access_key()); if (lastComparison != 0) { return lastComparison; } if (isSetS3_access_key()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s3_access_key, other.s3_access_key); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetS3_secret_key(), other.isSetS3_secret_key()); if (lastComparison != 0) { return lastComparison; } if (isSetS3_secret_key()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s3_secret_key, other.s3_secret_key); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetS3_region(), other.isSetS3_region()); if (lastComparison != 0) { return lastComparison; } if (isSetS3_region()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s3_region, other.s3_region); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGeo_coords_encoding(), other.isSetGeo_coords_encoding()); if (lastComparison != 0) { return lastComparison; } if (isSetGeo_coords_encoding()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.geo_coords_encoding, other.geo_coords_encoding); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGeo_coords_comp_param(), other.isSetGeo_coords_comp_param()); if (lastComparison != 0) { return lastComparison; } if (isSetGeo_coords_comp_param()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.geo_coords_comp_param, other.geo_coords_comp_param); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGeo_coords_type(), other.isSetGeo_coords_type()); if (lastComparison != 0) { return lastComparison; } if (isSetGeo_coords_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.geo_coords_type, other.geo_coords_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGeo_coords_srid(), other.isSetGeo_coords_srid()); if (lastComparison != 0) { return lastComparison; } if (isSetGeo_coords_srid()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.geo_coords_srid, other.geo_coords_srid); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSanitize_column_names(), other.isSetSanitize_column_names()); if (lastComparison != 0) { return lastComparison; } if (isSetSanitize_column_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sanitize_column_names, other.sanitize_column_names); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGeo_layer_name(), other.isSetGeo_layer_name()); if (lastComparison != 0) { return lastComparison; } if (isSetGeo_layer_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.geo_layer_name, other.geo_layer_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetS3_endpoint(), other.isSetS3_endpoint()); if (lastComparison != 0) { return lastComparison; } if (isSetS3_endpoint()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s3_endpoint, other.s3_endpoint); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGeo_assign_render_groups(), other.isSetGeo_assign_render_groups()); if (lastComparison != 0) { return lastComparison; } if (isSetGeo_assign_render_groups()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.geo_assign_render_groups, other.geo_assign_render_groups); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetGeo_explode_collections(), other.isSetGeo_explode_collections()); if (lastComparison != 0) { return lastComparison; } if (isSetGeo_explode_collections()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.geo_explode_collections, other.geo_explode_collections); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSource_srid(), other.isSetSource_srid()); if (lastComparison != 0) { return lastComparison; } if (isSetSource_srid()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_srid, other.source_srid); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetS3_session_token(), other.isSetS3_session_token()); if (lastComparison != 0) { return lastComparison; } if (isSetS3_session_token()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s3_session_token, other.s3_session_token); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRaster_point_type(), other.isSetRaster_point_type()); if (lastComparison != 0) { return lastComparison; } if (isSetRaster_point_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.raster_point_type, other.raster_point_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRaster_import_bands(), other.isSetRaster_import_bands()); if (lastComparison != 0) { return lastComparison; } if (isSetRaster_import_bands()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.raster_import_bands, other.raster_import_bands); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRaster_scanlines_per_thread(), other.isSetRaster_scanlines_per_thread()); if (lastComparison != 0) { return lastComparison; } if (isSetRaster_scanlines_per_thread()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.raster_scanlines_per_thread, other.raster_scanlines_per_thread); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRaster_point_transform(), other.isSetRaster_point_transform()); if (lastComparison != 0) { return lastComparison; } if (isSetRaster_point_transform()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.raster_point_transform, other.raster_point_transform); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRaster_point_compute_angle(), other.isSetRaster_point_compute_angle()); if (lastComparison != 0) { return lastComparison; } if (isSetRaster_point_compute_angle()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.raster_point_compute_angle, other.raster_point_compute_angle); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRaster_import_dimensions(), other.isSetRaster_import_dimensions()); if (lastComparison != 0) { return lastComparison; } if (isSetRaster_import_dimensions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.raster_import_dimensions, other.raster_import_dimensions); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOdbc_dsn(), other.isSetOdbc_dsn()); if (lastComparison != 0) { return lastComparison; } if (isSetOdbc_dsn()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.odbc_dsn, other.odbc_dsn); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOdbc_connection_string(), other.isSetOdbc_connection_string()); if (lastComparison != 0) { return lastComparison; } if (isSetOdbc_connection_string()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.odbc_connection_string, other.odbc_connection_string); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOdbc_sql_select(), other.isSetOdbc_sql_select()); if (lastComparison != 0) { return lastComparison; } if (isSetOdbc_sql_select()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.odbc_sql_select, other.odbc_sql_select); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOdbc_sql_order_by(), other.isSetOdbc_sql_order_by()); if (lastComparison != 0) { return lastComparison; } if (isSetOdbc_sql_order_by()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.odbc_sql_order_by, other.odbc_sql_order_by); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOdbc_username(), other.isSetOdbc_username()); if (lastComparison != 0) { return lastComparison; } if (isSetOdbc_username()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.odbc_username, other.odbc_username); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOdbc_password(), other.isSetOdbc_password()); if (lastComparison != 0) { return lastComparison; } if (isSetOdbc_password()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.odbc_password, other.odbc_password); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOdbc_credential_string(), other.isSetOdbc_credential_string()); if (lastComparison != 0) { return lastComparison; } if (isSetOdbc_credential_string()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.odbc_credential_string, other.odbc_credential_string); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetAdd_metadata_columns(), other.isSetAdd_metadata_columns()); if (lastComparison != 0) { return lastComparison; } if (isSetAdd_metadata_columns()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.add_metadata_columns, other.add_metadata_columns); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTrim_spaces(), other.isSetTrim_spaces()); if (lastComparison != 0) { return lastComparison; } if (isSetTrim_spaces()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trim_spaces, other.trim_spaces); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TCopyParams("); boolean first = true; sb.append("delimiter:"); if (this.delimiter == null) { sb.append("null"); } else { sb.append(this.delimiter); } first = false; if (!first) sb.append(", "); sb.append("null_str:"); if (this.null_str == null) { sb.append("null"); } else { sb.append(this.null_str); } first = false; if (!first) sb.append(", "); sb.append("has_header:"); if (this.has_header == null) { sb.append("null"); } else { sb.append(this.has_header); } first = false; if (!first) sb.append(", "); sb.append("quoted:"); sb.append(this.quoted); first = false; if (!first) sb.append(", "); sb.append("quote:"); if (this.quote == null) { sb.append("null"); } else { sb.append(this.quote); } first = false; if (!first) sb.append(", "); sb.append("escape:"); if (this.escape == null) { sb.append("null"); } else { sb.append(this.escape); } first = false; if (!first) sb.append(", "); sb.append("line_delim:"); if (this.line_delim == null) { sb.append("null"); } else { sb.append(this.line_delim); } first = false; if (!first) sb.append(", "); sb.append("array_delim:"); if (this.array_delim == null) { sb.append("null"); } else { sb.append(this.array_delim); } first = false; if (!first) sb.append(", "); sb.append("array_begin:"); if (this.array_begin == null) { sb.append("null"); } else { sb.append(this.array_begin); } first = false; if (!first) sb.append(", "); sb.append("array_end:"); if (this.array_end == null) { sb.append("null"); } else { sb.append(this.array_end); } first = false; if (!first) sb.append(", "); sb.append("threads:"); sb.append(this.threads); first = false; if (!first) sb.append(", "); sb.append("source_type:"); if (this.source_type == null) { sb.append("null"); } else { sb.append(this.source_type); } first = false; if (!first) sb.append(", "); sb.append("s3_access_key:"); if (this.s3_access_key == null) { sb.append("null"); } else { sb.append(this.s3_access_key); } first = false; if (!first) sb.append(", "); sb.append("s3_secret_key:"); if (this.s3_secret_key == null) { sb.append("null"); } else { sb.append(this.s3_secret_key); } first = false; if (!first) sb.append(", "); sb.append("s3_region:"); if (this.s3_region == null) { sb.append("null"); } else { sb.append(this.s3_region); } first = false; if (!first) sb.append(", "); sb.append("geo_coords_encoding:"); if (this.geo_coords_encoding == null) { sb.append("null"); } else { sb.append(this.geo_coords_encoding); } first = false; if (!first) sb.append(", "); sb.append("geo_coords_comp_param:"); sb.append(this.geo_coords_comp_param); first = false; if (!first) sb.append(", "); sb.append("geo_coords_type:"); if (this.geo_coords_type == null) { sb.append("null"); } else { sb.append(this.geo_coords_type); } first = false; if (!first) sb.append(", "); sb.append("geo_coords_srid:"); sb.append(this.geo_coords_srid); first = false; if (!first) sb.append(", "); sb.append("sanitize_column_names:"); sb.append(this.sanitize_column_names); first = false; if (!first) sb.append(", "); sb.append("geo_layer_name:"); if (this.geo_layer_name == null) { sb.append("null"); } else { sb.append(this.geo_layer_name); } first = false; if (!first) sb.append(", "); sb.append("s3_endpoint:"); if (this.s3_endpoint == null) { sb.append("null"); } else { sb.append(this.s3_endpoint); } first = false; if (!first) sb.append(", "); sb.append("geo_assign_render_groups:"); sb.append(this.geo_assign_render_groups); first = false; if (!first) sb.append(", "); sb.append("geo_explode_collections:"); sb.append(this.geo_explode_collections); first = false; if (!first) sb.append(", "); sb.append("source_srid:"); sb.append(this.source_srid); first = false; if (!first) sb.append(", "); sb.append("s3_session_token:"); if (this.s3_session_token == null) { sb.append("null"); } else { sb.append(this.s3_session_token); } first = false; if (!first) sb.append(", "); sb.append("raster_point_type:"); if (this.raster_point_type == null) { sb.append("null"); } else { sb.append(this.raster_point_type); } first = false; if (!first) sb.append(", "); sb.append("raster_import_bands:"); if (this.raster_import_bands == null) { sb.append("null"); } else { sb.append(this.raster_import_bands); } first = false; if (!first) sb.append(", "); sb.append("raster_scanlines_per_thread:"); sb.append(this.raster_scanlines_per_thread); first = false; if (!first) sb.append(", "); sb.append("raster_point_transform:"); if (this.raster_point_transform == null) { sb.append("null"); } else { sb.append(this.raster_point_transform); } first = false; if (!first) sb.append(", "); sb.append("raster_point_compute_angle:"); sb.append(this.raster_point_compute_angle); first = false; if (!first) sb.append(", "); sb.append("raster_import_dimensions:"); if (this.raster_import_dimensions == null) { sb.append("null"); } else { sb.append(this.raster_import_dimensions); } first = false; if (!first) sb.append(", "); sb.append("odbc_dsn:"); if (this.odbc_dsn == null) { sb.append("null"); } else { sb.append(this.odbc_dsn); } first = false; if (!first) sb.append(", "); sb.append("odbc_connection_string:"); if (this.odbc_connection_string == null) { sb.append("null"); } else { sb.append(this.odbc_connection_string); } first = false; if (!first) sb.append(", "); sb.append("odbc_sql_select:"); if (this.odbc_sql_select == null) { sb.append("null"); } else { sb.append(this.odbc_sql_select); } first = false; if (!first) sb.append(", "); sb.append("odbc_sql_order_by:"); if (this.odbc_sql_order_by == null) { sb.append("null"); } else { sb.append(this.odbc_sql_order_by); } first = false; if (!first) sb.append(", "); sb.append("odbc_username:"); if (this.odbc_username == null) { sb.append("null"); } else { sb.append(this.odbc_username); } first = false; if (!first) sb.append(", "); sb.append("odbc_password:"); if (this.odbc_password == null) { sb.append("null"); } else { sb.append(this.odbc_password); } first = false; if (!first) sb.append(", "); sb.append("odbc_credential_string:"); if (this.odbc_credential_string == null) { sb.append("null"); } else { sb.append(this.odbc_credential_string); } first = false; if (!first) sb.append(", "); sb.append("add_metadata_columns:"); if (this.add_metadata_columns == null) { sb.append("null"); } else { sb.append(this.add_metadata_columns); } first = false; if (!first) sb.append(", "); sb.append("trim_spaces:"); sb.append(this.trim_spaces); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TCopyParamsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCopyParamsStandardScheme getScheme() { return new TCopyParamsStandardScheme(); } } private static class TCopyParamsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCopyParams> { public void read(org.apache.thrift.protocol.TProtocol iprot, TCopyParams struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DELIMITER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.delimiter = iprot.readString(); struct.setDelimiterIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NULL_STR if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.null_str = iprot.readString(); struct.setNull_strIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // HAS_HEADER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.has_header = ai.heavy.thrift.server.TImportHeaderRow.findByValue(iprot.readI32()); struct.setHas_headerIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // QUOTED if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.quoted = iprot.readBool(); struct.setQuotedIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // QUOTE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.quote = iprot.readString(); struct.setQuoteIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // ESCAPE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.escape = iprot.readString(); struct.setEscapeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // LINE_DELIM if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.line_delim = iprot.readString(); struct.setLine_delimIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // ARRAY_DELIM if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.array_delim = iprot.readString(); struct.setArray_delimIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // ARRAY_BEGIN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.array_begin = iprot.readString(); struct.setArray_beginIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 10: // ARRAY_END if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.array_end = iprot.readString(); struct.setArray_endIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 11: // THREADS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.threads = iprot.readI32(); struct.setThreadsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 12: // SOURCE_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.source_type = ai.heavy.thrift.server.TSourceType.findByValue(iprot.readI32()); struct.setSource_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 13: // S3_ACCESS_KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.s3_access_key = iprot.readString(); struct.setS3_access_keyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 14: // S3_SECRET_KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.s3_secret_key = iprot.readString(); struct.setS3_secret_keyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 15: // S3_REGION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.s3_region = iprot.readString(); struct.setS3_regionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 16: // GEO_COORDS_ENCODING if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.geo_coords_encoding = ai.heavy.thrift.server.TEncodingType.findByValue(iprot.readI32()); struct.setGeo_coords_encodingIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 17: // GEO_COORDS_COMP_PARAM if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.geo_coords_comp_param = iprot.readI32(); struct.setGeo_coords_comp_paramIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 18: // GEO_COORDS_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.geo_coords_type = ai.heavy.thrift.server.TDatumType.findByValue(iprot.readI32()); struct.setGeo_coords_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 19: // GEO_COORDS_SRID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.geo_coords_srid = iprot.readI32(); struct.setGeo_coords_sridIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 20: // SANITIZE_COLUMN_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.sanitize_column_names = iprot.readBool(); struct.setSanitize_column_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 21: // GEO_LAYER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.geo_layer_name = iprot.readString(); struct.setGeo_layer_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 22: // S3_ENDPOINT if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.s3_endpoint = iprot.readString(); struct.setS3_endpointIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 23: // GEO_ASSIGN_RENDER_GROUPS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.geo_assign_render_groups = iprot.readBool(); struct.setGeo_assign_render_groupsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 24: // GEO_EXPLODE_COLLECTIONS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.geo_explode_collections = iprot.readBool(); struct.setGeo_explode_collectionsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 25: // SOURCE_SRID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.source_srid = iprot.readI32(); struct.setSource_sridIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 26: // S3_SESSION_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.s3_session_token = iprot.readString(); struct.setS3_session_tokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 27: // RASTER_POINT_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.raster_point_type = ai.heavy.thrift.server.TRasterPointType.findByValue(iprot.readI32()); struct.setRaster_point_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 28: // RASTER_IMPORT_BANDS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.raster_import_bands = iprot.readString(); struct.setRaster_import_bandsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 29: // RASTER_SCANLINES_PER_THREAD if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.raster_scanlines_per_thread = iprot.readI32(); struct.setRaster_scanlines_per_threadIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 30: // RASTER_POINT_TRANSFORM if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.raster_point_transform = ai.heavy.thrift.server.TRasterPointTransform.findByValue(iprot.readI32()); struct.setRaster_point_transformIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 31: // RASTER_POINT_COMPUTE_ANGLE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.raster_point_compute_angle = iprot.readBool(); struct.setRaster_point_compute_angleIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 32: // RASTER_IMPORT_DIMENSIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.raster_import_dimensions = iprot.readString(); struct.setRaster_import_dimensionsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 33: // ODBC_DSN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.odbc_dsn = iprot.readString(); struct.setOdbc_dsnIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 34: // ODBC_CONNECTION_STRING if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.odbc_connection_string = iprot.readString(); struct.setOdbc_connection_stringIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 35: // ODBC_SQL_SELECT if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.odbc_sql_select = iprot.readString(); struct.setOdbc_sql_selectIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 36: // ODBC_SQL_ORDER_BY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.odbc_sql_order_by = iprot.readString(); struct.setOdbc_sql_order_byIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 37: // ODBC_USERNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.odbc_username = iprot.readString(); struct.setOdbc_usernameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 38: // ODBC_PASSWORD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.odbc_password = iprot.readString(); struct.setOdbc_passwordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 39: // ODBC_CREDENTIAL_STRING if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.odbc_credential_string = iprot.readString(); struct.setOdbc_credential_stringIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 40: // ADD_METADATA_COLUMNS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.add_metadata_columns = iprot.readString(); struct.setAdd_metadata_columnsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 41: // TRIM_SPACES if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.trim_spaces = iprot.readBool(); struct.setTrim_spacesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TCopyParams struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.delimiter != null) { oprot.writeFieldBegin(DELIMITER_FIELD_DESC); oprot.writeString(struct.delimiter); oprot.writeFieldEnd(); } if (struct.null_str != null) { oprot.writeFieldBegin(NULL_STR_FIELD_DESC); oprot.writeString(struct.null_str); oprot.writeFieldEnd(); } if (struct.has_header != null) { oprot.writeFieldBegin(HAS_HEADER_FIELD_DESC); oprot.writeI32(struct.has_header.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(QUOTED_FIELD_DESC); oprot.writeBool(struct.quoted); oprot.writeFieldEnd(); if (struct.quote != null) { oprot.writeFieldBegin(QUOTE_FIELD_DESC); oprot.writeString(struct.quote); oprot.writeFieldEnd(); } if (struct.escape != null) { oprot.writeFieldBegin(ESCAPE_FIELD_DESC); oprot.writeString(struct.escape); oprot.writeFieldEnd(); } if (struct.line_delim != null) { oprot.writeFieldBegin(LINE_DELIM_FIELD_DESC); oprot.writeString(struct.line_delim); oprot.writeFieldEnd(); } if (struct.array_delim != null) { oprot.writeFieldBegin(ARRAY_DELIM_FIELD_DESC); oprot.writeString(struct.array_delim); oprot.writeFieldEnd(); } if (struct.array_begin != null) { oprot.writeFieldBegin(ARRAY_BEGIN_FIELD_DESC); oprot.writeString(struct.array_begin); oprot.writeFieldEnd(); } if (struct.array_end != null) { oprot.writeFieldBegin(ARRAY_END_FIELD_DESC); oprot.writeString(struct.array_end); oprot.writeFieldEnd(); } oprot.writeFieldBegin(THREADS_FIELD_DESC); oprot.writeI32(struct.threads); oprot.writeFieldEnd(); if (struct.source_type != null) { oprot.writeFieldBegin(SOURCE_TYPE_FIELD_DESC); oprot.writeI32(struct.source_type.getValue()); oprot.writeFieldEnd(); } if (struct.s3_access_key != null) { oprot.writeFieldBegin(S3_ACCESS_KEY_FIELD_DESC); oprot.writeString(struct.s3_access_key); oprot.writeFieldEnd(); } if (struct.s3_secret_key != null) { oprot.writeFieldBegin(S3_SECRET_KEY_FIELD_DESC); oprot.writeString(struct.s3_secret_key); oprot.writeFieldEnd(); } if (struct.s3_region != null) { oprot.writeFieldBegin(S3_REGION_FIELD_DESC); oprot.writeString(struct.s3_region); oprot.writeFieldEnd(); } if (struct.geo_coords_encoding != null) { oprot.writeFieldBegin(GEO_COORDS_ENCODING_FIELD_DESC); oprot.writeI32(struct.geo_coords_encoding.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(GEO_COORDS_COMP_PARAM_FIELD_DESC); oprot.writeI32(struct.geo_coords_comp_param); oprot.writeFieldEnd(); if (struct.geo_coords_type != null) { oprot.writeFieldBegin(GEO_COORDS_TYPE_FIELD_DESC); oprot.writeI32(struct.geo_coords_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(GEO_COORDS_SRID_FIELD_DESC); oprot.writeI32(struct.geo_coords_srid); oprot.writeFieldEnd(); oprot.writeFieldBegin(SANITIZE_COLUMN_NAMES_FIELD_DESC); oprot.writeBool(struct.sanitize_column_names); oprot.writeFieldEnd(); if (struct.geo_layer_name != null) { oprot.writeFieldBegin(GEO_LAYER_NAME_FIELD_DESC); oprot.writeString(struct.geo_layer_name); oprot.writeFieldEnd(); } if (struct.s3_endpoint != null) { oprot.writeFieldBegin(S3_ENDPOINT_FIELD_DESC); oprot.writeString(struct.s3_endpoint); oprot.writeFieldEnd(); } oprot.writeFieldBegin(GEO_ASSIGN_RENDER_GROUPS_FIELD_DESC); oprot.writeBool(struct.geo_assign_render_groups); oprot.writeFieldEnd(); oprot.writeFieldBegin(GEO_EXPLODE_COLLECTIONS_FIELD_DESC); oprot.writeBool(struct.geo_explode_collections); oprot.writeFieldEnd(); oprot.writeFieldBegin(SOURCE_SRID_FIELD_DESC); oprot.writeI32(struct.source_srid); oprot.writeFieldEnd(); if (struct.s3_session_token != null) { oprot.writeFieldBegin(S3_SESSION_TOKEN_FIELD_DESC); oprot.writeString(struct.s3_session_token); oprot.writeFieldEnd(); } if (struct.raster_point_type != null) { oprot.writeFieldBegin(RASTER_POINT_TYPE_FIELD_DESC); oprot.writeI32(struct.raster_point_type.getValue()); oprot.writeFieldEnd(); } if (struct.raster_import_bands != null) { oprot.writeFieldBegin(RASTER_IMPORT_BANDS_FIELD_DESC); oprot.writeString(struct.raster_import_bands); oprot.writeFieldEnd(); } oprot.writeFieldBegin(RASTER_SCANLINES_PER_THREAD_FIELD_DESC); oprot.writeI32(struct.raster_scanlines_per_thread); oprot.writeFieldEnd(); if (struct.raster_point_transform != null) { oprot.writeFieldBegin(RASTER_POINT_TRANSFORM_FIELD_DESC); oprot.writeI32(struct.raster_point_transform.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(RASTER_POINT_COMPUTE_ANGLE_FIELD_DESC); oprot.writeBool(struct.raster_point_compute_angle); oprot.writeFieldEnd(); if (struct.raster_import_dimensions != null) { oprot.writeFieldBegin(RASTER_IMPORT_DIMENSIONS_FIELD_DESC); oprot.writeString(struct.raster_import_dimensions); oprot.writeFieldEnd(); } if (struct.odbc_dsn != null) { oprot.writeFieldBegin(ODBC_DSN_FIELD_DESC); oprot.writeString(struct.odbc_dsn); oprot.writeFieldEnd(); } if (struct.odbc_connection_string != null) { oprot.writeFieldBegin(ODBC_CONNECTION_STRING_FIELD_DESC); oprot.writeString(struct.odbc_connection_string); oprot.writeFieldEnd(); } if (struct.odbc_sql_select != null) { oprot.writeFieldBegin(ODBC_SQL_SELECT_FIELD_DESC); oprot.writeString(struct.odbc_sql_select); oprot.writeFieldEnd(); } if (struct.odbc_sql_order_by != null) { oprot.writeFieldBegin(ODBC_SQL_ORDER_BY_FIELD_DESC); oprot.writeString(struct.odbc_sql_order_by); oprot.writeFieldEnd(); } if (struct.odbc_username != null) { oprot.writeFieldBegin(ODBC_USERNAME_FIELD_DESC); oprot.writeString(struct.odbc_username); oprot.writeFieldEnd(); } if (struct.odbc_password != null) { oprot.writeFieldBegin(ODBC_PASSWORD_FIELD_DESC); oprot.writeString(struct.odbc_password); oprot.writeFieldEnd(); } if (struct.odbc_credential_string != null) { oprot.writeFieldBegin(ODBC_CREDENTIAL_STRING_FIELD_DESC); oprot.writeString(struct.odbc_credential_string); oprot.writeFieldEnd(); } if (struct.add_metadata_columns != null) { oprot.writeFieldBegin(ADD_METADATA_COLUMNS_FIELD_DESC); oprot.writeString(struct.add_metadata_columns); oprot.writeFieldEnd(); } oprot.writeFieldBegin(TRIM_SPACES_FIELD_DESC); oprot.writeBool(struct.trim_spaces); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TCopyParamsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCopyParamsTupleScheme getScheme() { return new TCopyParamsTupleScheme(); } } private static class TCopyParamsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCopyParams> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TCopyParams struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetDelimiter()) { optionals.set(0); } if (struct.isSetNull_str()) { optionals.set(1); } if (struct.isSetHas_header()) { optionals.set(2); } if (struct.isSetQuoted()) { optionals.set(3); } if (struct.isSetQuote()) { optionals.set(4); } if (struct.isSetEscape()) { optionals.set(5); } if (struct.isSetLine_delim()) { optionals.set(6); } if (struct.isSetArray_delim()) { optionals.set(7); } if (struct.isSetArray_begin()) { optionals.set(8); } if (struct.isSetArray_end()) { optionals.set(9); } if (struct.isSetThreads()) { optionals.set(10); } if (struct.isSetSource_type()) { optionals.set(11); } if (struct.isSetS3_access_key()) { optionals.set(12); } if (struct.isSetS3_secret_key()) { optionals.set(13); } if (struct.isSetS3_region()) { optionals.set(14); } if (struct.isSetGeo_coords_encoding()) { optionals.set(15); } if (struct.isSetGeo_coords_comp_param()) { optionals.set(16); } if (struct.isSetGeo_coords_type()) { optionals.set(17); } if (struct.isSetGeo_coords_srid()) { optionals.set(18); } if (struct.isSetSanitize_column_names()) { optionals.set(19); } if (struct.isSetGeo_layer_name()) { optionals.set(20); } if (struct.isSetS3_endpoint()) { optionals.set(21); } if (struct.isSetGeo_assign_render_groups()) { optionals.set(22); } if (struct.isSetGeo_explode_collections()) { optionals.set(23); } if (struct.isSetSource_srid()) { optionals.set(24); } if (struct.isSetS3_session_token()) { optionals.set(25); } if (struct.isSetRaster_point_type()) { optionals.set(26); } if (struct.isSetRaster_import_bands()) { optionals.set(27); } if (struct.isSetRaster_scanlines_per_thread()) { optionals.set(28); } if (struct.isSetRaster_point_transform()) { optionals.set(29); } if (struct.isSetRaster_point_compute_angle()) { optionals.set(30); } if (struct.isSetRaster_import_dimensions()) { optionals.set(31); } if (struct.isSetOdbc_dsn()) { optionals.set(32); } if (struct.isSetOdbc_connection_string()) { optionals.set(33); } if (struct.isSetOdbc_sql_select()) { optionals.set(34); } if (struct.isSetOdbc_sql_order_by()) { optionals.set(35); } if (struct.isSetOdbc_username()) { optionals.set(36); } if (struct.isSetOdbc_password()) { optionals.set(37); } if (struct.isSetOdbc_credential_string()) { optionals.set(38); } if (struct.isSetAdd_metadata_columns()) { optionals.set(39); } if (struct.isSetTrim_spaces()) { optionals.set(40); } oprot.writeBitSet(optionals, 41); if (struct.isSetDelimiter()) { oprot.writeString(struct.delimiter); } if (struct.isSetNull_str()) { oprot.writeString(struct.null_str); } if (struct.isSetHas_header()) { oprot.writeI32(struct.has_header.getValue()); } if (struct.isSetQuoted()) { oprot.writeBool(struct.quoted); } if (struct.isSetQuote()) { oprot.writeString(struct.quote); } if (struct.isSetEscape()) { oprot.writeString(struct.escape); } if (struct.isSetLine_delim()) { oprot.writeString(struct.line_delim); } if (struct.isSetArray_delim()) { oprot.writeString(struct.array_delim); } if (struct.isSetArray_begin()) { oprot.writeString(struct.array_begin); } if (struct.isSetArray_end()) { oprot.writeString(struct.array_end); } if (struct.isSetThreads()) { oprot.writeI32(struct.threads); } if (struct.isSetSource_type()) { oprot.writeI32(struct.source_type.getValue()); } if (struct.isSetS3_access_key()) { oprot.writeString(struct.s3_access_key); } if (struct.isSetS3_secret_key()) { oprot.writeString(struct.s3_secret_key); } if (struct.isSetS3_region()) { oprot.writeString(struct.s3_region); } if (struct.isSetGeo_coords_encoding()) { oprot.writeI32(struct.geo_coords_encoding.getValue()); } if (struct.isSetGeo_coords_comp_param()) { oprot.writeI32(struct.geo_coords_comp_param); } if (struct.isSetGeo_coords_type()) { oprot.writeI32(struct.geo_coords_type.getValue()); } if (struct.isSetGeo_coords_srid()) { oprot.writeI32(struct.geo_coords_srid); } if (struct.isSetSanitize_column_names()) { oprot.writeBool(struct.sanitize_column_names); } if (struct.isSetGeo_layer_name()) { oprot.writeString(struct.geo_layer_name); } if (struct.isSetS3_endpoint()) { oprot.writeString(struct.s3_endpoint); } if (struct.isSetGeo_assign_render_groups()) { oprot.writeBool(struct.geo_assign_render_groups); } if (struct.isSetGeo_explode_collections()) { oprot.writeBool(struct.geo_explode_collections); } if (struct.isSetSource_srid()) { oprot.writeI32(struct.source_srid); } if (struct.isSetS3_session_token()) { oprot.writeString(struct.s3_session_token); } if (struct.isSetRaster_point_type()) { oprot.writeI32(struct.raster_point_type.getValue()); } if (struct.isSetRaster_import_bands()) { oprot.writeString(struct.raster_import_bands); } if (struct.isSetRaster_scanlines_per_thread()) { oprot.writeI32(struct.raster_scanlines_per_thread); } if (struct.isSetRaster_point_transform()) { oprot.writeI32(struct.raster_point_transform.getValue()); } if (struct.isSetRaster_point_compute_angle()) { oprot.writeBool(struct.raster_point_compute_angle); } if (struct.isSetRaster_import_dimensions()) { oprot.writeString(struct.raster_import_dimensions); } if (struct.isSetOdbc_dsn()) { oprot.writeString(struct.odbc_dsn); } if (struct.isSetOdbc_connection_string()) { oprot.writeString(struct.odbc_connection_string); } if (struct.isSetOdbc_sql_select()) { oprot.writeString(struct.odbc_sql_select); } if (struct.isSetOdbc_sql_order_by()) { oprot.writeString(struct.odbc_sql_order_by); } if (struct.isSetOdbc_username()) { oprot.writeString(struct.odbc_username); } if (struct.isSetOdbc_password()) { oprot.writeString(struct.odbc_password); } if (struct.isSetOdbc_credential_string()) { oprot.writeString(struct.odbc_credential_string); } if (struct.isSetAdd_metadata_columns()) { oprot.writeString(struct.add_metadata_columns); } if (struct.isSetTrim_spaces()) { oprot.writeBool(struct.trim_spaces); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TCopyParams struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(41); if (incoming.get(0)) { struct.delimiter = iprot.readString(); struct.setDelimiterIsSet(true); } if (incoming.get(1)) { struct.null_str = iprot.readString(); struct.setNull_strIsSet(true); } if (incoming.get(2)) { struct.has_header = ai.heavy.thrift.server.TImportHeaderRow.findByValue(iprot.readI32()); struct.setHas_headerIsSet(true); } if (incoming.get(3)) { struct.quoted = iprot.readBool(); struct.setQuotedIsSet(true); } if (incoming.get(4)) { struct.quote = iprot.readString(); struct.setQuoteIsSet(true); } if (incoming.get(5)) { struct.escape = iprot.readString(); struct.setEscapeIsSet(true); } if (incoming.get(6)) { struct.line_delim = iprot.readString(); struct.setLine_delimIsSet(true); } if (incoming.get(7)) { struct.array_delim = iprot.readString(); struct.setArray_delimIsSet(true); } if (incoming.get(8)) { struct.array_begin = iprot.readString(); struct.setArray_beginIsSet(true); } if (incoming.get(9)) { struct.array_end = iprot.readString(); struct.setArray_endIsSet(true); } if (incoming.get(10)) { struct.threads = iprot.readI32(); struct.setThreadsIsSet(true); } if (incoming.get(11)) { struct.source_type = ai.heavy.thrift.server.TSourceType.findByValue(iprot.readI32()); struct.setSource_typeIsSet(true); } if (incoming.get(12)) { struct.s3_access_key = iprot.readString(); struct.setS3_access_keyIsSet(true); } if (incoming.get(13)) { struct.s3_secret_key = iprot.readString(); struct.setS3_secret_keyIsSet(true); } if (incoming.get(14)) { struct.s3_region = iprot.readString(); struct.setS3_regionIsSet(true); } if (incoming.get(15)) { struct.geo_coords_encoding = ai.heavy.thrift.server.TEncodingType.findByValue(iprot.readI32()); struct.setGeo_coords_encodingIsSet(true); } if (incoming.get(16)) { struct.geo_coords_comp_param = iprot.readI32(); struct.setGeo_coords_comp_paramIsSet(true); } if (incoming.get(17)) { struct.geo_coords_type = ai.heavy.thrift.server.TDatumType.findByValue(iprot.readI32()); struct.setGeo_coords_typeIsSet(true); } if (incoming.get(18)) { struct.geo_coords_srid = iprot.readI32(); struct.setGeo_coords_sridIsSet(true); } if (incoming.get(19)) { struct.sanitize_column_names = iprot.readBool(); struct.setSanitize_column_namesIsSet(true); } if (incoming.get(20)) { struct.geo_layer_name = iprot.readString(); struct.setGeo_layer_nameIsSet(true); } if (incoming.get(21)) { struct.s3_endpoint = iprot.readString(); struct.setS3_endpointIsSet(true); } if (incoming.get(22)) { struct.geo_assign_render_groups = iprot.readBool(); struct.setGeo_assign_render_groupsIsSet(true); } if (incoming.get(23)) { struct.geo_explode_collections = iprot.readBool(); struct.setGeo_explode_collectionsIsSet(true); } if (incoming.get(24)) { struct.source_srid = iprot.readI32(); struct.setSource_sridIsSet(true); } if (incoming.get(25)) { struct.s3_session_token = iprot.readString(); struct.setS3_session_tokenIsSet(true); } if (incoming.get(26)) { struct.raster_point_type = ai.heavy.thrift.server.TRasterPointType.findByValue(iprot.readI32()); struct.setRaster_point_typeIsSet(true); } if (incoming.get(27)) { struct.raster_import_bands = iprot.readString(); struct.setRaster_import_bandsIsSet(true); } if (incoming.get(28)) { struct.raster_scanlines_per_thread = iprot.readI32(); struct.setRaster_scanlines_per_threadIsSet(true); } if (incoming.get(29)) { struct.raster_point_transform = ai.heavy.thrift.server.TRasterPointTransform.findByValue(iprot.readI32()); struct.setRaster_point_transformIsSet(true); } if (incoming.get(30)) { struct.raster_point_compute_angle = iprot.readBool(); struct.setRaster_point_compute_angleIsSet(true); } if (incoming.get(31)) { struct.raster_import_dimensions = iprot.readString(); struct.setRaster_import_dimensionsIsSet(true); } if (incoming.get(32)) { struct.odbc_dsn = iprot.readString(); struct.setOdbc_dsnIsSet(true); } if (incoming.get(33)) { struct.odbc_connection_string = iprot.readString(); struct.setOdbc_connection_stringIsSet(true); } if (incoming.get(34)) { struct.odbc_sql_select = iprot.readString(); struct.setOdbc_sql_selectIsSet(true); } if (incoming.get(35)) { struct.odbc_sql_order_by = iprot.readString(); struct.setOdbc_sql_order_byIsSet(true); } if (incoming.get(36)) { struct.odbc_username = iprot.readString(); struct.setOdbc_usernameIsSet(true); } if (incoming.get(37)) { struct.odbc_password = iprot.readString(); struct.setOdbc_passwordIsSet(true); } if (incoming.get(38)) { struct.odbc_credential_string = iprot.readString(); struct.setOdbc_credential_stringIsSet(true); } if (incoming.get(39)) { struct.add_metadata_columns = iprot.readString(); struct.setAdd_metadata_columnsIsSet(true); } if (incoming.get(40)) { struct.trim_spaces = iprot.readBool(); struct.setTrim_spacesIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TCountDistinctDescriptor.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TCountDistinctDescriptor implements org.apache.thrift.TBase<TCountDistinctDescriptor, TCountDistinctDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<TCountDistinctDescriptor> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCountDistinctDescriptor"); private static final org.apache.thrift.protocol.TField IMPL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("impl_type", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField MIN_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("min_val", org.apache.thrift.protocol.TType.I64, (short)2); private static final org.apache.thrift.protocol.TField BITMAP_SZ_BITS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitmap_sz_bits", org.apache.thrift.protocol.TType.I64, (short)3); private static final org.apache.thrift.protocol.TField APPROXIMATE_FIELD_DESC = new org.apache.thrift.protocol.TField("approximate", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final org.apache.thrift.protocol.TField DEVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("device_type", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField SUB_BITMAP_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("sub_bitmap_count", org.apache.thrift.protocol.TType.I64, (short)6); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCountDistinctDescriptorStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCountDistinctDescriptorTupleSchemeFactory(); /** * * @see TCountDistinctImplType */ public @org.apache.thrift.annotation.Nullable TCountDistinctImplType impl_type; // required public long min_val; // required public long bitmap_sz_bits; // required public boolean approximate; // required /** * * @see ai.heavy.thrift.server.TDeviceType */ public @org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TDeviceType device_type; // required public long sub_bitmap_count; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * * @see TCountDistinctImplType */ IMPL_TYPE((short)1, "impl_type"), MIN_VAL((short)2, "min_val"), BITMAP_SZ_BITS((short)3, "bitmap_sz_bits"), APPROXIMATE((short)4, "approximate"), /** * * @see ai.heavy.thrift.server.TDeviceType */ DEVICE_TYPE((short)5, "device_type"), SUB_BITMAP_COUNT((short)6, "sub_bitmap_count"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // IMPL_TYPE return IMPL_TYPE; case 2: // MIN_VAL return MIN_VAL; case 3: // BITMAP_SZ_BITS return BITMAP_SZ_BITS; case 4: // APPROXIMATE return APPROXIMATE; case 5: // DEVICE_TYPE return DEVICE_TYPE; case 6: // SUB_BITMAP_COUNT return SUB_BITMAP_COUNT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __MIN_VAL_ISSET_ID = 0; private static final int __BITMAP_SZ_BITS_ISSET_ID = 1; private static final int __APPROXIMATE_ISSET_ID = 2; private static final int __SUB_BITMAP_COUNT_ISSET_ID = 3; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.IMPL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("impl_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCountDistinctImplType.class))); tmpMap.put(_Fields.MIN_VAL, new org.apache.thrift.meta_data.FieldMetaData("min_val", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.BITMAP_SZ_BITS, new org.apache.thrift.meta_data.FieldMetaData("bitmap_sz_bits", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.APPROXIMATE, new org.apache.thrift.meta_data.FieldMetaData("approximate", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.DEVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("device_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ai.heavy.thrift.server.TDeviceType.class))); tmpMap.put(_Fields.SUB_BITMAP_COUNT, new org.apache.thrift.meta_data.FieldMetaData("sub_bitmap_count", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCountDistinctDescriptor.class, metaDataMap); } public TCountDistinctDescriptor() { } public TCountDistinctDescriptor( TCountDistinctImplType impl_type, long min_val, long bitmap_sz_bits, boolean approximate, ai.heavy.thrift.server.TDeviceType device_type, long sub_bitmap_count) { this(); this.impl_type = impl_type; this.min_val = min_val; setMin_valIsSet(true); this.bitmap_sz_bits = bitmap_sz_bits; setBitmap_sz_bitsIsSet(true); this.approximate = approximate; setApproximateIsSet(true); this.device_type = device_type; this.sub_bitmap_count = sub_bitmap_count; setSub_bitmap_countIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public TCountDistinctDescriptor(TCountDistinctDescriptor other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetImpl_type()) { this.impl_type = other.impl_type; } this.min_val = other.min_val; this.bitmap_sz_bits = other.bitmap_sz_bits; this.approximate = other.approximate; if (other.isSetDevice_type()) { this.device_type = other.device_type; } this.sub_bitmap_count = other.sub_bitmap_count; } public TCountDistinctDescriptor deepCopy() { return new TCountDistinctDescriptor(this); } @Override public void clear() { this.impl_type = null; setMin_valIsSet(false); this.min_val = 0; setBitmap_sz_bitsIsSet(false); this.bitmap_sz_bits = 0; setApproximateIsSet(false); this.approximate = false; this.device_type = null; setSub_bitmap_countIsSet(false); this.sub_bitmap_count = 0; } /** * * @see TCountDistinctImplType */ @org.apache.thrift.annotation.Nullable public TCountDistinctImplType getImpl_type() { return this.impl_type; } /** * * @see TCountDistinctImplType */ public TCountDistinctDescriptor setImpl_type(@org.apache.thrift.annotation.Nullable TCountDistinctImplType impl_type) { this.impl_type = impl_type; return this; } public void unsetImpl_type() { this.impl_type = null; } /** Returns true if field impl_type is set (has been assigned a value) and false otherwise */ public boolean isSetImpl_type() { return this.impl_type != null; } public void setImpl_typeIsSet(boolean value) { if (!value) { this.impl_type = null; } } public long getMin_val() { return this.min_val; } public TCountDistinctDescriptor setMin_val(long min_val) { this.min_val = min_val; setMin_valIsSet(true); return this; } public void unsetMin_val() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MIN_VAL_ISSET_ID); } /** Returns true if field min_val is set (has been assigned a value) and false otherwise */ public boolean isSetMin_val() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MIN_VAL_ISSET_ID); } public void setMin_valIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MIN_VAL_ISSET_ID, value); } public long getBitmap_sz_bits() { return this.bitmap_sz_bits; } public TCountDistinctDescriptor setBitmap_sz_bits(long bitmap_sz_bits) { this.bitmap_sz_bits = bitmap_sz_bits; setBitmap_sz_bitsIsSet(true); return this; } public void unsetBitmap_sz_bits() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BITMAP_SZ_BITS_ISSET_ID); } /** Returns true if field bitmap_sz_bits is set (has been assigned a value) and false otherwise */ public boolean isSetBitmap_sz_bits() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BITMAP_SZ_BITS_ISSET_ID); } public void setBitmap_sz_bitsIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BITMAP_SZ_BITS_ISSET_ID, value); } public boolean isApproximate() { return this.approximate; } public TCountDistinctDescriptor setApproximate(boolean approximate) { this.approximate = approximate; setApproximateIsSet(true); return this; } public void unsetApproximate() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __APPROXIMATE_ISSET_ID); } /** Returns true if field approximate is set (has been assigned a value) and false otherwise */ public boolean isSetApproximate() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APPROXIMATE_ISSET_ID); } public void setApproximateIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __APPROXIMATE_ISSET_ID, value); } /** * * @see ai.heavy.thrift.server.TDeviceType */ @org.apache.thrift.annotation.Nullable public ai.heavy.thrift.server.TDeviceType getDevice_type() { return this.device_type; } /** * * @see ai.heavy.thrift.server.TDeviceType */ public TCountDistinctDescriptor setDevice_type(@org.apache.thrift.annotation.Nullable ai.heavy.thrift.server.TDeviceType device_type) { this.device_type = device_type; return this; } public void unsetDevice_type() { this.device_type = null; } /** Returns true if field device_type is set (has been assigned a value) and false otherwise */ public boolean isSetDevice_type() { return this.device_type != null; } public void setDevice_typeIsSet(boolean value) { if (!value) { this.device_type = null; } } public long getSub_bitmap_count() { return this.sub_bitmap_count; } public TCountDistinctDescriptor setSub_bitmap_count(long sub_bitmap_count) { this.sub_bitmap_count = sub_bitmap_count; setSub_bitmap_countIsSet(true); return this; } public void unsetSub_bitmap_count() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUB_BITMAP_COUNT_ISSET_ID); } /** Returns true if field sub_bitmap_count is set (has been assigned a value) and false otherwise */ public boolean isSetSub_bitmap_count() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUB_BITMAP_COUNT_ISSET_ID); } public void setSub_bitmap_countIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUB_BITMAP_COUNT_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case IMPL_TYPE: if (value == null) { unsetImpl_type(); } else { setImpl_type((TCountDistinctImplType)value); } break; case MIN_VAL: if (value == null) { unsetMin_val(); } else { setMin_val((java.lang.Long)value); } break; case BITMAP_SZ_BITS: if (value == null) { unsetBitmap_sz_bits(); } else { setBitmap_sz_bits((java.lang.Long)value); } break; case APPROXIMATE: if (value == null) { unsetApproximate(); } else { setApproximate((java.lang.Boolean)value); } break; case DEVICE_TYPE: if (value == null) { unsetDevice_type(); } else { setDevice_type((ai.heavy.thrift.server.TDeviceType)value); } break; case SUB_BITMAP_COUNT: if (value == null) { unsetSub_bitmap_count(); } else { setSub_bitmap_count((java.lang.Long)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case IMPL_TYPE: return getImpl_type(); case MIN_VAL: return getMin_val(); case BITMAP_SZ_BITS: return getBitmap_sz_bits(); case APPROXIMATE: return isApproximate(); case DEVICE_TYPE: return getDevice_type(); case SUB_BITMAP_COUNT: return getSub_bitmap_count(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case IMPL_TYPE: return isSetImpl_type(); case MIN_VAL: return isSetMin_val(); case BITMAP_SZ_BITS: return isSetBitmap_sz_bits(); case APPROXIMATE: return isSetApproximate(); case DEVICE_TYPE: return isSetDevice_type(); case SUB_BITMAP_COUNT: return isSetSub_bitmap_count(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TCountDistinctDescriptor) return this.equals((TCountDistinctDescriptor)that); return false; } public boolean equals(TCountDistinctDescriptor that) { if (that == null) return false; if (this == that) return true; boolean this_present_impl_type = true && this.isSetImpl_type(); boolean that_present_impl_type = true && that.isSetImpl_type(); if (this_present_impl_type || that_present_impl_type) { if (!(this_present_impl_type && that_present_impl_type)) return false; if (!this.impl_type.equals(that.impl_type)) return false; } boolean this_present_min_val = true; boolean that_present_min_val = true; if (this_present_min_val || that_present_min_val) { if (!(this_present_min_val && that_present_min_val)) return false; if (this.min_val != that.min_val) return false; } boolean this_present_bitmap_sz_bits = true; boolean that_present_bitmap_sz_bits = true; if (this_present_bitmap_sz_bits || that_present_bitmap_sz_bits) { if (!(this_present_bitmap_sz_bits && that_present_bitmap_sz_bits)) return false; if (this.bitmap_sz_bits != that.bitmap_sz_bits) return false; } boolean this_present_approximate = true; boolean that_present_approximate = true; if (this_present_approximate || that_present_approximate) { if (!(this_present_approximate && that_present_approximate)) return false; if (this.approximate != that.approximate) return false; } boolean this_present_device_type = true && this.isSetDevice_type(); boolean that_present_device_type = true && that.isSetDevice_type(); if (this_present_device_type || that_present_device_type) { if (!(this_present_device_type && that_present_device_type)) return false; if (!this.device_type.equals(that.device_type)) return false; } boolean this_present_sub_bitmap_count = true; boolean that_present_sub_bitmap_count = true; if (this_present_sub_bitmap_count || that_present_sub_bitmap_count) { if (!(this_present_sub_bitmap_count && that_present_sub_bitmap_count)) return false; if (this.sub_bitmap_count != that.sub_bitmap_count) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetImpl_type()) ? 131071 : 524287); if (isSetImpl_type()) hashCode = hashCode * 8191 + impl_type.getValue(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(min_val); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(bitmap_sz_bits); hashCode = hashCode * 8191 + ((approximate) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetDevice_type()) ? 131071 : 524287); if (isSetDevice_type()) hashCode = hashCode * 8191 + device_type.getValue(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sub_bitmap_count); return hashCode; } @Override public int compareTo(TCountDistinctDescriptor other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetImpl_type(), other.isSetImpl_type()); if (lastComparison != 0) { return lastComparison; } if (isSetImpl_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.impl_type, other.impl_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetMin_val(), other.isSetMin_val()); if (lastComparison != 0) { return lastComparison; } if (isSetMin_val()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.min_val, other.min_val); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetBitmap_sz_bits(), other.isSetBitmap_sz_bits()); if (lastComparison != 0) { return lastComparison; } if (isSetBitmap_sz_bits()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitmap_sz_bits, other.bitmap_sz_bits); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetApproximate(), other.isSetApproximate()); if (lastComparison != 0) { return lastComparison; } if (isSetApproximate()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.approximate, other.approximate); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDevice_type(), other.isSetDevice_type()); if (lastComparison != 0) { return lastComparison; } if (isSetDevice_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.device_type, other.device_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSub_bitmap_count(), other.isSetSub_bitmap_count()); if (lastComparison != 0) { return lastComparison; } if (isSetSub_bitmap_count()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sub_bitmap_count, other.sub_bitmap_count); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TCountDistinctDescriptor("); boolean first = true; sb.append("impl_type:"); if (this.impl_type == null) { sb.append("null"); } else { sb.append(this.impl_type); } first = false; if (!first) sb.append(", "); sb.append("min_val:"); sb.append(this.min_val); first = false; if (!first) sb.append(", "); sb.append("bitmap_sz_bits:"); sb.append(this.bitmap_sz_bits); first = false; if (!first) sb.append(", "); sb.append("approximate:"); sb.append(this.approximate); first = false; if (!first) sb.append(", "); sb.append("device_type:"); if (this.device_type == null) { sb.append("null"); } else { sb.append(this.device_type); } first = false; if (!first) sb.append(", "); sb.append("sub_bitmap_count:"); sb.append(this.sub_bitmap_count); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TCountDistinctDescriptorStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCountDistinctDescriptorStandardScheme getScheme() { return new TCountDistinctDescriptorStandardScheme(); } } private static class TCountDistinctDescriptorStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCountDistinctDescriptor> { public void read(org.apache.thrift.protocol.TProtocol iprot, TCountDistinctDescriptor struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // IMPL_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.impl_type = ai.heavy.thrift.server.TCountDistinctImplType.findByValue(iprot.readI32()); struct.setImpl_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // MIN_VAL if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.min_val = iprot.readI64(); struct.setMin_valIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // BITMAP_SZ_BITS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.bitmap_sz_bits = iprot.readI64(); struct.setBitmap_sz_bitsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // APPROXIMATE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.approximate = iprot.readBool(); struct.setApproximateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // DEVICE_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.device_type = ai.heavy.thrift.server.TDeviceType.findByValue(iprot.readI32()); struct.setDevice_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // SUB_BITMAP_COUNT if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.sub_bitmap_count = iprot.readI64(); struct.setSub_bitmap_countIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TCountDistinctDescriptor struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.impl_type != null) { oprot.writeFieldBegin(IMPL_TYPE_FIELD_DESC); oprot.writeI32(struct.impl_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MIN_VAL_FIELD_DESC); oprot.writeI64(struct.min_val); oprot.writeFieldEnd(); oprot.writeFieldBegin(BITMAP_SZ_BITS_FIELD_DESC); oprot.writeI64(struct.bitmap_sz_bits); oprot.writeFieldEnd(); oprot.writeFieldBegin(APPROXIMATE_FIELD_DESC); oprot.writeBool(struct.approximate); oprot.writeFieldEnd(); if (struct.device_type != null) { oprot.writeFieldBegin(DEVICE_TYPE_FIELD_DESC); oprot.writeI32(struct.device_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(SUB_BITMAP_COUNT_FIELD_DESC); oprot.writeI64(struct.sub_bitmap_count); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TCountDistinctDescriptorTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCountDistinctDescriptorTupleScheme getScheme() { return new TCountDistinctDescriptorTupleScheme(); } } private static class TCountDistinctDescriptorTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCountDistinctDescriptor> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TCountDistinctDescriptor struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetImpl_type()) { optionals.set(0); } if (struct.isSetMin_val()) { optionals.set(1); } if (struct.isSetBitmap_sz_bits()) { optionals.set(2); } if (struct.isSetApproximate()) { optionals.set(3); } if (struct.isSetDevice_type()) { optionals.set(4); } if (struct.isSetSub_bitmap_count()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetImpl_type()) { oprot.writeI32(struct.impl_type.getValue()); } if (struct.isSetMin_val()) { oprot.writeI64(struct.min_val); } if (struct.isSetBitmap_sz_bits()) { oprot.writeI64(struct.bitmap_sz_bits); } if (struct.isSetApproximate()) { oprot.writeBool(struct.approximate); } if (struct.isSetDevice_type()) { oprot.writeI32(struct.device_type.getValue()); } if (struct.isSetSub_bitmap_count()) { oprot.writeI64(struct.sub_bitmap_count); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TCountDistinctDescriptor struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.impl_type = ai.heavy.thrift.server.TCountDistinctImplType.findByValue(iprot.readI32()); struct.setImpl_typeIsSet(true); } if (incoming.get(1)) { struct.min_val = iprot.readI64(); struct.setMin_valIsSet(true); } if (incoming.get(2)) { struct.bitmap_sz_bits = iprot.readI64(); struct.setBitmap_sz_bitsIsSet(true); } if (incoming.get(3)) { struct.approximate = iprot.readBool(); struct.setApproximateIsSet(true); } if (incoming.get(4)) { struct.device_type = ai.heavy.thrift.server.TDeviceType.findByValue(iprot.readI32()); struct.setDevice_typeIsSet(true); } if (incoming.get(5)) { struct.sub_bitmap_count = iprot.readI64(); struct.setSub_bitmap_countIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TCountDistinctImplType.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; public enum TCountDistinctImplType implements org.apache.thrift.TEnum { Invalid(0), Bitmap(1), UnorderedSet(2); private final int value; private TCountDistinctImplType(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. */ @org.apache.thrift.annotation.Nullable public static TCountDistinctImplType findByValue(int value) { switch (value) { case 0: return Invalid; case 1: return Bitmap; case 2: return UnorderedSet; default: return null; } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TCountDistinctSet.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TCountDistinctSet implements org.apache.thrift.TBase<TCountDistinctSet, TCountDistinctSet._Fields>, java.io.Serializable, Cloneable, Comparable<TCountDistinctSet> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCountDistinctSet"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField STORAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("storage", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField REMOTE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_ptr", org.apache.thrift.protocol.TType.I64, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCountDistinctSetStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCountDistinctSetTupleSchemeFactory(); /** * * @see TCountDistinctImplType */ public @org.apache.thrift.annotation.Nullable TCountDistinctImplType type; // required public @org.apache.thrift.annotation.Nullable TCountDistinctSetStorage storage; // required public long remote_ptr; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * * @see TCountDistinctImplType */ TYPE((short)1, "type"), STORAGE((short)2, "storage"), REMOTE_PTR((short)3, "remote_ptr"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TYPE return TYPE; case 2: // STORAGE return STORAGE; case 3: // REMOTE_PTR return REMOTE_PTR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __REMOTE_PTR_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCountDistinctImplType.class))); tmpMap.put(_Fields.STORAGE, new org.apache.thrift.meta_data.FieldMetaData("storage", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCountDistinctSetStorage.class))); tmpMap.put(_Fields.REMOTE_PTR, new org.apache.thrift.meta_data.FieldMetaData("remote_ptr", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCountDistinctSet.class, metaDataMap); } public TCountDistinctSet() { } public TCountDistinctSet( TCountDistinctImplType type, TCountDistinctSetStorage storage, long remote_ptr) { this(); this.type = type; this.storage = storage; this.remote_ptr = remote_ptr; setRemote_ptrIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public TCountDistinctSet(TCountDistinctSet other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetType()) { this.type = other.type; } if (other.isSetStorage()) { this.storage = new TCountDistinctSetStorage(other.storage); } this.remote_ptr = other.remote_ptr; } public TCountDistinctSet deepCopy() { return new TCountDistinctSet(this); } @Override public void clear() { this.type = null; this.storage = null; setRemote_ptrIsSet(false); this.remote_ptr = 0; } /** * * @see TCountDistinctImplType */ @org.apache.thrift.annotation.Nullable public TCountDistinctImplType getType() { return this.type; } /** * * @see TCountDistinctImplType */ public TCountDistinctSet setType(@org.apache.thrift.annotation.Nullable TCountDistinctImplType type) { this.type = type; return this; } public void unsetType() { this.type = null; } /** Returns true if field type is set (has been assigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } public void setTypeIsSet(boolean value) { if (!value) { this.type = null; } } @org.apache.thrift.annotation.Nullable public TCountDistinctSetStorage getStorage() { return this.storage; } public TCountDistinctSet setStorage(@org.apache.thrift.annotation.Nullable TCountDistinctSetStorage storage) { this.storage = storage; return this; } public void unsetStorage() { this.storage = null; } /** Returns true if field storage is set (has been assigned a value) and false otherwise */ public boolean isSetStorage() { return this.storage != null; } public void setStorageIsSet(boolean value) { if (!value) { this.storage = null; } } public long getRemote_ptr() { return this.remote_ptr; } public TCountDistinctSet setRemote_ptr(long remote_ptr) { this.remote_ptr = remote_ptr; setRemote_ptrIsSet(true); return this; } public void unsetRemote_ptr() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REMOTE_PTR_ISSET_ID); } /** Returns true if field remote_ptr is set (has been assigned a value) and false otherwise */ public boolean isSetRemote_ptr() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REMOTE_PTR_ISSET_ID); } public void setRemote_ptrIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REMOTE_PTR_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TYPE: if (value == null) { unsetType(); } else { setType((TCountDistinctImplType)value); } break; case STORAGE: if (value == null) { unsetStorage(); } else { setStorage((TCountDistinctSetStorage)value); } break; case REMOTE_PTR: if (value == null) { unsetRemote_ptr(); } else { setRemote_ptr((java.lang.Long)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TYPE: return getType(); case STORAGE: return getStorage(); case REMOTE_PTR: return getRemote_ptr(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case TYPE: return isSetType(); case STORAGE: return isSetStorage(); case REMOTE_PTR: return isSetRemote_ptr(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TCountDistinctSet) return this.equals((TCountDistinctSet)that); return false; } public boolean equals(TCountDistinctSet that) { if (that == null) return false; if (this == that) return true; boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) return false; } boolean this_present_storage = true && this.isSetStorage(); boolean that_present_storage = true && that.isSetStorage(); if (this_present_storage || that_present_storage) { if (!(this_present_storage && that_present_storage)) return false; if (!this.storage.equals(that.storage)) return false; } boolean this_present_remote_ptr = true; boolean that_present_remote_ptr = true; if (this_present_remote_ptr || that_present_remote_ptr) { if (!(this_present_remote_ptr && that_present_remote_ptr)) return false; if (this.remote_ptr != that.remote_ptr) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); if (isSetType()) hashCode = hashCode * 8191 + type.getValue(); hashCode = hashCode * 8191 + ((isSetStorage()) ? 131071 : 524287); if (isSetStorage()) hashCode = hashCode * 8191 + storage.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(remote_ptr); return hashCode; } @Override public int compareTo(TCountDistinctSet other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetStorage(), other.isSetStorage()); if (lastComparison != 0) { return lastComparison; } if (isSetStorage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storage, other.storage); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetRemote_ptr(), other.isSetRemote_ptr()); if (lastComparison != 0) { return lastComparison; } if (isSetRemote_ptr()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_ptr, other.remote_ptr); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TCountDistinctSet("); boolean first = true; sb.append("type:"); if (this.type == null) { sb.append("null"); } else { sb.append(this.type); } first = false; if (!first) sb.append(", "); sb.append("storage:"); if (this.storage == null) { sb.append("null"); } else { sb.append(this.storage); } first = false; if (!first) sb.append(", "); sb.append("remote_ptr:"); sb.append(this.remote_ptr); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TCountDistinctSetStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCountDistinctSetStandardScheme getScheme() { return new TCountDistinctSetStandardScheme(); } } private static class TCountDistinctSetStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCountDistinctSet> { public void read(org.apache.thrift.protocol.TProtocol iprot, TCountDistinctSet struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.type = ai.heavy.thrift.server.TCountDistinctImplType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // STORAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.storage = new TCountDistinctSetStorage(); struct.storage.read(iprot); struct.setStorageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // REMOTE_PTR if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.remote_ptr = iprot.readI64(); struct.setRemote_ptrIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TCountDistinctSet struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } if (struct.storage != null) { oprot.writeFieldBegin(STORAGE_FIELD_DESC); struct.storage.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(REMOTE_PTR_FIELD_DESC); oprot.writeI64(struct.remote_ptr); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TCountDistinctSetTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCountDistinctSetTupleScheme getScheme() { return new TCountDistinctSetTupleScheme(); } } private static class TCountDistinctSetTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCountDistinctSet> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TCountDistinctSet struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetType()) { optionals.set(0); } if (struct.isSetStorage()) { optionals.set(1); } if (struct.isSetRemote_ptr()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetType()) { oprot.writeI32(struct.type.getValue()); } if (struct.isSetStorage()) { struct.storage.write(oprot); } if (struct.isSetRemote_ptr()) { oprot.writeI64(struct.remote_ptr); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TCountDistinctSet struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.type = ai.heavy.thrift.server.TCountDistinctImplType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } if (incoming.get(1)) { struct.storage = new TCountDistinctSetStorage(); struct.storage.read(iprot); struct.setStorageIsSet(true); } if (incoming.get(2)) { struct.remote_ptr = iprot.readI64(); struct.setRemote_ptrIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TCountDistinctSetStorage.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TCountDistinctSetStorage extends org.apache.thrift.TUnion<TCountDistinctSetStorage, TCountDistinctSetStorage._Fields> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCountDistinctSetStorage"); private static final org.apache.thrift.protocol.TField BITMAP_FIELD_DESC = new org.apache.thrift.protocol.TField("bitmap", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField SPARSE_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("sparse_set", org.apache.thrift.protocol.TType.SET, (short)2); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { BITMAP((short)1, "bitmap"), SPARSE_SET((short)2, "sparse_set"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // BITMAP return BITMAP; case 2: // SPARSE_SET return SPARSE_SET; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.BITMAP, new org.apache.thrift.meta_data.FieldMetaData("bitmap", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); tmpMap.put(_Fields.SPARSE_SET, new org.apache.thrift.meta_data.FieldMetaData("sparse_set", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCountDistinctSetStorage.class, metaDataMap); } public TCountDistinctSetStorage() { super(); } public TCountDistinctSetStorage(_Fields setField, java.lang.Object value) { super(setField, value); } public TCountDistinctSetStorage(TCountDistinctSetStorage other) { super(other); } public TCountDistinctSetStorage deepCopy() { return new TCountDistinctSetStorage(this); } public static TCountDistinctSetStorage bitmap(java.nio.ByteBuffer value) { TCountDistinctSetStorage x = new TCountDistinctSetStorage(); x.setBitmap(value); return x; } public static TCountDistinctSetStorage bitmap(byte[] value) { TCountDistinctSetStorage x = new TCountDistinctSetStorage(); x.setBitmap (java.nio.ByteBuffer.wrap(value.clone())); return x; } public static TCountDistinctSetStorage sparse_set(java.util.Set<java.lang.Long> value) { TCountDistinctSetStorage x = new TCountDistinctSetStorage(); x.setSparse_set(value); return x; } @Override protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException { switch (setField) { case BITMAP: if (value instanceof java.nio.ByteBuffer) { break; } throw new java.lang.ClassCastException("Was expecting value of type java.nio.ByteBuffer for field 'bitmap', but got " + value.getClass().getSimpleName()); case SPARSE_SET: if (value instanceof java.util.Set) { break; } throw new java.lang.ClassCastException("Was expecting value of type java.util.Set<java.lang.Long> for field 'sparse_set', but got " + value.getClass().getSimpleName()); default: throw new java.lang.IllegalArgumentException("Unknown field id " + setField); } } @Override protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(field.id); if (setField != null) { switch (setField) { case BITMAP: if (field.type == BITMAP_FIELD_DESC.type) { java.nio.ByteBuffer bitmap; bitmap = iprot.readBinary(); return bitmap; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case SPARSE_SET: if (field.type == SPARSE_SET_FIELD_DESC.type) { java.util.Set<java.lang.Long> sparse_set; { org.apache.thrift.protocol.TSet _set48 = iprot.readSetBegin(); sparse_set = new java.util.HashSet<java.lang.Long>(2*_set48.size); long _elem49; for (int _i50 = 0; _i50 < _set48.size; ++_i50) { _elem49 = iprot.readI64(); sparse_set.add(_elem49); } iprot.readSetEnd(); } return sparse_set; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } default: throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @Override protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case BITMAP: java.nio.ByteBuffer bitmap = (java.nio.ByteBuffer)value_; oprot.writeBinary(bitmap); return; case SPARSE_SET: java.util.Set<java.lang.Long> sparse_set = (java.util.Set<java.lang.Long>)value_; { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, sparse_set.size())); for (long _iter51 : sparse_set) { oprot.writeI64(_iter51); } oprot.writeSetEnd(); } return; default: throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_); } } @Override protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(fieldID); if (setField != null) { switch (setField) { case BITMAP: java.nio.ByteBuffer bitmap; bitmap = iprot.readBinary(); return bitmap; case SPARSE_SET: java.util.Set<java.lang.Long> sparse_set; { org.apache.thrift.protocol.TSet _set52 = iprot.readSetBegin(); sparse_set = new java.util.HashSet<java.lang.Long>(2*_set52.size); long _elem53; for (int _i54 = 0; _i54 < _set52.size; ++_i54) { _elem53 = iprot.readI64(); sparse_set.add(_elem53); } iprot.readSetEnd(); } return sparse_set; default: throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID); } } @Override protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case BITMAP: java.nio.ByteBuffer bitmap = (java.nio.ByteBuffer)value_; oprot.writeBinary(bitmap); return; case SPARSE_SET: java.util.Set<java.lang.Long> sparse_set = (java.util.Set<java.lang.Long>)value_; { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, sparse_set.size())); for (long _iter55 : sparse_set) { oprot.writeI64(_iter55); } oprot.writeSetEnd(); } return; default: throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_); } } @Override protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { switch (setField) { case BITMAP: return BITMAP_FIELD_DESC; case SPARSE_SET: return SPARSE_SET_FIELD_DESC; default: throw new java.lang.IllegalArgumentException("Unknown field id " + setField); } } @Override protected org.apache.thrift.protocol.TStruct getStructDesc() { return STRUCT_DESC; } @Override protected _Fields enumForId(short id) { return _Fields.findByThriftIdOrThrow(id); } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public byte[] getBitmap() { setBitmap(org.apache.thrift.TBaseHelper.rightSize(bufferForBitmap())); java.nio.ByteBuffer b = bufferForBitmap(); return b == null ? null : b.array(); } public java.nio.ByteBuffer bufferForBitmap() { if (getSetField() == _Fields.BITMAP) { return org.apache.thrift.TBaseHelper.copyBinary((java.nio.ByteBuffer)getFieldValue()); } else { throw new java.lang.RuntimeException("Cannot get field 'bitmap' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void setBitmap(byte[] value) { setBitmap (java.nio.ByteBuffer.wrap(value.clone())); } public void setBitmap(java.nio.ByteBuffer value) { setField_ = _Fields.BITMAP; value_ = java.util.Objects.requireNonNull(value,"_Fields.BITMAP"); } public java.util.Set<java.lang.Long> getSparse_set() { if (getSetField() == _Fields.SPARSE_SET) { return (java.util.Set<java.lang.Long>)getFieldValue(); } else { throw new java.lang.RuntimeException("Cannot get field 'sparse_set' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void setSparse_set(java.util.Set<java.lang.Long> value) { setField_ = _Fields.SPARSE_SET; value_ = java.util.Objects.requireNonNull(value,"_Fields.SPARSE_SET"); } public boolean isSetBitmap() { return setField_ == _Fields.BITMAP; } public boolean isSetSparse_set() { return setField_ == _Fields.SPARSE_SET; } public boolean equals(java.lang.Object other) { if (other instanceof TCountDistinctSetStorage) { return equals((TCountDistinctSetStorage)other); } else { return false; } } public boolean equals(TCountDistinctSetStorage other) { return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); } @Override public int compareTo(TCountDistinctSetStorage other) { int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); if (lastComparison == 0) { return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); } return lastComparison; } @Override public int hashCode() { java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>(); list.add(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { list.add(setField.getThriftFieldId()); java.lang.Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { list.add(value); } } return list.hashCode(); } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TCreateParams.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TCreateParams implements org.apache.thrift.TBase<TCreateParams, TCreateParams._Fields>, java.io.Serializable, Cloneable, Comparable<TCreateParams> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCreateParams"); private static final org.apache.thrift.protocol.TField IS_REPLICATED_FIELD_DESC = new org.apache.thrift.protocol.TField("is_replicated", org.apache.thrift.protocol.TType.BOOL, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCreateParamsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCreateParamsTupleSchemeFactory(); public boolean is_replicated; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { IS_REPLICATED((short)1, "is_replicated"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // IS_REPLICATED return IS_REPLICATED; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __IS_REPLICATED_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.IS_REPLICATED, new org.apache.thrift.meta_data.FieldMetaData("is_replicated", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCreateParams.class, metaDataMap); } public TCreateParams() { } public TCreateParams( boolean is_replicated) { this(); this.is_replicated = is_replicated; setIs_replicatedIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public TCreateParams(TCreateParams other) { __isset_bitfield = other.__isset_bitfield; this.is_replicated = other.is_replicated; } public TCreateParams deepCopy() { return new TCreateParams(this); } @Override public void clear() { setIs_replicatedIsSet(false); this.is_replicated = false; } public boolean isIs_replicated() { return this.is_replicated; } public TCreateParams setIs_replicated(boolean is_replicated) { this.is_replicated = is_replicated; setIs_replicatedIsSet(true); return this; } public void unsetIs_replicated() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_REPLICATED_ISSET_ID); } /** Returns true if field is_replicated is set (has been assigned a value) and false otherwise */ public boolean isSetIs_replicated() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_REPLICATED_ISSET_ID); } public void setIs_replicatedIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_REPLICATED_ISSET_ID, value); } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case IS_REPLICATED: if (value == null) { unsetIs_replicated(); } else { setIs_replicated((java.lang.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case IS_REPLICATED: return isIs_replicated(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case IS_REPLICATED: return isSetIs_replicated(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TCreateParams) return this.equals((TCreateParams)that); return false; } public boolean equals(TCreateParams that) { if (that == null) return false; if (this == that) return true; boolean this_present_is_replicated = true; boolean that_present_is_replicated = true; if (this_present_is_replicated || that_present_is_replicated) { if (!(this_present_is_replicated && that_present_is_replicated)) return false; if (this.is_replicated != that.is_replicated) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((is_replicated) ? 131071 : 524287); return hashCode; } @Override public int compareTo(TCreateParams other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetIs_replicated(), other.isSetIs_replicated()); if (lastComparison != 0) { return lastComparison; } if (isSetIs_replicated()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_replicated, other.is_replicated); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TCreateParams("); boolean first = true; sb.append("is_replicated:"); sb.append(this.is_replicated); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TCreateParamsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCreateParamsStandardScheme getScheme() { return new TCreateParamsStandardScheme(); } } private static class TCreateParamsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCreateParams> { public void read(org.apache.thrift.protocol.TProtocol iprot, TCreateParams struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // IS_REPLICATED if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.is_replicated = iprot.readBool(); struct.setIs_replicatedIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TCreateParams struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(IS_REPLICATED_FIELD_DESC); oprot.writeBool(struct.is_replicated); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TCreateParamsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCreateParamsTupleScheme getScheme() { return new TCreateParamsTupleScheme(); } } private static class TCreateParamsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCreateParams> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TCreateParams struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetIs_replicated()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetIs_replicated()) { oprot.writeBool(struct.is_replicated); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TCreateParams struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.is_replicated = iprot.readBool(); struct.setIs_replicatedIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }
0
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift
java-sources/ai/heavy/heavyai-jdbc/6.1.0/ai/heavy/thrift/server/TCustomExpression.java
/** * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ai.heavy.thrift.server; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class TCustomExpression implements org.apache.thrift.TBase<TCustomExpression, TCustomExpression._Fields>, java.io.Serializable, Cloneable, Comparable<TCustomExpression> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCustomExpression"); private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField EXPRESSION_JSON_FIELD_DESC = new org.apache.thrift.protocol.TField("expression_json", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField DATA_SOURCE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("data_source_type", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField DATA_SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("data_source_id", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.protocol.TField IS_DELETED_FIELD_DESC = new org.apache.thrift.protocol.TField("is_deleted", org.apache.thrift.protocol.TType.BOOL, (short)7); private static final org.apache.thrift.protocol.TField DATA_SOURCE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("data_source_name", org.apache.thrift.protocol.TType.STRING, (short)8); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCustomExpressionStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCustomExpressionTupleSchemeFactory(); public int id; // required public @org.apache.thrift.annotation.Nullable java.lang.String name; // required public @org.apache.thrift.annotation.Nullable java.lang.String expression_json; // required /** * * @see TDataSourceType */ public @org.apache.thrift.annotation.Nullable TDataSourceType data_source_type; // required public int data_source_id; // required public boolean is_deleted; // required public @org.apache.thrift.annotation.Nullable java.lang.String data_source_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"), NAME((short)2, "name"), EXPRESSION_JSON((short)4, "expression_json"), /** * * @see TDataSourceType */ DATA_SOURCE_TYPE((short)5, "data_source_type"), DATA_SOURCE_ID((short)6, "data_source_id"), IS_DELETED((short)7, "is_deleted"), DATA_SOURCE_NAME((short)8, "data_source_name"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // ID return ID; case 2: // NAME return NAME; case 4: // EXPRESSION_JSON return EXPRESSION_JSON; case 5: // DATA_SOURCE_TYPE return DATA_SOURCE_TYPE; case 6: // DATA_SOURCE_ID return DATA_SOURCE_ID; case 7: // IS_DELETED return IS_DELETED; case 8: // DATA_SOURCE_NAME return DATA_SOURCE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __ID_ISSET_ID = 0; private static final int __DATA_SOURCE_ID_ISSET_ID = 1; private static final int __IS_DELETED_ISSET_ID = 2; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.EXPRESSION_JSON, new org.apache.thrift.meta_data.FieldMetaData("expression_json", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DATA_SOURCE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("data_source_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDataSourceType.class))); tmpMap.put(_Fields.DATA_SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("data_source_id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.IS_DELETED, new org.apache.thrift.meta_data.FieldMetaData("is_deleted", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.DATA_SOURCE_NAME, new org.apache.thrift.meta_data.FieldMetaData("data_source_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCustomExpression.class, metaDataMap); } public TCustomExpression() { } public TCustomExpression( int id, java.lang.String name, java.lang.String expression_json, TDataSourceType data_source_type, int data_source_id, boolean is_deleted, java.lang.String data_source_name) { this(); this.id = id; setIdIsSet(true); this.name = name; this.expression_json = expression_json; this.data_source_type = data_source_type; this.data_source_id = data_source_id; setData_source_idIsSet(true); this.is_deleted = is_deleted; setIs_deletedIsSet(true); this.data_source_name = data_source_name; } /** * Performs a deep copy on <i>other</i>. */ public TCustomExpression(TCustomExpression other) { __isset_bitfield = other.__isset_bitfield; this.id = other.id; if (other.isSetName()) { this.name = other.name; } if (other.isSetExpression_json()) { this.expression_json = other.expression_json; } if (other.isSetData_source_type()) { this.data_source_type = other.data_source_type; } this.data_source_id = other.data_source_id; this.is_deleted = other.is_deleted; if (other.isSetData_source_name()) { this.data_source_name = other.data_source_name; } } public TCustomExpression deepCopy() { return new TCustomExpression(this); } @Override public void clear() { setIdIsSet(false); this.id = 0; this.name = null; this.expression_json = null; this.data_source_type = null; setData_source_idIsSet(false); this.data_source_id = 0; setIs_deletedIsSet(false); this.is_deleted = false; this.data_source_name = null; } public int getId() { return this.id; } public TCustomExpression setId(int id) { this.id = id; setIdIsSet(true); return this; } public void unsetId() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); } /** Returns true if field id is set (has been assigned a value) and false otherwise */ public boolean isSetId() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); } public void setIdIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getName() { return this.name; } public TCustomExpression setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { this.name = name; return this; } public void unsetName() { this.name = null; } /** Returns true if field name is set (has been assigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } public void setNameIsSet(boolean value) { if (!value) { this.name = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getExpression_json() { return this.expression_json; } public TCustomExpression setExpression_json(@org.apache.thrift.annotation.Nullable java.lang.String expression_json) { this.expression_json = expression_json; return this; } public void unsetExpression_json() { this.expression_json = null; } /** Returns true if field expression_json is set (has been assigned a value) and false otherwise */ public boolean isSetExpression_json() { return this.expression_json != null; } public void setExpression_jsonIsSet(boolean value) { if (!value) { this.expression_json = null; } } /** * * @see TDataSourceType */ @org.apache.thrift.annotation.Nullable public TDataSourceType getData_source_type() { return this.data_source_type; } /** * * @see TDataSourceType */ public TCustomExpression setData_source_type(@org.apache.thrift.annotation.Nullable TDataSourceType data_source_type) { this.data_source_type = data_source_type; return this; } public void unsetData_source_type() { this.data_source_type = null; } /** Returns true if field data_source_type is set (has been assigned a value) and false otherwise */ public boolean isSetData_source_type() { return this.data_source_type != null; } public void setData_source_typeIsSet(boolean value) { if (!value) { this.data_source_type = null; } } public int getData_source_id() { return this.data_source_id; } public TCustomExpression setData_source_id(int data_source_id) { this.data_source_id = data_source_id; setData_source_idIsSet(true); return this; } public void unsetData_source_id() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATA_SOURCE_ID_ISSET_ID); } /** Returns true if field data_source_id is set (has been assigned a value) and false otherwise */ public boolean isSetData_source_id() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATA_SOURCE_ID_ISSET_ID); } public void setData_source_idIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATA_SOURCE_ID_ISSET_ID, value); } public boolean isIs_deleted() { return this.is_deleted; } public TCustomExpression setIs_deleted(boolean is_deleted) { this.is_deleted = is_deleted; setIs_deletedIsSet(true); return this; } public void unsetIs_deleted() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_DELETED_ISSET_ID); } /** Returns true if field is_deleted is set (has been assigned a value) and false otherwise */ public boolean isSetIs_deleted() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_DELETED_ISSET_ID); } public void setIs_deletedIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_DELETED_ISSET_ID, value); } @org.apache.thrift.annotation.Nullable public java.lang.String getData_source_name() { return this.data_source_name; } public TCustomExpression setData_source_name(@org.apache.thrift.annotation.Nullable java.lang.String data_source_name) { this.data_source_name = data_source_name; return this; } public void unsetData_source_name() { this.data_source_name = null; } /** Returns true if field data_source_name is set (has been assigned a value) and false otherwise */ public boolean isSetData_source_name() { return this.data_source_name != null; } public void setData_source_nameIsSet(boolean value) { if (!value) { this.data_source_name = null; } } public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case ID: if (value == null) { unsetId(); } else { setId((java.lang.Integer)value); } break; case NAME: if (value == null) { unsetName(); } else { setName((java.lang.String)value); } break; case EXPRESSION_JSON: if (value == null) { unsetExpression_json(); } else { setExpression_json((java.lang.String)value); } break; case DATA_SOURCE_TYPE: if (value == null) { unsetData_source_type(); } else { setData_source_type((TDataSourceType)value); } break; case DATA_SOURCE_ID: if (value == null) { unsetData_source_id(); } else { setData_source_id((java.lang.Integer)value); } break; case IS_DELETED: if (value == null) { unsetIs_deleted(); } else { setIs_deleted((java.lang.Boolean)value); } break; case DATA_SOURCE_NAME: if (value == null) { unsetData_source_name(); } else { setData_source_name((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ID: return getId(); case NAME: return getName(); case EXPRESSION_JSON: return getExpression_json(); case DATA_SOURCE_TYPE: return getData_source_type(); case DATA_SOURCE_ID: return getData_source_id(); case IS_DELETED: return isIs_deleted(); case DATA_SOURCE_NAME: return getData_source_name(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case ID: return isSetId(); case NAME: return isSetName(); case EXPRESSION_JSON: return isSetExpression_json(); case DATA_SOURCE_TYPE: return isSetData_source_type(); case DATA_SOURCE_ID: return isSetData_source_id(); case IS_DELETED: return isSetIs_deleted(); case DATA_SOURCE_NAME: return isSetData_source_name(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TCustomExpression) return this.equals((TCustomExpression)that); return false; } public boolean equals(TCustomExpression that) { if (that == null) return false; if (this == that) return true; boolean this_present_id = true; boolean that_present_id = true; if (this_present_id || that_present_id) { if (!(this_present_id && that_present_id)) return false; if (this.id != that.id) return false; } boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_expression_json = true && this.isSetExpression_json(); boolean that_present_expression_json = true && that.isSetExpression_json(); if (this_present_expression_json || that_present_expression_json) { if (!(this_present_expression_json && that_present_expression_json)) return false; if (!this.expression_json.equals(that.expression_json)) return false; } boolean this_present_data_source_type = true && this.isSetData_source_type(); boolean that_present_data_source_type = true && that.isSetData_source_type(); if (this_present_data_source_type || that_present_data_source_type) { if (!(this_present_data_source_type && that_present_data_source_type)) return false; if (!this.data_source_type.equals(that.data_source_type)) return false; } boolean this_present_data_source_id = true; boolean that_present_data_source_id = true; if (this_present_data_source_id || that_present_data_source_id) { if (!(this_present_data_source_id && that_present_data_source_id)) return false; if (this.data_source_id != that.data_source_id) return false; } boolean this_present_is_deleted = true; boolean that_present_is_deleted = true; if (this_present_is_deleted || that_present_is_deleted) { if (!(this_present_is_deleted && that_present_is_deleted)) return false; if (this.is_deleted != that.is_deleted) return false; } boolean this_present_data_source_name = true && this.isSetData_source_name(); boolean that_present_data_source_name = true && that.isSetData_source_name(); if (this_present_data_source_name || that_present_data_source_name) { if (!(this_present_data_source_name && that_present_data_source_name)) return false; if (!this.data_source_name.equals(that.data_source_name)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + id; hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); if (isSetName()) hashCode = hashCode * 8191 + name.hashCode(); hashCode = hashCode * 8191 + ((isSetExpression_json()) ? 131071 : 524287); if (isSetExpression_json()) hashCode = hashCode * 8191 + expression_json.hashCode(); hashCode = hashCode * 8191 + ((isSetData_source_type()) ? 131071 : 524287); if (isSetData_source_type()) hashCode = hashCode * 8191 + data_source_type.getValue(); hashCode = hashCode * 8191 + data_source_id; hashCode = hashCode * 8191 + ((is_deleted) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetData_source_name()) ? 131071 : 524287); if (isSetData_source_name()) hashCode = hashCode * 8191 + data_source_name.hashCode(); return hashCode; } @Override public int compareTo(TCustomExpression other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetId(), other.isSetId()); if (lastComparison != 0) { return lastComparison; } if (isSetId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetExpression_json(), other.isSetExpression_json()); if (lastComparison != 0) { return lastComparison; } if (isSetExpression_json()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expression_json, other.expression_json); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetData_source_type(), other.isSetData_source_type()); if (lastComparison != 0) { return lastComparison; } if (isSetData_source_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data_source_type, other.data_source_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetData_source_id(), other.isSetData_source_id()); if (lastComparison != 0) { return lastComparison; } if (isSetData_source_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data_source_id, other.data_source_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetIs_deleted(), other.isSetIs_deleted()); if (lastComparison != 0) { return lastComparison; } if (isSetIs_deleted()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_deleted, other.is_deleted); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetData_source_name(), other.isSetData_source_name()); if (lastComparison != 0) { return lastComparison; } if (isSetData_source_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data_source_name, other.data_source_name); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TCustomExpression("); boolean first = true; sb.append("id:"); sb.append(this.id); first = false; if (!first) sb.append(", "); sb.append("name:"); if (this.name == null) { sb.append("null"); } else { sb.append(this.name); } first = false; if (!first) sb.append(", "); sb.append("expression_json:"); if (this.expression_json == null) { sb.append("null"); } else { sb.append(this.expression_json); } first = false; if (!first) sb.append(", "); sb.append("data_source_type:"); if (this.data_source_type == null) { sb.append("null"); } else { sb.append(this.data_source_type); } first = false; if (!first) sb.append(", "); sb.append("data_source_id:"); sb.append(this.data_source_id); first = false; if (!first) sb.append(", "); sb.append("is_deleted:"); sb.append(this.is_deleted); first = false; if (!first) sb.append(", "); sb.append("data_source_name:"); if (this.data_source_name == null) { sb.append("null"); } else { sb.append(this.data_source_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TCustomExpressionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCustomExpressionStandardScheme getScheme() { return new TCustomExpressionStandardScheme(); } } private static class TCustomExpressionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCustomExpression> { public void read(org.apache.thrift.protocol.TProtocol iprot, TCustomExpression struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.id = iprot.readI32(); struct.setIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // EXPRESSION_JSON if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.expression_json = iprot.readString(); struct.setExpression_jsonIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // DATA_SOURCE_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.data_source_type = ai.heavy.thrift.server.TDataSourceType.findByValue(iprot.readI32()); struct.setData_source_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // DATA_SOURCE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.data_source_id = iprot.readI32(); struct.setData_source_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // IS_DELETED if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.is_deleted = iprot.readBool(); struct.setIs_deletedIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // DATA_SOURCE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.data_source_name = iprot.readString(); struct.setData_source_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TCustomExpression struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI32(struct.id); oprot.writeFieldEnd(); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } if (struct.expression_json != null) { oprot.writeFieldBegin(EXPRESSION_JSON_FIELD_DESC); oprot.writeString(struct.expression_json); oprot.writeFieldEnd(); } if (struct.data_source_type != null) { oprot.writeFieldBegin(DATA_SOURCE_TYPE_FIELD_DESC); oprot.writeI32(struct.data_source_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DATA_SOURCE_ID_FIELD_DESC); oprot.writeI32(struct.data_source_id); oprot.writeFieldEnd(); oprot.writeFieldBegin(IS_DELETED_FIELD_DESC); oprot.writeBool(struct.is_deleted); oprot.writeFieldEnd(); if (struct.data_source_name != null) { oprot.writeFieldBegin(DATA_SOURCE_NAME_FIELD_DESC); oprot.writeString(struct.data_source_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TCustomExpressionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public TCustomExpressionTupleScheme getScheme() { return new TCustomExpressionTupleScheme(); } } private static class TCustomExpressionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCustomExpression> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TCustomExpression struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetId()) { optionals.set(0); } if (struct.isSetName()) { optionals.set(1); } if (struct.isSetExpression_json()) { optionals.set(2); } if (struct.isSetData_source_type()) { optionals.set(3); } if (struct.isSetData_source_id()) { optionals.set(4); } if (struct.isSetIs_deleted()) { optionals.set(5); } if (struct.isSetData_source_name()) { optionals.set(6); } oprot.writeBitSet(optionals, 7); if (struct.isSetId()) { oprot.writeI32(struct.id); } if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetExpression_json()) { oprot.writeString(struct.expression_json); } if (struct.isSetData_source_type()) { oprot.writeI32(struct.data_source_type.getValue()); } if (struct.isSetData_source_id()) { oprot.writeI32(struct.data_source_id); } if (struct.isSetIs_deleted()) { oprot.writeBool(struct.is_deleted); } if (struct.isSetData_source_name()) { oprot.writeString(struct.data_source_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TCustomExpression struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.id = iprot.readI32(); struct.setIdIsSet(true); } if (incoming.get(1)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } if (incoming.get(2)) { struct.expression_json = iprot.readString(); struct.setExpression_jsonIsSet(true); } if (incoming.get(3)) { struct.data_source_type = ai.heavy.thrift.server.TDataSourceType.findByValue(iprot.readI32()); struct.setData_source_typeIsSet(true); } if (incoming.get(4)) { struct.data_source_id = iprot.readI32(); struct.setData_source_idIsSet(true); } if (incoming.get(5)) { struct.is_deleted = iprot.readBool(); struct.setIs_deletedIsSet(true); } if (incoming.get(6)) { struct.data_source_name = iprot.readString(); struct.setData_source_nameIsSet(true); } } } private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } }