hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject [21/30] hive git commit: HIVE-13349: Metastore Changes : API calls for retrieving primary keys and foreign keys information (Hari Subramaniyan, reviewed by Ashutosh Chauhan)
Date Wed, 20 Apr 2016 20:05:38 GMT
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java
new file mode 100644
index 0000000..a25234b
--- /dev/null
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java
@@ -0,0 +1,443 @@
+/**
+ * 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 PrimaryKeysResponse implements org.apache.thrift.TBase<PrimaryKeysResponse, PrimaryKeysResponse._Fields>, java.io.Serializable, Cloneable, Comparable<PrimaryKeysResponse> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrimaryKeysResponse");
+
+  private static final org.apache.thrift.protocol.TField PRIMARY_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("primaryKeys", 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 PrimaryKeysResponseStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new PrimaryKeysResponseTupleSchemeFactory());
+  }
+
+  private List<SQLPrimaryKey> primaryKeys; // 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 {
+    PRIMARY_KEYS((short)1, "primaryKeys");
+
+    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: // PRIMARY_KEYS
+          return PRIMARY_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.PRIMARY_KEYS, new org.apache.thrift.meta_data.FieldMetaData("primaryKeys", 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, SQLPrimaryKey.class))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrimaryKeysResponse.class, metaDataMap);
+  }
+
+  public PrimaryKeysResponse() {
+  }
+
+  public PrimaryKeysResponse(
+    List<SQLPrimaryKey> primaryKeys)
+  {
+    this();
+    this.primaryKeys = primaryKeys;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public PrimaryKeysResponse(PrimaryKeysResponse other) {
+    if (other.isSetPrimaryKeys()) {
+      List<SQLPrimaryKey> __this__primaryKeys = new ArrayList<SQLPrimaryKey>(other.primaryKeys.size());
+      for (SQLPrimaryKey other_element : other.primaryKeys) {
+        __this__primaryKeys.add(new SQLPrimaryKey(other_element));
+      }
+      this.primaryKeys = __this__primaryKeys;
+    }
+  }
+
+  public PrimaryKeysResponse deepCopy() {
+    return new PrimaryKeysResponse(this);
+  }
+
+  @Override
+  public void clear() {
+    this.primaryKeys = null;
+  }
+
+  public int getPrimaryKeysSize() {
+    return (this.primaryKeys == null) ? 0 : this.primaryKeys.size();
+  }
+
+  public java.util.Iterator<SQLPrimaryKey> getPrimaryKeysIterator() {
+    return (this.primaryKeys == null) ? null : this.primaryKeys.iterator();
+  }
+
+  public void addToPrimaryKeys(SQLPrimaryKey elem) {
+    if (this.primaryKeys == null) {
+      this.primaryKeys = new ArrayList<SQLPrimaryKey>();
+    }
+    this.primaryKeys.add(elem);
+  }
+
+  public List<SQLPrimaryKey> getPrimaryKeys() {
+    return this.primaryKeys;
+  }
+
+  public void setPrimaryKeys(List<SQLPrimaryKey> primaryKeys) {
+    this.primaryKeys = primaryKeys;
+  }
+
+  public void unsetPrimaryKeys() {
+    this.primaryKeys = null;
+  }
+
+  /** Returns true if field primaryKeys is set (has been assigned a value) and false otherwise */
+  public boolean isSetPrimaryKeys() {
+    return this.primaryKeys != null;
+  }
+
+  public void setPrimaryKeysIsSet(boolean value) {
+    if (!value) {
+      this.primaryKeys = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case PRIMARY_KEYS:
+      if (value == null) {
+        unsetPrimaryKeys();
+      } else {
+        setPrimaryKeys((List<SQLPrimaryKey>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case PRIMARY_KEYS:
+      return getPrimaryKeys();
+
+    }
+    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 PRIMARY_KEYS:
+      return isSetPrimaryKeys();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof PrimaryKeysResponse)
+      return this.equals((PrimaryKeysResponse)that);
+    return false;
+  }
+
+  public boolean equals(PrimaryKeysResponse that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_primaryKeys = true && this.isSetPrimaryKeys();
+    boolean that_present_primaryKeys = true && that.isSetPrimaryKeys();
+    if (this_present_primaryKeys || that_present_primaryKeys) {
+      if (!(this_present_primaryKeys && that_present_primaryKeys))
+        return false;
+      if (!this.primaryKeys.equals(that.primaryKeys))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_primaryKeys = true && (isSetPrimaryKeys());
+    list.add(present_primaryKeys);
+    if (present_primaryKeys)
+      list.add(primaryKeys);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(PrimaryKeysResponse other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetPrimaryKeys()).compareTo(other.isSetPrimaryKeys());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPrimaryKeys()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primaryKeys, other.primaryKeys);
+      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("PrimaryKeysResponse(");
+    boolean first = true;
+
+    sb.append("primaryKeys:");
+    if (this.primaryKeys == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.primaryKeys);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetPrimaryKeys()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'primaryKeys' 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 PrimaryKeysResponseStandardSchemeFactory implements SchemeFactory {
+    public PrimaryKeysResponseStandardScheme getScheme() {
+      return new PrimaryKeysResponseStandardScheme();
+    }
+  }
+
+  private static class PrimaryKeysResponseStandardScheme extends StandardScheme<PrimaryKeysResponse> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, PrimaryKeysResponse 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: // PRIMARY_KEYS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list322 = iprot.readListBegin();
+                struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list322.size);
+                SQLPrimaryKey _elem323;
+                for (int _i324 = 0; _i324 < _list322.size; ++_i324)
+                {
+                  _elem323 = new SQLPrimaryKey();
+                  _elem323.read(iprot);
+                  struct.primaryKeys.add(_elem323);
+                }
+                iprot.readListEnd();
+              }
+              struct.setPrimaryKeysIsSet(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, PrimaryKeysResponse struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.primaryKeys != null) {
+        oprot.writeFieldBegin(PRIMARY_KEYS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeys.size()));
+          for (SQLPrimaryKey _iter325 : struct.primaryKeys)
+          {
+            _iter325.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class PrimaryKeysResponseTupleSchemeFactory implements SchemeFactory {
+    public PrimaryKeysResponseTupleScheme getScheme() {
+      return new PrimaryKeysResponseTupleScheme();
+    }
+  }
+
+  private static class PrimaryKeysResponseTupleScheme extends TupleScheme<PrimaryKeysResponse> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      {
+        oprot.writeI32(struct.primaryKeys.size());
+        for (SQLPrimaryKey _iter326 : struct.primaryKeys)
+        {
+          _iter326.write(oprot);
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      {
+        org.apache.thrift.protocol.TList _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list327.size);
+        SQLPrimaryKey _elem328;
+        for (int _i329 = 0; _i329 < _list327.size; ++_i329)
+        {
+          _elem328 = new SQLPrimaryKey();
+          _elem328.read(iprot);
+          struct.primaryKeys.add(_elem328);
+        }
+      }
+      struct.setPrimaryKeysIsSet(true);
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
index ab151b1..0905181 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
@@ -547,13 +547,13 @@ public class PutFileMetadataRequest implements org.apache.thrift.TBase<PutFileMe
           case 1: // FILE_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list560 = iprot.readListBegin();
-                struct.fileIds = new ArrayList<Long>(_list560.size);
-                long _elem561;
-                for (int _i562 = 0; _i562 < _list560.size; ++_i562)
+                org.apache.thrift.protocol.TList _list576 = iprot.readListBegin();
+                struct.fileIds = new ArrayList<Long>(_list576.size);
+                long _elem577;
+                for (int _i578 = 0; _i578 < _list576.size; ++_i578)
                 {
-                  _elem561 = iprot.readI64();
-                  struct.fileIds.add(_elem561);
+                  _elem577 = iprot.readI64();
+                  struct.fileIds.add(_elem577);
                 }
                 iprot.readListEnd();
               }
@@ -565,13 +565,13 @@ public class PutFileMetadataRequest implements org.apache.thrift.TBase<PutFileMe
           case 2: // METADATA
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list563 = iprot.readListBegin();
-                struct.metadata = new ArrayList<ByteBuffer>(_list563.size);
-                ByteBuffer _elem564;
-                for (int _i565 = 0; _i565 < _list563.size; ++_i565)
+                org.apache.thrift.protocol.TList _list579 = iprot.readListBegin();
+                struct.metadata = new ArrayList<ByteBuffer>(_list579.size);
+                ByteBuffer _elem580;
+                for (int _i581 = 0; _i581 < _list579.size; ++_i581)
                 {
-                  _elem564 = iprot.readBinary();
-                  struct.metadata.add(_elem564);
+                  _elem580 = iprot.readBinary();
+                  struct.metadata.add(_elem580);
                 }
                 iprot.readListEnd();
               }
@@ -605,9 +605,9 @@ public class PutFileMetadataRequest implements org.apache.thrift.TBase<PutFileMe
         oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
-          for (long _iter566 : struct.fileIds)
+          for (long _iter582 : struct.fileIds)
           {
-            oprot.writeI64(_iter566);
+            oprot.writeI64(_iter582);
           }
           oprot.writeListEnd();
         }
