You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2009/07/14 02:01:08 UTC

svn commit: r793758 [4/11] - in /hadoop/hive/trunk: ./ jdbc/src/java/org/apache/hadoop/hive/jdbc/ lib/ metastore/ metastore/if/ metastore/include/ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ metastore/src/gen-php/ metastore/src/gen...

Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java Tue Jul 14 00:01:05 2009
@@ -11,544 +11,826 @@
 import java.util.HashMap;
 import java.util.Set;
 import java.util.HashSet;
-import com.facebook.thrift.*;
+import java.util.Collections;
+import org.apache.log4j.Logger;
 
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class Table implements TBase, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Table");
+  private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1);
+  private static final TField DB_NAME_FIELD_DESC = new TField("dbName", TType.STRING, (short)2);
+  private static final TField OWNER_FIELD_DESC = new TField("owner", TType.STRING, (short)3);
+  private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)4);
+  private static final TField LAST_ACCESS_TIME_FIELD_DESC = new TField("lastAccessTime", TType.I32, (short)5);
+  private static final TField RETENTION_FIELD_DESC = new TField("retention", TType.I32, (short)6);
+  private static final TField SD_FIELD_DESC = new TField("sd", TType.STRUCT, (short)7);
+  private static final TField PARTITION_KEYS_FIELD_DESC = new TField("partitionKeys", TType.LIST, (short)8);
+  private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)9);
+
+  private String tableName;
+  public static final int TABLENAME = 1;
+  private String dbName;
+  public static final int DBNAME = 2;
+  private String owner;
+  public static final int OWNER = 3;
+  private int createTime;
+  public static final int CREATETIME = 4;
+  private int lastAccessTime;
+  public static final int LASTACCESSTIME = 5;
+  private int retention;
+  public static final int RETENTION = 6;
+  private StorageDescriptor sd;
+  public static final int SD = 7;
+  private List<FieldSchema> partitionKeys;
+  public static final int PARTITIONKEYS = 8;
+  private Map<String,String> parameters;
+  public static final int PARAMETERS = 9;
+
+  private final Isset __isset = new Isset();
+  private static final class Isset implements java.io.Serializable {
+    public boolean createTime = false;
+    public boolean lastAccessTime = false;
+    public boolean retention = false;
+  }
 
-public class Table implements TBase, java.io.Serializable {
-private String tableName;
-private String dbName;
-private String owner;
-private int createTime;
-private int lastAccessTime;
-private int retention;
-private StorageDescriptor sd;
-private List<FieldSchema> partitionKeys;
-private Map<String,String> parameters;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean tableName = false;
-public boolean dbName = false;
-public boolean owner = false;
-public boolean createTime = false;
-public boolean lastAccessTime = false;
-public boolean retention = false;
-public boolean sd = false;
-public boolean partitionKeys = false;
-public boolean parameters = false;
-}
+  public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+    put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    put(DBNAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    put(OWNER, new FieldMetaData("owner", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.I32)));
+    put(LASTACCESSTIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.I32)));
+    put(RETENTION, new FieldMetaData("retention", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.I32)));
+    put(SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, 
+        new StructMetaData(TType.STRUCT, StorageDescriptor.class)));
+    put(PARTITIONKEYS, new FieldMetaData("partitionKeys", TFieldRequirementType.DEFAULT, 
+        new ListMetaData(TType.LIST, 
+            new StructMetaData(TType.STRUCT, FieldSchema.class))));
+    put(PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, 
+        new MapMetaData(TType.MAP, 
+            new FieldValueMetaData(TType.STRING), 
+            new FieldValueMetaData(TType.STRING))));
+  }});
 
-public Table() {
-}
+  static {
+    FieldMetaData.addStructMetaDataMap(Table.class, metaDataMap);
+  }
 
-public Table(
-String tableName,
-String dbName,
-String owner,
-int createTime,
-int lastAccessTime,
-int retention,
-StorageDescriptor sd,
-List<FieldSchema> partitionKeys,
-Map<String,String> parameters)
-{
-this();
-this.tableName = tableName;
-this.__isset.tableName = true;
-this.dbName = dbName;
-this.__isset.dbName = true;
-this.owner = owner;
-this.__isset.owner = true;
-this.createTime = createTime;
-this.__isset.createTime = true;
-this.lastAccessTime = lastAccessTime;
-this.__isset.lastAccessTime = true;
-this.retention = retention;
-this.__isset.retention = true;
-this.sd = sd;
-this.__isset.sd = true;
-this.partitionKeys = partitionKeys;
-this.__isset.partitionKeys = true;
-this.parameters = parameters;
-this.__isset.parameters = true;
-}
+  public Table() {
+  }
 
