You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ga...@apache.org on 2017/08/03 16:56:55 UTC
[34/51] [partial] hive git commit: HIVE-17170 Move thrift generated
code to stand alone metastore (Alan Gates reviewed by Vihang Karajgaonkar)
http://git-wip-us.apache.org/repos/asf/hive/blob/453c8ed4/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequestData.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequestData.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequestData.java
deleted file mode 100644
index db8dc8b..0000000
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequestData.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hadoop.hive.metastore.api;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-public class FireEventRequestData extends org.apache.thrift.TUnion<FireEventRequestData, FireEventRequestData._Fields> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FireEventRequestData");
- private static final org.apache.thrift.protocol.TField INSERT_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("insertData", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- INSERT_DATA((short)1, "insertData");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.INSERT_DATA, new org.apache.thrift.meta_data.FieldMetaData("insertData", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InsertEventRequestData.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FireEventRequestData.class, metaDataMap);
- }
-
- public FireEventRequestData() {
- super();
- }
-
- public FireEventRequestData(_Fields setField, Object value) {
- super(setField, value);
- }
-
- public FireEventRequestData(FireEventRequestData other) {
- super(other);
- }
- public FireEventRequestData deepCopy() {
- return new FireEventRequestData(this);
- }
-
- public static FireEventRequestData insertData(InsertEventRequestData value) {
- FireEventRequestData x = new FireEventRequestData();
- x.setInsertData(value);
- return x;
- }
-
-
- @Override
- protected void checkType(_Fields setField, Object value) throws ClassCastException {
- switch (setField) {
- case INSERT_DATA:
- if (value instanceof InsertEventRequestData) {
- break;
- }
- throw new ClassCastException("Was expecting value of type InsertEventRequestData for field 'insertData', but got " + value.getClass().getSimpleName());
- default:
- throw new IllegalArgumentException("Unknown field id " + setField);
- }
- }
-
- @Override
- protected 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 INSERT_DATA:
- if (field.type == INSERT_DATA_FIELD_DESC.type) {
- InsertEventRequestData insertData;
- insertData = new InsertEventRequestData();
- insertData.read(iprot);
- return insertData;
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- return null;
- }
- default:
- throw new 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 INSERT_DATA:
- InsertEventRequestData insertData = (InsertEventRequestData)value_;
- insertData.write(oprot);
- return;
- default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
- }
- }
-
- @Override
- protected 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 INSERT_DATA:
- InsertEventRequestData insertData;
- insertData = new InsertEventRequestData();
- insertData.read(iprot);
- return insertData;
- default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
- }
- } else {
- throw new 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 INSERT_DATA:
- InsertEventRequestData insertData = (InsertEventRequestData)value_;
- insertData.write(oprot);
- return;
- default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
- }
- }
-
- @Override
- protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) {
- switch (setField) {
- case INSERT_DATA:
- return INSERT_DATA_FIELD_DESC;
- default:
- throw new 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);
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
-
- public InsertEventRequestData getInsertData() {
- if (getSetField() == _Fields.INSERT_DATA) {
- return (InsertEventRequestData)getFieldValue();
- } else {
- throw new RuntimeException("Cannot get field 'insertData' because union is currently set to " + getFieldDesc(getSetField()).name);
- }
- }
-
- public void setInsertData(InsertEventRequestData value) {
- if (value == null) throw new NullPointerException();
- setField_ = _Fields.INSERT_DATA;
- value_ = value;
- }
-
- public boolean isSetInsertData() {
- return setField_ == _Fields.INSERT_DATA;
- }
-
-
- public boolean equals(Object other) {
- if (other instanceof FireEventRequestData) {
- return equals((FireEventRequestData)other);
- } else {
- return false;
- }
- }
-
- public boolean equals(FireEventRequestData other) {
- return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
- }
-
- @Override
- public int compareTo(FireEventRequestData 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() {
- List<Object> list = new ArrayList<Object>();
- list.add(this.getClass().getName());
- org.apache.thrift.TFieldIdEnum setField = getSetField();
- if (setField != null) {
- list.add(setField.getThriftFieldId());
- 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, 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);
- }
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/453c8ed4/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventResponse.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventResponse.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventResponse.java
deleted file mode 100644
index 9a86ed5..0000000
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventResponse.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hadoop.hive.metastore.api;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class FireEventResponse implements org.apache.thrift.TBase<FireEventResponse, FireEventResponse._Fields>, java.io.Serializable, Cloneable, Comparable<FireEventResponse> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FireEventResponse");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new FireEventResponseStandardSchemeFactory());
- schemes.put(TupleScheme.class, new FireEventResponseTupleSchemeFactory());
- }
-
-
- /** 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 Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FireEventResponse.class, metaDataMap);
- }
-
- public FireEventResponse() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public FireEventResponse(FireEventResponse other) {
- }
-
- public FireEventResponse deepCopy() {
- return new FireEventResponse(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- throw new 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 IllegalArgumentException();
- }
-
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof FireEventResponse)
- return this.equals((FireEventResponse)that);
- return false;
- }
-
- public boolean equals(FireEventResponse that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(FireEventResponse other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("FireEventResponse(");
- 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, 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 FireEventResponseStandardSchemeFactory implements SchemeFactory {
- public FireEventResponseStandardScheme getScheme() {
- return new FireEventResponseStandardScheme();
- }
- }
-
- private static class FireEventResponseStandardScheme extends StandardScheme<FireEventResponse> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, FireEventResponse 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();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, FireEventResponse struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class FireEventResponseTupleSchemeFactory implements SchemeFactory {
- public FireEventResponseTupleScheme getScheme() {
- return new FireEventResponseTupleScheme();
- }
- }
-
- private static class FireEventResponseTupleScheme extends TupleScheme<FireEventResponse> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, FireEventResponse struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, FireEventResponse struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/hive/blob/453c8ed4/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java
deleted file mode 100644
index d6b1cff..0000000
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java
+++ /dev/null
@@ -1,707 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hadoop.hive.metastore.api;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class ForeignKeysRequest implements org.apache.thrift.TBase<ForeignKeysRequest, ForeignKeysRequest._Fields>, java.io.Serializable, Cloneable, Comparable<ForeignKeysRequest> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ForeignKeysRequest");
-
- private static final org.apache.thrift.protocol.TField PARENT_DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_db_name", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField PARENT_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField FOREIGN_DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreign_db_name", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField FOREIGN_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreign_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)4);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ForeignKeysRequestStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ForeignKeysRequestTupleSchemeFactory());
- }
-
- private String parent_db_name; // required
- private String parent_tbl_name; // required
- private String foreign_db_name; // required
- private String foreign_tbl_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 {
- PARENT_DB_NAME((short)1, "parent_db_name"),
- PARENT_TBL_NAME((short)2, "parent_tbl_name"),
- FOREIGN_DB_NAME((short)3, "foreign_db_name"),
- FOREIGN_TBL_NAME((short)4, "foreign_tbl_name");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // PARENT_DB_NAME
- return PARENT_DB_NAME;
- case 2: // PARENT_TBL_NAME
- return PARENT_TBL_NAME;
- case 3: // FOREIGN_DB_NAME
- return FOREIGN_DB_NAME;
- case 4: // FOREIGN_TBL_NAME
- return FOREIGN_TBL_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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.PARENT_DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_db_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PARENT_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.FOREIGN_DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreign_db_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.FOREIGN_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreign_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ForeignKeysRequest.class, metaDataMap);
- }
-
- public ForeignKeysRequest() {
- }
-
- public ForeignKeysRequest(
- String parent_db_name,
- String parent_tbl_name,
- String foreign_db_name,
- String foreign_tbl_name)
- {
- this();
- this.parent_db_name = parent_db_name;
- this.parent_tbl_name = parent_tbl_name;
- this.foreign_db_name = foreign_db_name;
- this.foreign_tbl_name = foreign_tbl_name;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ForeignKeysRequest(ForeignKeysRequest other) {
- if (other.isSetParent_db_name()) {
- this.parent_db_name = other.parent_db_name;
- }
- if (other.isSetParent_tbl_name()) {
- this.parent_tbl_name = other.parent_tbl_name;
- }
- if (other.isSetForeign_db_name()) {
- this.foreign_db_name = other.foreign_db_name;
- }
- if (other.isSetForeign_tbl_name()) {
- this.foreign_tbl_name = other.foreign_tbl_name;
- }
- }
-
- public ForeignKeysRequest deepCopy() {
- return new ForeignKeysRequest(this);
- }
-
- @Override
- public void clear() {
- this.parent_db_name = null;
- this.parent_tbl_name = null;
- this.foreign_db_name = null;
- this.foreign_tbl_name = null;
- }
-
- public String getParent_db_name() {
- return this.parent_db_name;
- }
-
- public void setParent_db_name(String parent_db_name) {
- this.parent_db_name = parent_db_name;
- }
-
- public void unsetParent_db_name() {
- this.parent_db_name = null;
- }
-
- /** Returns true if field parent_db_name is set (has been assigned a value) and false otherwise */
- public boolean isSetParent_db_name() {
- return this.parent_db_name != null;
- }
-
- public void setParent_db_nameIsSet(boolean value) {
- if (!value) {
- this.parent_db_name = null;
- }
- }
-
- public String getParent_tbl_name() {
- return this.parent_tbl_name;
- }
-
- public void setParent_tbl_name(String parent_tbl_name) {
- this.parent_tbl_name = parent_tbl_name;
- }
-
- public void unsetParent_tbl_name() {
- this.parent_tbl_name = null;
- }
-
- /** Returns true if field parent_tbl_name is set (has been assigned a value) and false otherwise */
- public boolean isSetParent_tbl_name() {
- return this.parent_tbl_name != null;
- }
-
- public void setParent_tbl_nameIsSet(boolean value) {
- if (!value) {
- this.parent_tbl_name = null;
- }
- }
-
- public String getForeign_db_name() {
- return this.foreign_db_name;
- }
-
- public void setForeign_db_name(String foreign_db_name) {
- this.foreign_db_name = foreign_db_name;
- }
-
- public void unsetForeign_db_name() {
- this.foreign_db_name = null;
- }
-
- /** Returns true if field foreign_db_name is set (has been assigned a value) and false otherwise */
- public boolean isSetForeign_db_name() {
- return this.foreign_db_name != null;
- }
-
- public void setForeign_db_nameIsSet(boolean value) {
- if (!value) {
- this.foreign_db_name = null;
- }
- }
-
- public String getForeign_tbl_name() {
- return this.foreign_tbl_name;
- }
-
- public void setForeign_tbl_name(String foreign_tbl_name) {
- this.foreign_tbl_name = foreign_tbl_name;
- }
-
- public void unsetForeign_tbl_name() {
- this.foreign_tbl_name = null;
- }
-
- /** Returns true if field foreign_tbl_name is set (has been assigned a value) and false otherwise */
- public boolean isSetForeign_tbl_name() {
- return this.foreign_tbl_name != null;
- }
-
- public void setForeign_tbl_nameIsSet(boolean value) {
- if (!value) {
- this.foreign_tbl_name = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case PARENT_DB_NAME:
- if (value == null) {
- unsetParent_db_name();
- } else {
- setParent_db_name((String)value);
- }
- break;
-
- case PARENT_TBL_NAME:
- if (value == null) {
- unsetParent_tbl_name();
- } else {
- setParent_tbl_name((String)value);
- }
- break;
-
- case FOREIGN_DB_NAME:
- if (value == null) {
- unsetForeign_db_name();
- } else {
- setForeign_db_name((String)value);
- }
- break;
-
- case FOREIGN_TBL_NAME:
- if (value == null) {
- unsetForeign_tbl_name();
- } else {
- setForeign_tbl_name((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case PARENT_DB_NAME:
- return getParent_db_name();
-
- case PARENT_TBL_NAME:
- return getParent_tbl_name();
-
- case FOREIGN_DB_NAME:
- return getForeign_db_name();
-
- case FOREIGN_TBL_NAME:
- return getForeign_tbl_name();
-
- }
- throw new 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 IllegalArgumentException();
- }
-
- switch (field) {
- case PARENT_DB_NAME:
- return isSetParent_db_name();
- case PARENT_TBL_NAME:
- return isSetParent_tbl_name();
- case FOREIGN_DB_NAME:
- return isSetForeign_db_name();
- case FOREIGN_TBL_NAME:
- return isSetForeign_tbl_name();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ForeignKeysRequest)
- return this.equals((ForeignKeysRequest)that);
- return false;
- }
-
- public boolean equals(ForeignKeysRequest that) {
- if (that == null)
- return false;
-
- boolean this_present_parent_db_name = true && this.isSetParent_db_name();
- boolean that_present_parent_db_name = true && that.isSetParent_db_name();
- if (this_present_parent_db_name || that_present_parent_db_name) {
- if (!(this_present_parent_db_name && that_present_parent_db_name))
- return false;
- if (!this.parent_db_name.equals(that.parent_db_name))
- return false;
- }
-
- boolean this_present_parent_tbl_name = true && this.isSetParent_tbl_name();
- boolean that_present_parent_tbl_name = true && that.isSetParent_tbl_name();
- if (this_present_parent_tbl_name || that_present_parent_tbl_name) {
- if (!(this_present_parent_tbl_name && that_present_parent_tbl_name))
- return false;
- if (!this.parent_tbl_name.equals(that.parent_tbl_name))
- return false;
- }
-
- boolean this_present_foreign_db_name = true && this.isSetForeign_db_name();
- boolean that_present_foreign_db_name = true && that.isSetForeign_db_name();
- if (this_present_foreign_db_name || that_present_foreign_db_name) {
- if (!(this_present_foreign_db_name && that_present_foreign_db_name))
- return false;
- if (!this.foreign_db_name.equals(that.foreign_db_name))
- return false;
- }
-
- boolean this_present_foreign_tbl_name = true && this.isSetForeign_tbl_name();
- boolean that_present_foreign_tbl_name = true && that.isSetForeign_tbl_name();
- if (this_present_foreign_tbl_name || that_present_foreign_tbl_name) {
- if (!(this_present_foreign_tbl_name && that_present_foreign_tbl_name))
- return false;
- if (!this.foreign_tbl_name.equals(that.foreign_tbl_name))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_parent_db_name = true && (isSetParent_db_name());
- list.add(present_parent_db_name);
- if (present_parent_db_name)
- list.add(parent_db_name);
-
- boolean present_parent_tbl_name = true && (isSetParent_tbl_name());
- list.add(present_parent_tbl_name);
- if (present_parent_tbl_name)
- list.add(parent_tbl_name);
-
- boolean present_foreign_db_name = true && (isSetForeign_db_name());
- list.add(present_foreign_db_name);
- if (present_foreign_db_name)
- list.add(foreign_db_name);
-
- boolean present_foreign_tbl_name = true && (isSetForeign_tbl_name());
- list.add(present_foreign_tbl_name);
- if (present_foreign_tbl_name)
- list.add(foreign_tbl_name);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(ForeignKeysRequest other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetParent_db_name()).compareTo(other.isSetParent_db_name());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetParent_db_name()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_db_name, other.parent_db_name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetParent_tbl_name()).compareTo(other.isSetParent_tbl_name());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetParent_tbl_name()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_tbl_name, other.parent_tbl_name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetForeign_db_name()).compareTo(other.isSetForeign_db_name());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetForeign_db_name()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreign_db_name, other.foreign_db_name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetForeign_tbl_name()).compareTo(other.isSetForeign_tbl_name());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetForeign_tbl_name()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreign_tbl_name, other.foreign_tbl_name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ForeignKeysRequest(");
- boolean first = true;
-
- sb.append("parent_db_name:");
- if (this.parent_db_name == null) {
- sb.append("null");
- } else {
- sb.append(this.parent_db_name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("parent_tbl_name:");
- if (this.parent_tbl_name == null) {
- sb.append("null");
- } else {
- sb.append(this.parent_tbl_name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("foreign_db_name:");
- if (this.foreign_db_name == null) {
- sb.append("null");
- } else {
- sb.append(this.foreign_db_name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("foreign_tbl_name:");
- if (this.foreign_tbl_name == null) {
- sb.append("null");
- } else {
- sb.append(this.foreign_tbl_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, 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 ForeignKeysRequestStandardSchemeFactory implements SchemeFactory {
- public ForeignKeysRequestStandardScheme getScheme() {
- return new ForeignKeysRequestStandardScheme();
- }
- }
-
- private static class ForeignKeysRequestStandardScheme extends StandardScheme<ForeignKeysRequest> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ForeignKeysRequest 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_DB_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.parent_db_name = iprot.readString();
- struct.setParent_db_nameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // PARENT_TBL_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.parent_tbl_name = iprot.readString();
- struct.setParent_tbl_nameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // FOREIGN_DB_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.foreign_db_name = iprot.readString();
- struct.setForeign_db_nameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // FOREIGN_TBL_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.foreign_tbl_name = iprot.readString();
- struct.setForeign_tbl_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();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ForeignKeysRequest struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.parent_db_name != null) {
- oprot.writeFieldBegin(PARENT_DB_NAME_FIELD_DESC);
- oprot.writeString(struct.parent_db_name);
- oprot.writeFieldEnd();
- }
- if (struct.parent_tbl_name != null) {
- oprot.writeFieldBegin(PARENT_TBL_NAME_FIELD_DESC);
- oprot.writeString(struct.parent_tbl_name);
- oprot.writeFieldEnd();
- }
- if (struct.foreign_db_name != null) {
- oprot.writeFieldBegin(FOREIGN_DB_NAME_FIELD_DESC);
- oprot.writeString(struct.foreign_db_name);
- oprot.writeFieldEnd();
- }
- if (struct.foreign_tbl_name != null) {
- oprot.writeFieldBegin(FOREIGN_TBL_NAME_FIELD_DESC);
- oprot.writeString(struct.foreign_tbl_name);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ForeignKeysRequestTupleSchemeFactory implements SchemeFactory {
- public ForeignKeysRequestTupleScheme getScheme() {
- return new ForeignKeysRequestTupleScheme();
- }
- }
-
- private static class ForeignKeysRequestTupleScheme extends TupleScheme<ForeignKeysRequest> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ForeignKeysRequest struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetParent_db_name()) {
- optionals.set(0);
- }
- if (struct.isSetParent_tbl_name()) {
- optionals.set(1);
- }
- if (struct.isSetForeign_db_name()) {
- optionals.set(2);
- }
- if (struct.isSetForeign_tbl_name()) {
- optionals.set(3);
- }
- oprot.writeBitSet(optionals, 4);
- if (struct.isSetParent_db_name()) {
- oprot.writeString(struct.parent_db_name);
- }
- if (struct.isSetParent_tbl_name()) {
- oprot.writeString(struct.parent_tbl_name);
- }
- if (struct.isSetForeign_db_name()) {
- oprot.writeString(struct.foreign_db_name);
- }
- if (struct.isSetForeign_tbl_name()) {
- oprot.writeString(struct.foreign_tbl_name);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysRequest struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
- if (incoming.get(0)) {
- struct.parent_db_name = iprot.readString();
- struct.setParent_db_nameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.parent_tbl_name = iprot.readString();
- struct.setParent_tbl_nameIsSet(true);
- }
- if (incoming.get(2)) {
- struct.foreign_db_name = iprot.readString();
- struct.setForeign_db_nameIsSet(true);
- }
- if (incoming.get(3)) {
- struct.foreign_tbl_name = iprot.readString();
- struct.setForeign_tbl_nameIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/hive/blob/453c8ed4/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
deleted file mode 100644
index 7135a65..0000000
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hadoop.hive.metastore.api;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class ForeignKeysResponse implements org.apache.thrift.TBase<ForeignKeysResponse, ForeignKeysResponse._Fields>, java.io.Serializable, Cloneable, Comparable<ForeignKeysResponse> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ForeignKeysResponse");
-
- private static final org.apache.thrift.protocol.TField FOREIGN_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeys", org.apache.thrift.protocol.TType.LIST, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ForeignKeysResponseStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ForeignKeysResponseTupleSchemeFactory());
- }
-
- private List<SQLForeignKey> foreignKeys; // 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 {
- FOREIGN_KEYS((short)1, "foreignKeys");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // FOREIGN_KEYS
- return FOREIGN_KEYS;
- 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.FOREIGN_KEYS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeys", org.apache.thrift.TFieldRequirementType.REQUIRED,
- 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, SQLForeignKey.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ForeignKeysResponse.class, metaDataMap);
- }
-
- public ForeignKeysResponse() {
- }
-
- public ForeignKeysResponse(
- List<SQLForeignKey> foreignKeys)
- {
- this();
- this.foreignKeys = foreignKeys;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ForeignKeysResponse(ForeignKeysResponse other) {
- if (other.isSetForeignKeys()) {
- List<SQLForeignKey> __this__foreignKeys = new ArrayList<SQLForeignKey>(other.foreignKeys.size());
- for (SQLForeignKey other_element : other.foreignKeys) {
- __this__foreignKeys.add(new SQLForeignKey(other_element));
- }
- this.foreignKeys = __this__foreignKeys;
- }
- }
-
- public ForeignKeysResponse deepCopy() {
- return new ForeignKeysResponse(this);
- }
-
- @Override
- public void clear() {
- this.foreignKeys = null;
- }
-
- public int getForeignKeysSize() {
- return (this.foreignKeys == null) ? 0 : this.foreignKeys.size();
- }
-
- public java.util.Iterator<SQLForeignKey> getForeignKeysIterator() {
- return (this.foreignKeys == null) ? null : this.foreignKeys.iterator();
- }
-
- public void addToForeignKeys(SQLForeignKey elem) {
- if (this.foreignKeys == null) {
- this.foreignKeys = new ArrayList<SQLForeignKey>();
- }
- this.foreignKeys.add(elem);
- }
-
- public List<SQLForeignKey> getForeignKeys() {
- return this.foreignKeys;
- }
-
- public void setForeignKeys(List<SQLForeignKey> foreignKeys) {
- this.foreignKeys = foreignKeys;
- }
-
- public void unsetForeignKeys() {
- this.foreignKeys = null;
- }
-
- /** Returns true if field foreignKeys is set (has been assigned a value) and false otherwise */
- public boolean isSetForeignKeys() {
- return this.foreignKeys != null;
- }
-
- public void setForeignKeysIsSet(boolean value) {
- if (!value) {
- this.foreignKeys = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case FOREIGN_KEYS:
- if (value == null) {
- unsetForeignKeys();
- } else {
- setForeignKeys((List<SQLForeignKey>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case FOREIGN_KEYS:
- return getForeignKeys();
-
- }
- throw new 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 IllegalArgumentException();
- }
-
- switch (field) {
- case FOREIGN_KEYS:
- return isSetForeignKeys();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ForeignKeysResponse)
- return this.equals((ForeignKeysResponse)that);
- return false;
- }
-
- public boolean equals(ForeignKeysResponse that) {
- if (that == null)
- return false;
-
- boolean this_present_foreignKeys = true && this.isSetForeignKeys();
- boolean that_present_foreignKeys = true && that.isSetForeignKeys();
- if (this_present_foreignKeys || that_present_foreignKeys) {
- if (!(this_present_foreignKeys && that_present_foreignKeys))
- return false;
- if (!this.foreignKeys.equals(that.foreignKeys))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_foreignKeys = true && (isSetForeignKeys());
- list.add(present_foreignKeys);
- if (present_foreignKeys)
- list.add(foreignKeys);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(ForeignKeysResponse other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetForeignKeys()).compareTo(other.isSetForeignKeys());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetForeignKeys()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeys, other.foreignKeys);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ForeignKeysResponse(");
- boolean first = true;
-
- sb.append("foreignKeys:");
- if (this.foreignKeys == null) {
- sb.append("null");
- } else {
- sb.append(this.foreignKeys);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetForeignKeys()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'foreignKeys' is unset! Struct:" + toString());
- }
-
- // 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, 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 ForeignKeysResponseStandardSchemeFactory implements SchemeFactory {
- public ForeignKeysResponseStandardScheme getScheme() {
- return new ForeignKeysResponseStandardScheme();
- }
- }
-
- private static class ForeignKeysResponseStandardScheme extends StandardScheme<ForeignKeysResponse> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ForeignKeysResponse 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: // FOREIGN_KEYS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list330 = iprot.readListBegin();
- struct.foreignKeys = new ArrayList<SQLForeignKey>(_list330.size);
- SQLForeignKey _elem331;
- for (int _i332 = 0; _i332 < _list330.size; ++_i332)
- {
- _elem331 = new SQLForeignKey();
- _elem331.read(iprot);
- struct.foreignKeys.add(_elem331);
- }
- iprot.readListEnd();
- }
- struct.setForeignKeysIsSet(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();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ForeignKeysResponse struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.foreignKeys != null) {
- oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size()));
- for (SQLForeignKey _iter333 : struct.foreignKeys)
- {
- _iter333.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ForeignKeysResponseTupleSchemeFactory implements SchemeFactory {
- public ForeignKeysResponseTupleScheme getScheme() {
- return new ForeignKeysResponseTupleScheme();
- }
- }
-
- private static class ForeignKeysResponseTupleScheme extends TupleScheme<ForeignKeysResponse> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- {
- oprot.writeI32(struct.foreignKeys.size());
- for (SQLForeignKey _iter334 : struct.foreignKeys)
- {
- _iter334.write(oprot);
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- {
- org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.foreignKeys = new ArrayList<SQLForeignKey>(_list335.size);
- SQLForeignKey _elem336;
- for (int _i337 = 0; _i337 < _list335.size; ++_i337)
- {
- _elem336 = new SQLForeignKey();
- _elem336.read(iprot);
- struct.foreignKeys.add(_elem336);
- }
- }
- struct.setForeignKeysIsSet(true);
- }
- }
-
-}
-