@@ -617,9 +617,9 @@ public class PutFileMetadataRequest implements org.apache.thrift.TBase<PutFileMe
         oprot.writeFieldBegin(METADATA_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
-          for (ByteBuffer _iter567 : struct.metadata)
+          for (ByteBuffer _iter583 : struct.metadata)
           {
-            oprot.writeBinary(_iter567);
+            oprot.writeBinary(_iter583);
           }
           oprot.writeListEnd();
         }
@@ -651,16 +651,16 @@ public class PutFileMetadataRequest implements org.apache.thrift.TBase<PutFileMe
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.fileIds.size());
-        for (long _iter568 : struct.fileIds)
+        for (long _iter584 : struct.fileIds)
         {
-          oprot.writeI64(_iter568);
+          oprot.writeI64(_iter584);
         }
       }
       {
         oprot.writeI32(struct.metadata.size());
-        for (ByteBuffer _iter569 : struct.metadata)
+        for (ByteBuffer _iter585 : struct.metadata)
         {
-          oprot.writeBinary(_iter569);
+          oprot.writeBinary(_iter585);
         }
       }
       BitSet optionals = new BitSet();
@@ -677,24 +677,24 @@ public class PutFileMetadataRequest implements org.apache.thrift.TBase<PutFileMe
     public void read(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list570 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.fileIds = new ArrayList<Long>(_list570.size);
-        long _elem571;
-        for (int _i572 = 0; _i572 < _list570.size; ++_i572)
+        org.apache.thrift.protocol.TList _list586 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.fileIds = new ArrayList<Long>(_list586.size);
+        long _elem587;
+        for (int _i588 = 0; _i588 < _list586.size; ++_i588)
         {
-          _elem571 = iprot.readI64();
-          struct.fileIds.add(_elem571);
+          _elem587 = iprot.readI64();
+          struct.fileIds.add(_elem587);
         }
       }
       struct.setFileIdsIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list573 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.metadata = new ArrayList<ByteBuffer>(_list573.size);
-        ByteBuffer _elem574;
-        for (int _i575 = 0; _i575 < _list573.size; ++_i575)
+        org.apache.thrift.protocol.TList _list589 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.metadata = new ArrayList<ByteBuffer>(_list589.size);
+        ByteBuffer _elem590;
+        for (int _i591 = 0; _i591 < _list589.size; ++_i591)
         {
-          _elem574 = iprot.readBinary();
-          struct.metadata.add(_elem574);
+          _elem590 = iprot.readBinary();
+          struct.metadata.add(_elem590);
         }
       }
       struct.setMetadataIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java
index 7f8a044..1921bf5 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java
@@ -168,13 +168,13 @@ public class RequestPartsSpec extends org.apache.thrift.TUnion<RequestPartsSpec,
           if (field.type == NAMES_FIELD_DESC.type) {
             List<String> names;
             {
-              org.apache.thrift.protocol.TList _list404 = iprot.readListBegin();
-              names = new ArrayList<String>(_list404.size);
-              String _elem405;
-              for (int _i406 = 0; _i406 < _list404.size; ++_i406)
+              org.apache.thrift.protocol.TList _list420 = iprot.readListBegin();
+              names = new ArrayList<String>(_list420.size);
+              String _elem421;
+              for (int _i422 = 0; _i422 < _list420.size; ++_i422)
               {
-                _elem405 = iprot.readString();
-                names.add(_elem405);
+                _elem421 = iprot.readString();
+                names.add(_elem421);
               }
               iprot.readListEnd();
             }
@@ -187,14 +187,14 @@ public class RequestPartsSpec extends org.apache.thrift.TUnion<RequestPartsSpec,
           if (field.type == EXPRS_FIELD_DESC.type) {
             List<DropPartitionsExpr> exprs;
             {
-              org.apache.thrift.protocol.TList _list407 = iprot.readListBegin();
-              exprs = new ArrayList<DropPartitionsExpr>(_list407.size);
-              DropPartitionsExpr _elem408;
-              for (int _i409 = 0; _i409 < _list407.size; ++_i409)
+              org.apache.thrift.protocol.TList _list423 = iprot.readListBegin();
+              exprs = new ArrayList<DropPartitionsExpr>(_list423.size);
+              DropPartitionsExpr _elem424;
+              for (int _i425 = 0; _i425 < _list423.size; ++_i425)
               {
-                _elem408 = new DropPartitionsExpr();
-                _elem408.read(iprot);
-                exprs.add(_elem408);
+                _elem424 = new DropPartitionsExpr();
+                _elem424.read(iprot);
+                exprs.add(_elem424);
               }
               iprot.readListEnd();
             }
@@ -219,9 +219,9 @@ public class RequestPartsSpec extends org.apache.thrift.TUnion<RequestPartsSpec,
         List<String> names = (List<String>)value_;
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, names.size()));
-          for (String _iter410 : names)
+          for (String _iter426 : names)
           {
-            oprot.writeString(_iter410);
+            oprot.writeString(_iter426);
           }
           oprot.writeListEnd();
         }