-public String getTableName() {
-return this.tableName;
-}
+  public Table(
+    String tableName,
+    String dbName,
+    String owner,
+    int createTime,
+    int lastAccessTime,
+    int retention,
+    StorageDescriptor sd,
+    List<FieldSchema> partitionKeys,
+    Map<String,String> parameters)
+  {
+    this();
+    this.tableName = tableName;
+    this.dbName = dbName;
+    this.owner = owner;
+    this.createTime = createTime;
+    this.__isset.createTime = true;
+    this.lastAccessTime = lastAccessTime;
+    this.__isset.lastAccessTime = true;
+    this.retention = retention;
+    this.__isset.retention = true;
+    this.sd = sd;
+    this.partitionKeys = partitionKeys;
+    this.parameters = parameters;
+  }
 
-public void setTableName(String tableName) {
-this.tableName = tableName;
-this.__isset.tableName = true;
-}
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Table(Table other) {
+    if (other.isSetTableName()) {
+      this.tableName = other.tableName;
+    }
+    if (other.isSetDbName()) {
+      this.dbName = other.dbName;
+    }
+    if (other.isSetOwner()) {
+      this.owner = other.owner;
+    }
+    __isset.createTime = other.__isset.createTime;
+    this.createTime = other.createTime;
+    __isset.lastAccessTime = other.__isset.lastAccessTime;
+    this.lastAccessTime = other.lastAccessTime;
+    __isset.retention = other.__isset.retention;
+    this.retention = other.retention;
+    if (other.isSetSd()) {
+      this.sd = new StorageDescriptor(other.sd);
+    }
+    if (other.isSetPartitionKeys()) {
+      List<FieldSchema> __this__partitionKeys = new ArrayList<FieldSchema>();
+      for (FieldSchema other_element : other.partitionKeys) {
+        __this__partitionKeys.add(new FieldSchema(other_element));
+      }
+      this.partitionKeys = __this__partitionKeys;
+    }
+    if (other.isSetParameters()) {
+      Map<String,String> __this__parameters = new HashMap<String,String>();
+      for (Map.Entry<String, String> other_element : other.parameters.entrySet()) {
 
-public void unsetTableName() {
-this.__isset.tableName = false;
-}
+        String other_element_key = other_element.getKey();
+        String other_element_value = other_element.getValue();
 
-public String getDbName() {
-return this.dbName;
-}
+        String __this__parameters_copy_key = other_element_key;
 
-public void setDbName(String dbName) {
-this.dbName = dbName;
-this.__isset.dbName = true;
-}
+        String __this__parameters_copy_value = other_element_value;
 
-public void unsetDbName() {
-this.__isset.dbName = false;
-}
+        __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value);
+      }
+      this.parameters = __this__parameters;
+    }
+  }
 
-public String getOwner() {
-return this.owner;
-}
+  @Override
+  public Table clone() {
+    return new Table(this);
+  }
 
-public void setOwner(String owner) {
-this.owner = owner;
-this.__isset.owner = true;
-}
+  public String getTableName() {
+    return this.tableName;
+  }
 
-public void unsetOwner() {
-this.__isset.owner = false;
-}
+  public void setTableName(String tableName) {
+    this.tableName = tableName;
+  }
 
-public int getCreateTime() {
-return this.createTime;
-}
+  public void unsetTableName() {
+    this.tableName = null;
+  }
 
-public void setCreateTime(int createTime) {
-this.createTime = createTime;
-this.__isset.createTime = true;
-}
+  // Returns true if field tableName is set (has been asigned a value) and false otherwise
+  public boolean isSetTableName() {
+    return this.tableName != null;
+  }
 
-public void unsetCreateTime() {
-this.__isset.createTime = false;
-}
+  public String getDbName() {
+    return this.dbName;
+  }
 