@@ -230,9 +230,9 @@ public class RequestPartsSpec extends org.apache.thrift.TUnion<RequestPartsSpec,
         List<DropPartitionsExpr> exprs = (List<DropPartitionsExpr>)value_;
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, exprs.size()));
-          for (DropPartitionsExpr _iter411 : exprs)
+          for (DropPartitionsExpr _iter427 : exprs)
           {
-            _iter411.write(oprot);
+            _iter427.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -250,13 +250,13 @@ public class RequestPartsSpec extends org.apache.thrift.TUnion<RequestPartsSpec,
         case NAMES:
           List<String> names;
           {
-            org.apache.thrift.protocol.TList _list412 = iprot.readListBegin();
-            names = new ArrayList<String>(_list412.size);
-            String _elem413;
-            for (int _i414 = 0; _i414 < _list412.size; ++_i414)
+            org.apache.thrift.protocol.TList _list428 = iprot.readListBegin();
+            names = new ArrayList<String>(_list428.size);
+            String _elem429;
+            for (int _i430 = 0; _i430 < _list428.size; ++_i430)
             {
-              _elem413 = iprot.readString();
-              names.add(_elem413);
+              _elem429 = iprot.readString();
+              names.add(_elem429);
             }
             iprot.readListEnd();
           }
@@ -264,14 +264,14 @@ public class RequestPartsSpec extends org.apache.thrift.TUnion<RequestPartsSpec,
         case EXPRS:
           List<DropPartitionsExpr> exprs;
           {
-            org.apache.thrift.protocol.TList _list415 = iprot.readListBegin();
-            exprs = new ArrayList<DropPartitionsExpr>(_list415.size);
-            DropPartitionsExpr _elem416;
-            for (int _i417 = 0; _i417 < _list415.size; ++_i417)
+            org.apache.thrift.protocol.TList _list431 = iprot.readListBegin();
+            exprs = new ArrayList<DropPartitionsExpr>(_list431.size);
+            DropPartitionsExpr _elem432;
+            for (int _i433 = 0; _i433 < _list431.size; ++_i433)
             {
-              _elem416 = new DropPartitionsExpr();
-              _elem416.read(iprot);
-              exprs.add(_elem416);
+              _elem432 = new DropPartitionsExpr();
+              _elem432.read(iprot);
+              exprs.add(_elem432);
             }
             iprot.readListEnd();
           }
@@ -291,9 +291,9 @@ public class RequestPartsSpec extends org.apache.thrift.TUnion<RequestPartsSpec,
         List<String> names = (List<String>)value_;
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, names.size()));
-          for (String _iter418 : names)
+          for (String _iter434 : names)
           {
-            oprot.writeString(_iter418);
+            oprot.writeString(_iter434);
           }
           oprot.writeListEnd();
         }
@@ -302,9 +302,9 @@ public class RequestPartsSpec extends org.apache.thrift.TUnion<RequestPartsSpec,
         List<DropPartitionsExpr> exprs = (List<DropPartitionsExpr>)value_;
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, exprs.size()));
-          for (DropPartitionsExpr _iter419 : exprs)
+          for (DropPartitionsExpr _iter435 : exprs)
           {
-            _iter419.write(oprot);
+            _iter435.write(oprot);
           }
           oprot.writeListEnd();
         }