-public int getLastAccessTime() {
-return this.lastAccessTime;
-}
+  public void setDbName(String dbName) {
+    this.dbName = dbName;
+  }
 
-public void setLastAccessTime(int lastAccessTime) {
-this.lastAccessTime = lastAccessTime;
-this.__isset.lastAccessTime = true;
-}
+  public void unsetDbName() {
+    this.dbName = null;
+  }
 
-public void unsetLastAccessTime() {
-this.__isset.lastAccessTime = false;
-}
+  // Returns true if field dbName is set (has been asigned a value) and false otherwise
+  public boolean isSetDbName() {
+    return this.dbName != null;
+  }
 
-public int getRetention() {
-return this.retention;
-}
+  public String getOwner() {
+    return this.owner;
+  }
 
-public void setRetention(int retention) {
-this.retention = retention;
-this.__isset.retention = true;
-}
+  public void setOwner(String owner) {
+    this.owner = owner;
+  }
 
-public void unsetRetention() {
-this.__isset.retention = false;
-}
+  public void unsetOwner() {
+    this.owner = null;
+  }
 
-public StorageDescriptor getSd() {
-return this.sd;
-}
+  // Returns true if field owner is set (has been asigned a value) and false otherwise
+  public boolean isSetOwner() {
+    return this.owner != null;
+  }
 
-public void setSd(StorageDescriptor sd) {
-this.sd = sd;
-this.__isset.sd = true;
-}
+  public int getCreateTime() {
+    return this.createTime;
+  }
 
-public void unsetSd() {
-this.sd = null;
-this.__isset.sd = false;
-}
+  public void setCreateTime(int createTime) {
+    this.createTime = createTime;
+    this.__isset.createTime = true;
+  }
 
-public int getPartitionKeysSize() {
-return (this.partitionKeys == null) ? 0 : this.partitionKeys.size();
-}
+  public void unsetCreateTime() {
+    this.__isset.createTime = false;
+  }
 
-public java.util.Iterator<FieldSchema> getPartitionKeysIterator() {
-return (this.partitionKeys == null) ? null : this.partitionKeys.iterator();
-}
+  // Returns true if field createTime is set (has been asigned a value) and false otherwise
+  public boolean isSetCreateTime() {
+    return this.__isset.createTime;
+  }
 
-public void addToPartitionKeys(FieldSchema elem) {
-if (this.partitionKeys == null) {
-this.partitionKeys = new ArrayList<FieldSchema>();
-}
-this.partitionKeys.add(elem);
-this.__isset.partitionKeys = true;
-}
+  public int getLastAccessTime() {
+    return this.lastAccessTime;
+  }
 
-public List<FieldSchema> getPartitionKeys() {
-return this.partitionKeys;
-}
+  public void setLastAccessTime(int lastAccessTime) {
+    this.lastAccessTime = lastAccessTime;
+    this.__isset.lastAccessTime = true;
+  }
 
-public void setPartitionKeys(List<FieldSchema> partitionKeys) {
-this.partitionKeys = partitionKeys;
-this.__isset.partitionKeys = true;
-}
+  public void unsetLastAccessTime() {
+    this.__isset.lastAccessTime = false;
+  }
 
-public void unsetPartitionKeys() {
-this.partitionKeys = null;
-this.__isset.partitionKeys = false;
-}
+  // Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise
+  public boolean isSetLastAccessTime() {
+    return this.__isset.lastAccessTime;
+  }
 
-public int getParametersSize() {
-return (this.parameters == null) ? 0 : this.parameters.size();
-}
+  public int getRetention() {
+    return this.retention;
+  }
 
-public void putToParameters(String key, String val) {
-if (this.parameters == null) {
-this.parameters = new HashMap<String,String>();
-}
-this.parameters.put(key, val);
-this.__isset.parameters = true;
-}
+  public void setRetention(int retention) {
+    this.retention = retention;
+    this.__isset.retention = true;
+  }
 
-public Map<String,String> getParameters() {
-return this.parameters;
-}
+  public void unsetRetention() {
+    this.__isset.retention = false;
+  }
 
-public void setParameters(Map<String,String> parameters) {
-this.parameters = parameters;
-this.__isset.parameters = true;
-}
+  // Returns true if field retention is set (has been asigned a value) and false otherwise
+  public boolean isSetRetention() {
+    return this.__isset.retention;
+  }
 
-public void unsetParameters() {
-this.parameters = null;
-this.__isset.parameters = false;
-}
+  public StorageDescriptor getSd() {
+    return this.sd;
+  }
 
-public boolean equals(Object that) {
-if (that == null)
-  return false;
-if (that instanceof Table)
-  return this.equals((Table)that);
-return false;
-}
+  public void setSd(StorageDescriptor sd) {
+    this.sd = sd;
+  }
 
-public boolean equals(Table that) {
-if (that == null)
-  return false;
-
-boolean this_present_tableName = true && (this.tableName != null);
-boolean that_present_tableName = true && (that.tableName != null);
-if (this_present_tableName || that_present_tableName) {
-if (!(this_present_tableName && that_present_tableName))
-  return false;
-if (!this.tableName.equals(that.tableName))
-  return false;
-}
+  public void unsetSd() {
+    this.sd = null;
+  }
 
-boolean this_present_dbName = true && (this.dbName != null);
-boolean that_present_dbName = true && (that.dbName != null);
-if (this_present_dbName || that_present_dbName) {
-if (!(this_present_dbName && that_present_dbName))
-  return false;
-if (!this.dbName.equals(that.dbName))
-  return false;
-}
+  // Returns true if field sd is set (has been asigned a value) and false otherwise
+  public boolean isSetSd() {
+    return this.sd != null;
+  }
 
-boolean this_present_owner = true && (this.owner != null);
-boolean that_present_owner = true && (that.owner != null);
-if (this_present_owner || that_present_owner) {
-if (!(this_present_owner && that_present_owner))
-  return false;
-if (!this.owner.equals(that.owner))
-  return false;
-}
+  public int getPartitionKeysSize() {
+    return (this.partitionKeys == null) ? 0 : this.partitionKeys.size();
+  }
 
-boolean this_present_createTime = true;
-boolean that_present_createTime = true;
-if (this_present_createTime || that_present_createTime) {
-if (!(this_present_createTime && that_present_createTime))
-  return false;
-if (this.createTime != that.createTime)
-  return false;
-}
+  public java.util.Iterator<FieldSchema> getPartitionKeysIterator() {
+    return (this.partitionKeys == null) ? null : this.partitionKeys.iterator();
+  }
 
-boolean this_present_lastAccessTime = true;
-boolean that_present_lastAccessTime = true;
-if (this_present_lastAccessTime || that_present_lastAccessTime) {
-if (!(this_present_lastAccessTime && that_present_lastAccessTime))
-  return false;
-if (this.lastAccessTime != that.lastAccessTime)
-  return false;
-}
+  public void addToPartitionKeys(FieldSchema elem) {
+    if (this.partitionKeys == null) {
+      this.partitionKeys = new ArrayList<FieldSchema>();
+    }
+    this.partitionKeys.add(elem);
+  }
 
-boolean this_present_retention = true;
-boolean that_present_retention = true;
-if (this_present_retention || that_present_retention) {
-if (!(this_present_retention && that_present_retention))
-  return false;
-if (this.retention != that.retention)
-  return false;
-}
+  public List<FieldSchema> getPartitionKeys() {
+    return this.partitionKeys;
+  }
 
-boolean this_present_sd = true && (this.sd != null);
-boolean that_present_sd = true && (that.sd != null);
-if (this_present_sd || that_present_sd) {
-if (!(this_present_sd && that_present_sd))
-  return false;
-if (!this.sd.equals(that.sd))
-  return false;
-}
+  public void setPartitionKeys(List<FieldSchema> partitionKeys) {
+    this.partitionKeys = partitionKeys;
+  }
 
-boolean this_present_partitionKeys = true && (this.partitionKeys != null);
-boolean that_present_partitionKeys = true && (that.partitionKeys != null);
-if (this_present_partitionKeys || that_present_partitionKeys) {
-if (!(this_present_partitionKeys && that_present_partitionKeys))
-  return false;
-if (!this.partitionKeys.equals(that.partitionKeys))
-  return false;
-}
+  public void unsetPartitionKeys() {
+    this.partitionKeys = null;
+  }
 
-boolean this_present_parameters = true && (this.parameters != null);
-boolean that_present_parameters = true && (that.parameters != null);
-if (this_present_parameters || that_present_parameters) {
-if (!(this_present_parameters && that_present_parameters))
-  return false;
-if (!this.parameters.equals(that.parameters))
-  return false;
-}
+  // Returns true if field partitionKeys is set (has been asigned a value) and false otherwise
+  public boolean isSetPartitionKeys() {
+    return this.partitionKeys != null;
+  }
 
-return true;
-}
+  public int getParametersSize() {
+    return (this.parameters == null) ? 0 : this.parameters.size();
+  }
 