http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java
new file mode 100644
index 0000000..44c5d72
--- /dev/null
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java
@@ -0,0 +1,1715 @@
+/**
+ * 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 SQLForeignKey implements org.apache.thrift.TBase<SQLForeignKey, SQLForeignKey._Fields>, java.io.Serializable, Cloneable, Comparable<SQLForeignKey> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLForeignKey");
+
+  private static final org.apache.thrift.protocol.TField PKTABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("pktable_db", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PKTABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pktable_name", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField PKCOLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pkcolumn_name", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField FKTABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("fktable_db", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField FKTABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fktable_name", org.apache.thrift.protocol.TType.STRING, (short)5);
+  private static final org.apache.thrift.protocol.TField FKCOLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fkcolumn_name", org.apache.thrift.protocol.TType.STRING, (short)6);
+  private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)7);
+  private static final org.apache.thrift.protocol.TField UPDATE_RULE_FIELD_DESC = new org.apache.thrift.protocol.TField("update_rule", org.apache.thrift.protocol.TType.I32, (short)8);
+  private static final org.apache.thrift.protocol.TField DELETE_RULE_FIELD_DESC = new org.apache.thrift.protocol.TField("delete_rule", org.apache.thrift.protocol.TType.I32, (short)9);
+  private static final org.apache.thrift.protocol.TField FK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fk_name", org.apache.thrift.protocol.TType.STRING, (short)10);
+  private static final org.apache.thrift.protocol.TField PK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pk_name", org.apache.thrift.protocol.TType.STRING, (short)11);
+  private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)12);
+  private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)13);
+  private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)14);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SQLForeignKeyStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SQLForeignKeyTupleSchemeFactory());
+  }
+
+  private String pktable_db; // required
+  private String pktable_name; // required
+  private String pkcolumn_name; // required
+  private String fktable_db; // required
+  private String fktable_name; // required
+  private String fkcolumn_name; // required
+  private int key_seq; // required
+  private int update_rule; // required
+  private int delete_rule; // required
+  private String fk_name; // required
+  private String pk_name; // required
+  private boolean enable_cstr; // required
+  private boolean validate_cstr; // required
+  private boolean rely_cstr; // 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 {
+    PKTABLE_DB((short)1, "pktable_db"),
+    PKTABLE_NAME((short)2, "pktable_name"),
+    PKCOLUMN_NAME((short)3, "pkcolumn_name"),
+    FKTABLE_DB((short)4, "fktable_db"),
+    FKTABLE_NAME((short)5, "fktable_name"),
+    FKCOLUMN_NAME((short)6, "fkcolumn_name"),
+    KEY_SEQ((short)7, "key_seq"),
+    UPDATE_RULE((short)8, "update_rule"),
+    DELETE_RULE((short)9, "delete_rule"),
+    FK_NAME((short)10, "fk_name"),
+    PK_NAME((short)11, "pk_name"),
+    ENABLE_CSTR((short)12, "enable_cstr"),
+    VALIDATE_CSTR((short)13, "validate_cstr"),
+    RELY_CSTR((short)14, "rely_cstr");
+
+    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: // PKTABLE_DB
+          return PKTABLE_DB;
+        case 2: // PKTABLE_NAME
+          return PKTABLE_NAME;
+        case 3: // PKCOLUMN_NAME
+          return PKCOLUMN_NAME;
+        case 4: // FKTABLE_DB
+          return FKTABLE_DB;
+        case 5: // FKTABLE_NAME
+          return FKTABLE_NAME;
+        case 6: // FKCOLUMN_NAME
+          return FKCOLUMN_NAME;
+        case 7: // KEY_SEQ
+          return KEY_SEQ;
+        case 8: // UPDATE_RULE
+          return UPDATE_RULE;
+        case 9: // DELETE_RULE
+          return DELETE_RULE;
+        case 10: // FK_NAME
+          return FK_NAME;
+        case 11: // PK_NAME
+          return PK_NAME;
+        case 12: // ENABLE_CSTR
+          return ENABLE_CSTR;
+        case 13: // VALIDATE_CSTR
+          return VALIDATE_CSTR;
+        case 14: // RELY_CSTR
+          return RELY_CSTR;
+        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
+  private static final int __KEY_SEQ_ISSET_ID = 0;
+  private static final int __UPDATE_RULE_ISSET_ID = 1;
+  private static final int __DELETE_RULE_ISSET_ID = 2;
+  private static final int __ENABLE_CSTR_ISSET_ID = 3;
+  private static final int __VALIDATE_CSTR_ISSET_ID = 4;
+  private static final int __RELY_CSTR_ISSET_ID = 5;
+  private byte __isset_bitfield = 0;
+  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.PKTABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("pktable_db", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PKTABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("pktable_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PKCOLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("pkcolumn_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.FKTABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("fktable_db", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.FKTABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("fktable_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.FKCOLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("fkcolumn_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.KEY_SEQ, new org.apache.thrift.meta_data.FieldMetaData("key_seq", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.UPDATE_RULE, new org.apache.thrift.meta_data.FieldMetaData("update_rule", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.DELETE_RULE, new org.apache.thrift.meta_data.FieldMetaData("delete_rule", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.FK_NAME, new org.apache.thrift.meta_data.FieldMetaData("fk_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PK_NAME, new org.apache.thrift.meta_data.FieldMetaData("pk_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.ENABLE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("enable_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.VALIDATE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("validate_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLForeignKey.class, metaDataMap);
+  }
+
+  public SQLForeignKey() {
+  }
+
+  public SQLForeignKey(
+    String pktable_db,
+    String pktable_name,
+    String pkcolumn_name,
+    String fktable_db,
+    String fktable_name,
+    String fkcolumn_name,
+    int key_seq,
+    int update_rule,
+    int delete_rule,
+    String fk_name,
+    String pk_name,
+    boolean enable_cstr,
+    boolean validate_cstr,
+    boolean rely_cstr)
+  {
+    this();
+    this.pktable_db = pktable_db;
+    this.pktable_name = pktable_name;
+    this.pkcolumn_name = pkcolumn_name;
+    this.fktable_db = fktable_db;
+    this.fktable_name = fktable_name;
+    this.fkcolumn_name = fkcolumn_name;
+    this.key_seq = key_seq;
+    setKey_seqIsSet(true);
+    this.update_rule = update_rule;
+    setUpdate_ruleIsSet(true);
+    this.delete_rule = delete_rule;
+    setDelete_ruleIsSet(true);
+    this.fk_name = fk_name;
+    this.pk_name = pk_name;
+    this.enable_cstr = enable_cstr;
+    setEnable_cstrIsSet(true);
+    this.validate_cstr = validate_cstr;
+    setValidate_cstrIsSet(true);
+    this.rely_cstr = rely_cstr;
+    setRely_cstrIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public SQLForeignKey(SQLForeignKey other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetPktable_db()) {
+      this.pktable_db = other.pktable_db;
+    }
+    if (other.isSetPktable_name()) {
+      this.pktable_name = other.pktable_name;
+    }
+    if (other.isSetPkcolumn_name()) {
+      this.pkcolumn_name = other.pkcolumn_name;
+    }
+    if (other.isSetFktable_db()) {
+      this.fktable_db = other.fktable_db;
+    }
+    if (other.isSetFktable_name()) {
+      this.fktable_name = other.fktable_name;
+    }
+    if (other.isSetFkcolumn_name()) {
+      this.fkcolumn_name = other.fkcolumn_name;
+    }
+    this.key_seq = other.key_seq;
+    this.update_rule = other.update_rule;
+    this.delete_rule = other.delete_rule;
+    if (other.isSetFk_name()) {
+      this.fk_name = other.fk_name;
+    }
+    if (other.isSetPk_name()) {
+      this.pk_name = other.pk_name;
+    }
+    this.enable_cstr = other.enable_cstr;
+    this.validate_cstr = other.validate_cstr;
+    this.rely_cstr = other.rely_cstr;
+  }
+
+  public SQLForeignKey deepCopy() {
+    return new SQLForeignKey(this);
+  }
+
+  @Override
+  public void clear() {
+    this.pktable_db = null;
+    this.pktable_name = null;
+    this.pkcolumn_name = null;
+    this.fktable_db = null;
+    this.fktable_name = null;
+    this.fkcolumn_name = null;
+    setKey_seqIsSet(false);
+    this.key_seq = 0;
+    setUpdate_ruleIsSet(false);
+    this.update_rule = 0;
+    setDelete_ruleIsSet(false);
+    this.delete_rule = 0;
+    this.fk_name = null;
+    this.pk_name = null;
+    setEnable_cstrIsSet(false);
+    this.enable_cstr = false;
+    setValidate_cstrIsSet(false);
+    this.validate_cstr = false;
+    setRely_cstrIsSet(false);
+    this.rely_cstr = false;
+  }
+
+  public String getPktable_db() {
+    return this.pktable_db;
+  }
+
+  public void setPktable_db(String pktable_db) {
+    this.pktable_db = pktable_db;
+  }
+
+  public void unsetPktable_db() {
+    this.pktable_db = null;
+  }
+
+  /** Returns true if field pktable_db is set (has been assigned a value) and false otherwise */
+  public boolean isSetPktable_db() {
+    return this.pktable_db != null;
+  }
+
+  public void setPktable_dbIsSet(boolean value) {
+    if (!value) {
+      this.pktable_db = null;
+    }
+  }
+
+  public String getPktable_name() {
+    return this.pktable_name;
+  }
+
+  public void setPktable_name(String pktable_name) {
+    this.pktable_name = pktable_name;
+  }
+
+  public void unsetPktable_name() {
+    this.pktable_name = null;
+  }
+
+  /** Returns true if field pktable_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetPktable_name() {
+    return this.pktable_name != null;
+  }
+
+  public void setPktable_nameIsSet(boolean value) {
+    if (!value) {
+      this.pktable_name = null;
+    }
+  }
+
+  public String getPkcolumn_name() {
+    return this.pkcolumn_name;
+  }
+
+  public void setPkcolumn_name(String pkcolumn_name) {
+    this.pkcolumn_name = pkcolumn_name;
+  }
+
+  public void unsetPkcolumn_name() {
+    this.pkcolumn_name = null;
+  }
+
+  /** Returns true if field pkcolumn_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetPkcolumn_name() {
+    return this.pkcolumn_name != null;
+  }
+
+  public void setPkcolumn_nameIsSet(boolean value) {
+    if (!value) {
+      this.pkcolumn_name = null;
+    }
+  }
+
+  public String getFktable_db() {
+    return this.fktable_db;
+  }
+
+  public void setFktable_db(String fktable_db) {
+    this.fktable_db = fktable_db;
+  }
+
+  public void unsetFktable_db() {
+    this.fktable_db = null;
+  }
+
+  /** Returns true if field fktable_db is set (has been assigned a value) and false otherwise */
+  public boolean isSetFktable_db() {
+    return this.fktable_db != null;
+  }
+
+  public void setFktable_dbIsSet(boolean value) {
+    if (!value) {
+      this.fktable_db = null;
+    }
+  }
+
+  public String getFktable_name() {
+    return this.fktable_name;
+  }
+
+  public void setFktable_name(String fktable_name) {
+    this.fktable_name = fktable_name;
+  }
+
+  public void unsetFktable_name() {
+    this.fktable_name = null;
+  }
+
+  /** Returns true if field fktable_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetFktable_name() {
+    return this.fktable_name != null;
+  }
+
+  public void setFktable_nameIsSet(boolean value) {
+    if (!value) {
+      this.fktable_name = null;
+    }
+  }
+
+  public String getFkcolumn_name() {
+    return this.fkcolumn_name;
+  }
+
+  public void setFkcolumn_name(String fkcolumn_name) {
+    this.fkcolumn_name = fkcolumn_name;
+  }
+
+  public void unsetFkcolumn_name() {
+    this.fkcolumn_name = null;
+  }
+
+  /** Returns true if field fkcolumn_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetFkcolumn_name() {
+    return this.fkcolumn_name != null;
+  }
+
+  public void setFkcolumn_nameIsSet(boolean value) {
+    if (!value) {
+      this.fkcolumn_name = null;
+    }
+  }
+
+  public int getKey_seq() {
+    return this.key_seq;
+  }
+
+  public void setKey_seq(int key_seq) {
+    this.key_seq = key_seq;
+    setKey_seqIsSet(true);
+  }
+
+  public void unsetKey_seq() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_SEQ_ISSET_ID);
+  }
+
+  /** Returns true if field key_seq is set (has been assigned a value) and false otherwise */
+  public boolean isSetKey_seq() {
+    return EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID);
+  }
+
+  public void setKey_seqIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_SEQ_ISSET_ID, value);
+  }
+
+  public int getUpdate_rule() {
+    return this.update_rule;
+  }
+
+  public void setUpdate_rule(int update_rule) {
+    this.update_rule = update_rule;
+    setUpdate_ruleIsSet(true);
+  }
+
+  public void unsetUpdate_rule() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATE_RULE_ISSET_ID);
+  }
+
+  /** Returns true if field update_rule is set (has been assigned a value) and false otherwise */
+  public boolean isSetUpdate_rule() {
+    return EncodingUtils.testBit(__isset_bitfield, __UPDATE_RULE_ISSET_ID);
+  }
+
+  public void setUpdate_ruleIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATE_RULE_ISSET_ID, value);
+  }
+
+  public int getDelete_rule() {
+    return this.delete_rule;
+  }
+
+  public void setDelete_rule(int delete_rule) {
+    this.delete_rule = delete_rule;
+    setDelete_ruleIsSet(true);
+  }
+
+  public void unsetDelete_rule() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETE_RULE_ISSET_ID);
+  }
+
+  /** Returns true if field delete_rule is set (has been assigned a value) and false otherwise */
+  public boolean isSetDelete_rule() {
+    return EncodingUtils.testBit(__isset_bitfield, __DELETE_RULE_ISSET_ID);
+  }
+
+  public void setDelete_ruleIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETE_RULE_ISSET_ID, value);
+  }
+
+  public String getFk_name() {
+    return this.fk_name;
+  }
+
+  public void setFk_name(String fk_name) {
+    this.fk_name = fk_name;
+  }
+
+  public void unsetFk_name() {
+    this.fk_name = null;
+  }
+
+  /** Returns true if field fk_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetFk_name() {
+    return this.fk_name != null;
+  }
+
+  public void setFk_nameIsSet(boolean value) {
+    if (!value) {
+      this.fk_name = null;
+    }
+  }
+
+  public String getPk_name() {
+    return this.pk_name;
+  }
+
+  public void setPk_name(String pk_name) {
+    this.pk_name = pk_name;
+  }
+
+  public void unsetPk_name() {
+    this.pk_name = null;
+  }
+
+  /** Returns true if field pk_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetPk_name() {
+    return this.pk_name != null;
+  }
+
+  public void setPk_nameIsSet(boolean value) {
+    if (!value) {
+      this.pk_name = null;
+    }
+  }
+
+  public boolean isEnable_cstr() {
+    return this.enable_cstr;
+  }
+
+  public void setEnable_cstr(boolean enable_cstr) {
+    this.enable_cstr = enable_cstr;
+    setEnable_cstrIsSet(true);
+  }
+
+  public void unsetEnable_cstr() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID);
+  }
+
+  /** Returns true if field enable_cstr is set (has been assigned a value) and false otherwise */
+  public boolean isSetEnable_cstr() {
+    return EncodingUtils.testBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID);
+  }
+
+  public void setEnable_cstrIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID, value);
+  }
+
+  public boolean isValidate_cstr() {
+    return this.validate_cstr;
+  }
+
+  public void setValidate_cstr(boolean validate_cstr) {
+    this.validate_cstr = validate_cstr;
+    setValidate_cstrIsSet(true);
+  }
+
+  public void unsetValidate_cstr() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID);
+  }
+
+  /** Returns true if field validate_cstr is set (has been assigned a value) and false otherwise */
+  public boolean isSetValidate_cstr() {
+    return EncodingUtils.testBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID);
+  }
+
+  public void setValidate_cstrIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID, value);
+  }
+
+  public boolean isRely_cstr() {
+    return this.rely_cstr;
+  }
+
+  public void setRely_cstr(boolean rely_cstr) {
+    this.rely_cstr = rely_cstr;
+    setRely_cstrIsSet(true);
+  }
+
+  public void unsetRely_cstr() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELY_CSTR_ISSET_ID);
+  }
+
+  /** Returns true if field rely_cstr is set (has been assigned a value) and false otherwise */
+  public boolean isSetRely_cstr() {
+    return EncodingUtils.testBit(__isset_bitfield, __RELY_CSTR_ISSET_ID);
+  }
+
+  public void setRely_cstrIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case PKTABLE_DB:
+      if (value == null) {
+        unsetPktable_db();
+      } else {
+        setPktable_db((String)value);
+      }
+      break;
+
+    case PKTABLE_NAME:
+      if (value == null) {
+        unsetPktable_name();
+      } else {
+        setPktable_name((String)value);
+      }
+      break;
+
+    case PKCOLUMN_NAME:
+      if (value == null) {
+        unsetPkcolumn_name();
+      } else {
+        setPkcolumn_name((String)value);
+      }
+      break;
+
+    case FKTABLE_DB:
+      if (value == null) {
+        unsetFktable_db();
+      } else {
+        setFktable_db((String)value);
+      }
+      break;
+
+    case FKTABLE_NAME:
+      if (value == null) {
+        unsetFktable_name();
+      } else {
+        setFktable_name((String)value);
+      }
+      break;
+
+    case FKCOLUMN_NAME:
+      if (value == null) {
+        unsetFkcolumn_name();
+      } else {
+        setFkcolumn_name((String)value);
+      }
+      break;
+
+    case KEY_SEQ:
+      if (value == null) {
+        unsetKey_seq();
+      } else {
+        setKey_seq((Integer)value);
+      }
+      break;
+
+    case UPDATE_RULE:
+      if (value == null) {
+        unsetUpdate_rule();
+      } else {
+        setUpdate_rule((Integer)value);
+      }
+      break;
+
+    case DELETE_RULE:
+      if (value == null) {
+        unsetDelete_rule();
+      } else {
+        setDelete_rule((Integer)value);
+      }
+      break;
+
+    case FK_NAME:
+      if (value == null) {
+        unsetFk_name();
+      } else {
+        setFk_name((String)value);
+      }
+      break;
+
+    case PK_NAME:
+      if (value == null) {
+        unsetPk_name();
+      } else {
+        setPk_name((String)value);
+      }
+      break;
+
+    case ENABLE_CSTR:
+      if (value == null) {
+        unsetEnable_cstr();
+      } else {
+        setEnable_cstr((Boolean)value);
+      }
+      break;
+
+    case VALIDATE_CSTR:
+      if (value == null) {
+        unsetValidate_cstr();
+      } else {
+        setValidate_cstr((Boolean)value);
+      }
+      break;
+
+    case RELY_CSTR:
+      if (value == null) {
+        unsetRely_cstr();
+      } else {
+        setRely_cstr((Boolean)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case PKTABLE_DB:
+      return getPktable_db();
+
+    case PKTABLE_NAME:
+      return getPktable_name();
+
+    case PKCOLUMN_NAME:
+      return getPkcolumn_name();
+
+    case FKTABLE_DB:
+      return getFktable_db();
+
+    case FKTABLE_NAME:
+      return getFktable_name();
+
+    case FKCOLUMN_NAME:
+      return getFkcolumn_name();
+
+    case KEY_SEQ:
+      return getKey_seq();
+
+    case UPDATE_RULE:
+      return getUpdate_rule();
+
+    case DELETE_RULE:
+      return getDelete_rule();
+
+    case FK_NAME:
+      return getFk_name();
+
+    case PK_NAME:
+      return getPk_name();
+
+    case ENABLE_CSTR:
+      return isEnable_cstr();
+
+    case VALIDATE_CSTR:
+      return isValidate_cstr();
+
+    case RELY_CSTR:
+      return isRely_cstr();
+
+    }
+    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 PKTABLE_DB:
+      return isSetPktable_db();
+    case PKTABLE_NAME:
+      return isSetPktable_name();
+    case PKCOLUMN_NAME:
+      return isSetPkcolumn_name();
+    case FKTABLE_DB:
+      return isSetFktable_db();
+    case FKTABLE_NAME:
+      return isSetFktable_name();
+    case FKCOLUMN_NAME:
+      return isSetFkcolumn_name();
+    case KEY_SEQ:
+      return isSetKey_seq();
+    case UPDATE_RULE:
+      return isSetUpdate_rule();
+    case DELETE_RULE:
+      return isSetDelete_rule();
+    case FK_NAME:
+      return isSetFk_name();
+    case PK_NAME:
+      return isSetPk_name();
+    case ENABLE_CSTR:
+      return isSetEnable_cstr();
+    case VALIDATE_CSTR:
+      return isSetValidate_cstr();
+    case RELY_CSTR:
+      return isSetRely_cstr();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof SQLForeignKey)
+      return this.equals((SQLForeignKey)that);
+    return false;
+  }
+
+  public boolean equals(SQLForeignKey that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_pktable_db = true && this.isSetPktable_db();
+    boolean that_present_pktable_db = true && that.isSetPktable_db();
+    if (this_present_pktable_db || that_present_pktable_db) {
+      if (!(this_present_pktable_db && that_present_pktable_db))
+        return false;
+      if (!this.pktable_db.equals(that.pktable_db))
+        return false;
+    }
+
+    boolean this_present_pktable_name = true && this.isSetPktable_name();
+    boolean that_present_pktable_name = true && that.isSetPktable_name();
+    if (this_present_pktable_name || that_present_pktable_name) {
+      if (!(this_present_pktable_name && that_present_pktable_name))
+        return false;
+      if (!this.pktable_name.equals(that.pktable_name))
+        return false;
+    }
+
+    boolean this_present_pkcolumn_name = true && this.isSetPkcolumn_name();
+    boolean that_present_pkcolumn_name = true && that.isSetPkcolumn_name();
+    if (this_present_pkcolumn_name || that_present_pkcolumn_name) {
+      if (!(this_present_pkcolumn_name && that_present_pkcolumn_name))
+        return false;
+      if (!this.pkcolumn_name.equals(that.pkcolumn_name))
+        return false;
+    }
+
+    boolean this_present_fktable_db = true && this.isSetFktable_db();
+    boolean that_present_fktable_db = true && that.isSetFktable_db();
+    if (this_present_fktable_db || that_present_fktable_db) {
+      if (!(this_present_fktable_db && that_present_fktable_db))
+        return false;
+      if (!this.fktable_db.equals(that.fktable_db))
+        return false;
+    }
+
+    boolean this_present_fktable_name = true && this.isSetFktable_name();
+    boolean that_present_fktable_name = true && that.isSetFktable_name();
+    if (this_present_fktable_name || that_present_fktable_name) {
+      if (!(this_present_fktable_name && that_present_fktable_name))
+        return false;
+      if (!this.fktable_name.equals(that.fktable_name))
+        return false;
+    }
+
+    boolean this_present_fkcolumn_name = true && this.isSetFkcolumn_name();
+    boolean that_present_fkcolumn_name = true && that.isSetFkcolumn_name();
+    if (this_present_fkcolumn_name || that_present_fkcolumn_name) {
+      if (!(this_present_fkcolumn_name && that_present_fkcolumn_name))
+        return false;
+      if (!this.fkcolumn_name.equals(that.fkcolumn_name))
+        return false;
+    }
+
+    boolean this_present_key_seq = true;
+    boolean that_present_key_seq = true;
+    if (this_present_key_seq || that_present_key_seq) {
+      if (!(this_present_key_seq && that_present_key_seq))
+        return false;
+      if (this.key_seq != that.key_seq)
+        return false;
+    }
+
+    boolean this_present_update_rule = true;
+    boolean that_present_update_rule = true;
+    if (this_present_update_rule || that_present_update_rule) {
+      if (!(this_present_update_rule && that_present_update_rule))
+        return false;
+      if (this.update_rule != that.update_rule)
+        return false;
+    }
+
+    boolean this_present_delete_rule = true;
+    boolean that_present_delete_rule = true;
+    if (this_present_delete_rule || that_present_delete_rule) {
+      if (!(this_present_delete_rule && that_present_delete_rule))
+        return false;
+      if (this.delete_rule != that.delete_rule)
+        return false;
+    }
+
+    boolean this_present_fk_name = true && this.isSetFk_name();
+    boolean that_present_fk_name = true && that.isSetFk_name();
+    if (this_present_fk_name || that_present_fk_name) {
+      if (!(this_present_fk_name && that_present_fk_name))
+        return false;
+      if (!this.fk_name.equals(that.fk_name))
+        return false;
+    }
+
+    boolean this_present_pk_name = true && this.isSetPk_name();
+    boolean that_present_pk_name = true && that.isSetPk_name();
+    if (this_present_pk_name || that_present_pk_name) {
+      if (!(this_present_pk_name && that_present_pk_name))
+        return false;
+      if (!this.pk_name.equals(that.pk_name))
+        return false;
+    }
+
+    boolean this_present_enable_cstr = true;
+    boolean that_present_enable_cstr = true;
+    if (this_present_enable_cstr || that_present_enable_cstr) {
+      if (!(this_present_enable_cstr && that_present_enable_cstr))
+        return false;
+      if (this.enable_cstr != that.enable_cstr)
+        return false;
+    }
+
+    boolean this_present_validate_cstr = true;
+    boolean that_present_validate_cstr = true;
+    if (this_present_validate_cstr || that_present_validate_cstr) {
+      if (!(this_present_validate_cstr && that_present_validate_cstr))
+        return false;
+      if (this.validate_cstr != that.validate_cstr)
+        return false;
+    }
+
+    boolean this_present_rely_cstr = true;
+    boolean that_present_rely_cstr = true;
+    if (this_present_rely_cstr || that_present_rely_cstr) {
+      if (!(this_present_rely_cstr && that_present_rely_cstr))
+        return false;
+      if (this.rely_cstr != that.rely_cstr)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_pktable_db = true && (isSetPktable_db());
+    list.add(present_pktable_db);
+    if (present_pktable_db)
+      list.add(pktable_db);
+
+    boolean present_pktable_name = true && (isSetPktable_name());
+    list.add(present_pktable_name);
+    if (present_pktable_name)
+      list.add(pktable_name);
+
+    boolean present_pkcolumn_name = true && (isSetPkcolumn_name());
+    list.add(present_pkcolumn_name);
+    if (present_pkcolumn_name)
+      list.add(pkcolumn_name);
+
+    boolean present_fktable_db = true && (isSetFktable_db());
+    list.add(present_fktable_db);
+    if (present_fktable_db)
+      list.add(fktable_db);
+
+    boolean present_fktable_name = true && (isSetFktable_name());
+    list.add(present_fktable_name);
+    if (present_fktable_name)
+      list.add(fktable_name);
+
+    boolean present_fkcolumn_name = true && (isSetFkcolumn_name());
+    list.add(present_fkcolumn_name);
+    if (present_fkcolumn_name)
+      list.add(fkcolumn_name);
+
+    boolean present_key_seq = true;
+    list.add(present_key_seq);
+    if (present_key_seq)
+      list.add(key_seq);
+
+    boolean present_update_rule = true;
+    list.add(present_update_rule);
+    if (present_update_rule)
+      list.add(update_rule);
+
+    boolean present_delete_rule = true;
+    list.add(present_delete_rule);
+    if (present_delete_rule)
+      list.add(delete_rule);
+
+    boolean present_fk_name = true && (isSetFk_name());
+    list.add(present_fk_name);
+    if (present_fk_name)
+      list.add(fk_name);
+
+    boolean present_pk_name = true && (isSetPk_name());
+    list.add(present_pk_name);
+    if (present_pk_name)
+      list.add(pk_name);
+
+    boolean present_enable_cstr = true;
+    list.add(present_enable_cstr);
+    if (present_enable_cstr)
+      list.add(enable_cstr);
+
+    boolean present_validate_cstr = true;
+    list.add(present_validate_cstr);
+    if (present_validate_cstr)
+      list.add(validate_cstr);
+
+    boolean present_rely_cstr = true;
+    list.add(present_rely_cstr);
+    if (present_rely_cstr)
+      list.add(rely_cstr);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(SQLForeignKey other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetPktable_db()).compareTo(other.isSetPktable_db());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPktable_db()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pktable_db, other.pktable_db);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPktable_name()).compareTo(other.isSetPktable_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPktable_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pktable_name, other.pktable_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPkcolumn_name()).compareTo(other.isSetPkcolumn_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPkcolumn_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pkcolumn_name, other.pkcolumn_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetFktable_db()).compareTo(other.isSetFktable_db());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFktable_db()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fktable_db, other.fktable_db);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetFktable_name()).compareTo(other.isSetFktable_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFktable_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fktable_name, other.fktable_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetFkcolumn_name()).compareTo(other.isSetFkcolumn_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFkcolumn_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fkcolumn_name, other.fkcolumn_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetKey_seq()).compareTo(other.isSetKey_seq());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetKey_seq()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetUpdate_rule()).compareTo(other.isSetUpdate_rule());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUpdate_rule()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.update_rule, other.update_rule);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDelete_rule()).compareTo(other.isSetDelete_rule());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDelete_rule()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delete_rule, other.delete_rule);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetFk_name()).compareTo(other.isSetFk_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFk_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fk_name, other.fk_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPk_name()).compareTo(other.isSetPk_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPk_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pk_name, other.pk_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetEnable_cstr()).compareTo(other.isSetEnable_cstr());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetEnable_cstr()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_cstr, other.enable_cstr);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetValidate_cstr()).compareTo(other.isSetValidate_cstr());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetValidate_cstr()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate_cstr, other.validate_cstr);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetRely_cstr()).compareTo(other.isSetRely_cstr());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetRely_cstr()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rely_cstr, other.rely_cstr);
+      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("SQLForeignKey(");
+    boolean first = true;
+
+    sb.append("pktable_db:");
+    if (this.pktable_db == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.pktable_db);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("pktable_name:");
+    if (this.pktable_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.pktable_name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("pkcolumn_name:");
+    if (this.pkcolumn_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.pkcolumn_name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("fktable_db:");
+    if (this.fktable_db == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.fktable_db);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("fktable_name:");
+    if (this.fktable_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.fktable_name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("fkcolumn_name:");
+    if (this.fkcolumn_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.fkcolumn_name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("key_seq:");
+    sb.append(this.key_seq);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("update_rule:");
+    sb.append(this.update_rule);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("delete_rule:");
+    sb.append(this.delete_rule);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("fk_name:");
+    if (this.fk_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.fk_name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("pk_name:");
+    if (this.pk_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.pk_name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("enable_cstr:");
+    sb.append(this.enable_cstr);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("validate_cstr:");
+    sb.append(this.validate_cstr);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("rely_cstr:");
+    sb.append(this.rely_cstr);
+    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 {
+      // 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 SQLForeignKeyStandardSchemeFactory implements SchemeFactory {
+    public SQLForeignKeyStandardScheme getScheme() {
+      return new SQLForeignKeyStandardScheme();
+    }
+  }
+
+  private static class SQLForeignKeyStandardScheme extends StandardScheme<SQLForeignKey> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, SQLForeignKey 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: // PKTABLE_DB
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.pktable_db = iprot.readString();
+              struct.setPktable_dbIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // PKTABLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.pktable_name = iprot.readString();
+              struct.setPktable_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // PKCOLUMN_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.pkcolumn_name = iprot.readString();
+              struct.setPkcolumn_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // FKTABLE_DB
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.fktable_db = iprot.readString();
+              struct.setFktable_dbIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // FKTABLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.fktable_name = iprot.readString();
+              struct.setFktable_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // FKCOLUMN_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.fkcolumn_name = iprot.readString();
+              struct.setFkcolumn_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // KEY_SEQ
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.key_seq = iprot.readI32();
+              struct.setKey_seqIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // UPDATE_RULE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.update_rule = iprot.readI32();
+              struct.setUpdate_ruleIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 9: // DELETE_RULE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.delete_rule = iprot.readI32();
+              struct.setDelete_ruleIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 10: // FK_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.fk_name = iprot.readString();
+              struct.setFk_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 11: // PK_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.pk_name = iprot.readString();
+              struct.setPk_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 12: // ENABLE_CSTR
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.enable_cstr = iprot.readBool();
+              struct.setEnable_cstrIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 13: // VALIDATE_CSTR
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.validate_cstr = iprot.readBool();
+              struct.setValidate_cstrIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 14: // RELY_CSTR
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.rely_cstr = iprot.readBool();
+              struct.setRely_cstrIsSet(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, SQLForeignKey struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.pktable_db != null) {
+        oprot.writeFieldBegin(PKTABLE_DB_FIELD_DESC);
+        oprot.writeString(struct.pktable_db);
+        oprot.writeFieldEnd();
+      }
+      if (struct.pktable_name != null) {
+        oprot.writeFieldBegin(PKTABLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.pktable_name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.pkcolumn_name != null) {
+        oprot.writeFieldBegin(PKCOLUMN_NAME_FIELD_DESC);
+        oprot.writeString(struct.pkcolumn_name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.fktable_db != null) {
+        oprot.writeFieldBegin(FKTABLE_DB_FIELD_DESC);
+        oprot.writeString(struct.fktable_db);
+        oprot.writeFieldEnd();
+      }
+      if (struct.fktable_name != null) {
+        oprot.writeFieldBegin(FKTABLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.fktable_name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.fkcolumn_name != null) {
+        oprot.writeFieldBegin(FKCOLUMN_NAME_FIELD_DESC);
+        oprot.writeString(struct.fkcolumn_name);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(KEY_SEQ_FIELD_DESC);
+      oprot.writeI32(struct.key_seq);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(UPDATE_RULE_FIELD_DESC);
+      oprot.writeI32(struct.update_rule);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(DELETE_RULE_FIELD_DESC);
+      oprot.writeI32(struct.delete_rule);
+      oprot.writeFieldEnd();
+      if (struct.fk_name != null) {
+        oprot.writeFieldBegin(FK_NAME_FIELD_DESC);
+        oprot.writeString(struct.fk_name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.pk_name != null) {
+        oprot.writeFieldBegin(PK_NAME_FIELD_DESC);
+        oprot.writeString(struct.pk_name);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(ENABLE_CSTR_FIELD_DESC);
+      oprot.writeBool(struct.enable_cstr);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(VALIDATE_CSTR_FIELD_DESC);
+      oprot.writeBool(struct.validate_cstr);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC);
+      oprot.writeBool(struct.rely_cstr);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SQLForeignKeyTupleSchemeFactory implements SchemeFactory {
+    public SQLForeignKeyTupleScheme getScheme() {
+      return new SQLForeignKeyTupleScheme();
+    }
+  }
+
+  private static class SQLForeignKeyTupleScheme extends TupleScheme<SQLForeignKey> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, SQLForeignKey struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetPktable_db()) {
+        optionals.set(0);
+      }
+      if (struct.isSetPktable_name()) {
+        optionals.set(1);
+      }
+      if (struct.isSetPkcolumn_name()) {
+        optionals.set(2);
+      }
+      if (struct.isSetFktable_db()) {
+        optionals.set(3);
+      }
+      if (struct.isSetFktable_name()) {
+        optionals.set(4);
+      }
+      if (struct.isSetFkcolumn_name()) {
+        optionals.set(5);
+      }
+      if (struct.isSetKey_seq()) {
+        optionals.set(6);
+      }
+      if (struct.isSetUpdate_rule()) {
+        optionals.set(7);
+      }
+      if (struct.isSetDelete_rule()) {
+        optionals.set(8);
+      }
+      if (struct.isSetFk_name()) {
+        optionals.set(9);
+      }
+      if (struct.isSetPk_name()) {
+        optionals.set(10);
+      }
+      if (struct.isSetEnable_cstr()) {
+        optionals.set(11);
+      }
+      if (struct.isSetValidate_cstr()) {
+        optionals.set(12);
+      }
+      if (struct.isSetRely_cstr()) {
+        optionals.set(13);
+      }
+      oprot.writeBitSet(optionals, 14);
+      if (struct.isSetPktable_db()) {
+        oprot.writeString(struct.pktable_db);
+      }
+      if (struct.isSetPktable_name()) {
+        oprot.writeString(struct.pktable_name);
+      }
+      if (struct.isSetPkcolumn_name()) {
+        oprot.writeString(struct.pkcolumn_name);
+      }
+      if (struct.isSetFktable_db()) {
+        oprot.writeString(struct.fktable_db);
+      }
+      if (struct.isSetFktable_name()) {
+        oprot.writeString(struct.fktable_name);
+      }
+      if (struct.isSetFkcolumn_name()) {
+        oprot.writeString(struct.fkcolumn_name);
+      }
+      if (struct.isSetKey_seq()) {
+        oprot.writeI32(struct.key_seq);
+      }
+      if (struct.isSetUpdate_rule()) {
+        oprot.writeI32(struct.update_rule);
+      }
+      if (struct.isSetDelete_rule()) {
+        oprot.writeI32(struct.delete_rule);
+      }
+      if (struct.isSetFk_name()) {
+        oprot.writeString(struct.fk_name);
+      }
+      if (struct.isSetPk_name()) {
+        oprot.writeString(struct.pk_name);
+      }
+      if (struct.isSetEnable_cstr()) {
+        oprot.writeBool(struct.enable_cstr);
+      }
+      if (struct.isSetValidate_cstr()) {
+        oprot.writeBool(struct.validate_cstr);
+      }
+      if (struct.isSetRely_cstr()) {
+        oprot.writeBool(struct.rely_cstr);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, SQLForeignKey struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(14);
+      if (incoming.get(0)) {
+        struct.pktable_db = iprot.readString();
+        struct.setPktable_dbIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.pktable_name = iprot.readString();
+        struct.setPktable_nameIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.pkcolumn_name = iprot.readString();
+        struct.setPkcolumn_nameIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.fktable_db = iprot.readString();
+        struct.setFktable_dbIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.fktable_name = iprot.readString();
+        struct.setFktable_nameIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.fkcolumn_name = iprot.readString();
+        struct.setFkcolumn_nameIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.key_seq = iprot.readI32();
+        struct.setKey_seqIsSet(true);
+      }
+      if (incoming.get(7)) {
+        struct.update_rule = iprot.readI32();
+        struct.setUpdate_ruleIsSet(true);
+      }
+      if (incoming.get(8)) {
+        struct.delete_rule = iprot.readI32();
+        struct.setDelete_ruleIsSet(true);
+      }
+      if (incoming.get(9)) {
+        struct.fk_name = iprot.readString();
+        struct.setFk_nameIsSet(true);
+      }
+      if (incoming.get(10)) {
+        struct.pk_name = iprot.readString();
+        struct.setPk_nameIsSet(true);
+      }
+      if (incoming.get(11)) {
+        struct.enable_cstr = iprot.readBool();
+        struct.setEnable_cstrIsSet(true);
+      }
+      if (incoming.get(12)) {
+        struct.validate_cstr = iprot.readBool();
+        struct.setValidate_cstrIsSet(true);
+      }
+      if (incoming.get(13)) {
+        struct.rely_cstr = iprot.readBool();
+        struct.setRely_cstrIsSet(true);
+      }
+    }
+  }
+
+}
+


Mime
View raw message