-public int hashCode() {
-return 0;
-}
+  public void putToParameters(String key, String val) {
+    if (this.parameters == null) {
+      this.parameters = new HashMap<String,String>();
+    }
+    this.parameters.put(key, val);
+  }
 
-public void read(TProtocol iprot) throws TException {
-TField field;
-iprot.readStructBegin();
-while (true)
-{
-field = iprot.readFieldBegin();
-if (field.type == TType.STOP) { 
-  break;
-}
-switch (field.id)
-{
-  case 1:
-    if (field.type == TType.STRING) {
-      this.tableName = iprot.readString();
-      this.__isset.tableName = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 2:
-    if (field.type == TType.STRING) {
-      this.dbName = iprot.readString();
-      this.__isset.dbName = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 3:
-    if (field.type == TType.STRING) {
-      this.owner = iprot.readString();
-      this.__isset.owner = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 4:
-    if (field.type == TType.I32) {
-      this.createTime = iprot.readI32();
-      this.__isset.createTime = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 5:
-    if (field.type == TType.I32) {
-      this.lastAccessTime = iprot.readI32();
-      this.__isset.lastAccessTime = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 6:
-    if (field.type == TType.I32) {
-      this.retention = iprot.readI32();
-      this.__isset.retention = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 7:
-    if (field.type == TType.STRUCT) {
-      this.sd = new StorageDescriptor();
-      this.sd.read(iprot);
-      this.__isset.sd = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 8:
-    if (field.type == TType.LIST) {
+  public Map<String,String> getParameters() {
+    return this.parameters;
+  }
+
+  public void setParameters(Map<String,String> parameters) {
+    this.parameters = parameters;
+  }
+
+  public void unsetParameters() {
+    this.parameters = null;
+  }
+
+  // Returns true if field parameters is set (has been asigned a value) and false otherwise
+  public boolean isSetParameters() {
+    return this.parameters != null;
+  }
+
+  public void setFieldValue(int fieldID, Object value) {
+    switch (fieldID) {
+    case TABLENAME:
+      if (value == null) {
+        unsetTableName();
+      } else {
+        setTableName((String)value);
+      }
+      break;
+
+    case DBNAME:
+      if (value == null) {
+        unsetDbName();
+      } else {
+        setDbName((String)value);
+      }
+      break;
+
+    case OWNER:
+      if (value == null) {
+        unsetOwner();
+      } else {
+        setOwner((String)value);
+      }
+      break;
+
+    case CREATETIME:
+      if (value == null) {
+        unsetCreateTime();
+      } else {
+        setCreateTime((Integer)value);
+      }
+      break;
+
+    case LASTACCESSTIME:
+      if (value == null) {
+        unsetLastAccessTime();
+      } else {
+        setLastAccessTime((Integer)value);
+      }
+      break;
+
+    case RETENTION:
+      if (value == null) {
+        unsetRetention();
+      } else {
+        setRetention((Integer)value);
+      }
+      break;
+
+    case SD:
+      if (value == null) {
+        unsetSd();
+      } else {
+        setSd((StorageDescriptor)value);
+      }
+      break;
+
+    case PARTITIONKEYS:
+      if (value == null) {
+        unsetPartitionKeys();
+      } else {
+        setPartitionKeys((List<FieldSchema>)value);
+      }
+      break;
+
+    case PARAMETERS:
+      if (value == null) {
+        unsetParameters();
+      } else {
+        setParameters((Map<String,String>)value);
+      }
+      break;
+
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  public Object getFieldValue(int fieldID) {
+    switch (fieldID) {
+    case TABLENAME:
+      return getTableName();
+
+    case DBNAME:
+      return getDbName();
+
+    case OWNER:
+      return getOwner();
+
+    case CREATETIME:
+      return new Integer(getCreateTime());
+
+    case LASTACCESSTIME:
+      return new Integer(getLastAccessTime());
+
+    case RETENTION:
+      return new Integer(getRetention());
+
+    case SD:
+      return getSd();
+
+    case PARTITIONKEYS:
+      return getPartitionKeys();
+
+    case PARAMETERS:
+      return getParameters();
+
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+  public boolean isSet(int fieldID) {
+    switch (fieldID) {
+    case TABLENAME:
+      return isSetTableName();
+    case DBNAME:
+      return isSetDbName();
+    case OWNER:
+      return isSetOwner();
+    case CREATETIME:
+      return isSetCreateTime();
+    case LASTACCESSTIME:
+      return isSetLastAccessTime();
+    case RETENTION:
+      return isSetRetention();
+    case SD:
+      return isSetSd();
+    case PARTITIONKEYS:
+      return isSetPartitionKeys();
+    case PARAMETERS:
+      return isSetParameters();
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Table)
+      return this.equals((Table)that);
+    return false;
+  }
+
+  public boolean equals(Table that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_tableName = true && this.isSetTableName();
+    boolean that_present_tableName = true && that.isSetTableName();
+    if (this_present_tableName || that_present_tableName) {
+      if (!(this_present_tableName && that_present_tableName))
+        return false;
+      if (!this.tableName.equals(that.tableName))
+        return false;
+    }
+
+    boolean this_present_dbName = true && this.isSetDbName();
+    boolean that_present_dbName = true && that.isSetDbName();
+    if (this_present_dbName || that_present_dbName) {
+      if (!(this_present_dbName && that_present_dbName))
+        return false;
+      if (!this.dbName.equals(that.dbName))
+        return false;
+    }
+
+    boolean this_present_owner = true && this.isSetOwner();
+    boolean that_present_owner = true && that.isSetOwner();
+    if (this_present_owner || that_present_owner) {
+      if (!(this_present_owner && that_present_owner))
+        return false;
+      if (!this.owner.equals(that.owner))
+        return false;
+    }
+
+    boolean this_present_createTime = true;
+    boolean that_present_createTime = true;
+    if (this_present_createTime || that_present_createTime) {
+      if (!(this_present_createTime && that_present_createTime))
+        return false;
+      if (this.createTime != that.createTime)
+        return false;
+    }
+
+    boolean this_present_lastAccessTime = true;
+    boolean that_present_lastAccessTime = true;
+    if (this_present_lastAccessTime || that_present_lastAccessTime) {
+      if (!(this_present_lastAccessTime && that_present_lastAccessTime))
+        return false;
+      if (this.lastAccessTime != that.lastAccessTime)
+        return false;
+    }
+
+    boolean this_present_retention = true;
+    boolean that_present_retention = true;
+    if (this_present_retention || that_present_retention) {
+      if (!(this_present_retention && that_present_retention))
+        return false;
+      if (this.retention != that.retention)
+        return false;
+    }
+
+    boolean this_present_sd = true && this.isSetSd();
+    boolean that_present_sd = true && that.isSetSd();
+    if (this_present_sd || that_present_sd) {
+      if (!(this_present_sd && that_present_sd))
+        return false;
+      if (!this.sd.equals(that.sd))
+        return false;
+    }
+
+    boolean this_present_partitionKeys = true && this.isSetPartitionKeys();
+    boolean that_present_partitionKeys = true && that.isSetPartitionKeys();
+    if (this_present_partitionKeys || that_present_partitionKeys) {
+      if (!(this_present_partitionKeys && that_present_partitionKeys))
+        return false;
+      if (!this.partitionKeys.equals(that.partitionKeys))
+        return false;
+    }
+
+    boolean this_present_parameters = true && this.isSetParameters();
+    boolean that_present_parameters = true && that.isSetParameters();
+    if (this_present_parameters || that_present_parameters) {
+      if (!(this_present_parameters && that_present_parameters))
+        return false;
+      if (!this.parameters.equals(that.parameters))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id)
       {
-        TList _list26 = iprot.readListBegin();
-        this.partitionKeys = new ArrayList<FieldSchema>(_list26.size);
-        for (int _i27 = 0; _i27 < _list26.size; ++_i27)
-        {
-          FieldSchema _elem28 = new FieldSchema();
-          _elem28 = new FieldSchema();
-          _elem28.read(iprot);
-          this.partitionKeys.add(_elem28);
+        case TABLENAME:
+          if (field.type == TType.STRING) {
+            this.tableName = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case DBNAME:
+          if (field.type == TType.STRING) {
+            this.dbName = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case OWNER:
+          if (field.type == TType.STRING) {
+            this.owner = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case CREATETIME:
+          if (field.type == TType.I32) {
+            this.createTime = iprot.readI32();
+            this.__isset.createTime = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case LASTACCESSTIME:
+          if (field.type == TType.I32) {
+            this.lastAccessTime = iprot.readI32();
+            this.__isset.lastAccessTime = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case RETENTION:
+          if (field.type == TType.I32) {
+            this.retention = iprot.readI32();
+            this.__isset.retention = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case SD:
+          if (field.type == TType.STRUCT) {
+            this.sd = new StorageDescriptor();
+            this.sd.read(iprot);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case PARTITIONKEYS:
+          if (field.type == TType.LIST) {
+            {
+              TList _list26 = iprot.readListBegin();
+              this.partitionKeys = new ArrayList<FieldSchema>(_list26.size);
+              for (int _i27 = 0; _i27 < _list26.size; ++_i27)
+              {
+                FieldSchema _elem28;
+                _elem28 = new FieldSchema();
+                _elem28.read(iprot);
+                this.partitionKeys.add(_elem28);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case PARAMETERS:
+          if (field.type == TType.MAP) {
+            {
+              TMap _map29 = iprot.readMapBegin();
+              this.parameters = new HashMap<String,String>(2*_map29.size);
+              for (int _i30 = 0; _i30 < _map29.size; ++_i30)
+              {
+                String _key31;
+                String _val32;
+                _key31 = iprot.readString();
+                _val32 = iprot.readString();
+                this.parameters.put(_key31, _val32);
+              }
+              iprot.readMapEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.tableName != null) {
+      oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+      oprot.writeString(this.tableName);
+      oprot.writeFieldEnd();
+    }
+    if (this.dbName != null) {
+      oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+      oprot.writeString(this.dbName);
+      oprot.writeFieldEnd();
+    }
+    if (this.owner != null) {
+      oprot.writeFieldBegin(OWNER_FIELD_DESC);
+      oprot.writeString(this.owner);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
+    oprot.writeI32(this.createTime);
+    oprot.writeFieldEnd();
+    oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC);
+    oprot.writeI32(this.lastAccessTime);
+    oprot.writeFieldEnd();
+    oprot.writeFieldBegin(RETENTION_FIELD_DESC);
+    oprot.writeI32(this.retention);
+    oprot.writeFieldEnd();
+    if (this.sd != null) {
+      oprot.writeFieldBegin(SD_FIELD_DESC);
+      this.sd.write(oprot);
+      oprot.writeFieldEnd();
+    }
+    if (this.partitionKeys != null) {
+      oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC);
+      {
+        oprot.writeListBegin(new TList(TType.STRUCT, this.partitionKeys.size()));
+        for (FieldSchema _iter33 : this.partitionKeys)        {
+          _iter33.write(oprot);
         }
-        iprot.readListEnd();
+        oprot.writeListEnd();
       }
-      this.__isset.partitionKeys = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 9:
-    if (field.type == TType.MAP) {
+      oprot.writeFieldEnd();
+    }
+    if (this.parameters != null) {
+      oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
       {
-        TMap _map29 = iprot.readMapBegin();
-        this.parameters = new HashMap<String,String>(2*_map29.size);
-        for (int _i30 = 0; _i30 < _map29.size; ++_i30)
-        {
-          String _key31;
-          String _val32;
-          _key31 = iprot.readString();
-          _val32 = iprot.readString();
-          this.parameters.put(_key31, _val32);
+        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size()));
+        for (Map.Entry<String, String> _iter34 : this.parameters.entrySet())        {
+          oprot.writeString(_iter34.getKey());
+          oprot.writeString(_iter34.getValue());
         }
-        iprot.readMapEnd();
+        oprot.writeMapEnd();
       }
-      this.__isset.parameters = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  default:
-    TProtocolUtil.skip(iprot, field.type);
-    break;
-}
-iprot.readFieldEnd();
-}
-iprot.readStructEnd();
-}
-
-public void write(TProtocol oprot) throws TException {
-TStruct struct = new TStruct("Table");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.tableName != null) {
-field.name = "tableName";
-field.type = TType.STRING;
-field.id = 1;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.tableName);
-oprot.writeFieldEnd();
-}
-if (this.dbName != null) {
-field.name = "dbName";
-field.type = TType.STRING;
-field.id = 2;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.dbName);
-oprot.writeFieldEnd();
-}
-if (this.owner != null) {
-field.name = "owner";
-field.type = TType.STRING;
-field.id = 3;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.owner);
-oprot.writeFieldEnd();
-}
-field.name = "createTime";
-field.type = TType.I32;
-field.id = 4;
-oprot.writeFieldBegin(field);
-oprot.writeI32(this.createTime);
-oprot.writeFieldEnd();
-field.name = "lastAccessTime";
-field.type = TType.I32;
-field.id = 5;
-oprot.writeFieldBegin(field);
-oprot.writeI32(this.lastAccessTime);
-oprot.writeFieldEnd();
-field.name = "retention";
-field.type = TType.I32;
-field.id = 6;
-oprot.writeFieldBegin(field);
-oprot.writeI32(this.retention);
-oprot.writeFieldEnd();
-if (this.sd != null) {
-field.name = "sd";
-field.type = TType.STRUCT;
-field.id = 7;
-oprot.writeFieldBegin(field);
-this.sd.write(oprot);
-oprot.writeFieldEnd();
-}
-if (this.partitionKeys != null) {
-field.name = "partitionKeys";
-field.type = TType.LIST;
-field.id = 8;
-oprot.writeFieldBegin(field);
-{
-  oprot.writeListBegin(new TList(TType.STRUCT, this.partitionKeys.size()));
-  for (FieldSchema _iter33 : this.partitionKeys)  {
-    _iter33.write(oprot);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
   }
-  oprot.writeListEnd();
-}
-oprot.writeFieldEnd();
-}
-if (this.parameters != null) {
-field.name = "parameters";
-field.type = TType.MAP;
-field.id = 9;
-oprot.writeFieldBegin(field);
-{
-  oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size()));
-  for (String _iter34 : this.parameters.keySet())  {
-    oprot.writeString(_iter34);
-    oprot.writeString(this.parameters.get(_iter34));
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Table(");
+    boolean first = true;
+
+    sb.append("tableName:");
+    if (this.tableName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.tableName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("dbName:");
+    if (this.dbName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.dbName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("owner:");
+    if (this.owner == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.owner);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("createTime:");
+    sb.append(this.createTime);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("lastAccessTime:");
+    sb.append(this.lastAccessTime);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("retention:");
+    sb.append(this.retention);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("sd:");
+    if (this.sd == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.sd);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("partitionKeys:");
+    if (this.partitionKeys == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.partitionKeys);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("parameters:");
+    if (this.parameters == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.parameters);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
   }
-  oprot.writeMapEnd();
-}
-oprot.writeFieldEnd();
-}
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
 
-public String toString() {
-StringBuilder sb = new StringBuilder("Table(");
-sb.append("tableName:");
-sb.append(this.tableName);
-sb.append(",dbName:");
-sb.append(this.dbName);
-sb.append(",owner:");
-sb.append(this.owner);
-sb.append(",createTime:");
-sb.append(this.createTime);
-sb.append(",lastAccessTime:");
-sb.append(this.lastAccessTime);
-sb.append(",retention:");
-sb.append(this.retention);
-sb.append(",sd:");
-sb.append(this.sd);
-sb.append(",partitionKeys:");
-sb.append(this.partitionKeys);
-sb.append(",parameters:");
-sb.append(this.parameters);
-sb.append(")");
-return sb.toString();
-}
+  public void validate() throws TException {
+    // check for required fields
+    // check that fields of type enum have valid values
+  }
 
 }