hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r793758 [2/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...
Date Tue, 14 Jul 2009 00:01:08 GMT
Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java Tue Jul 14 00:01:05 2009
@@ -11,122 +11,201 @@
 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.*;
-
-public class InvalidOperationException extends Exception implements TBase, java.io.Serializable {
-private String message;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean message = false;
-}
-
-public InvalidOperationException() {
-}
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class InvalidOperationException extends Exception implements TBase, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("InvalidOperationException");
+  private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
+
+  private String message;
+  public static final int MESSAGE = 1;
+
+  private final Isset __isset = new Isset();
+  private static final class Isset implements java.io.Serializable {
+  }
+
+  public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+    put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+  }});
+
+  static {
+    FieldMetaData.addStructMetaDataMap(InvalidOperationException.class, metaDataMap);
+  }
+
+  public InvalidOperationException() {
+  }
+
+  public InvalidOperationException(
+    String message)
+  {
+    this();
+    this.message = message;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public InvalidOperationException(InvalidOperationException other) {
+    if (other.isSetMessage()) {
+      this.message = other.message;
+    }
+  }
 
-public InvalidOperationException(
-String message)
-{
-this();
-this.message = message;
-this.__isset.message = true;
-}
+  @Override
+  public InvalidOperationException clone() {
+    return new InvalidOperationException(this);
+  }
+
+  public String getMessage() {
+    return this.message;
+  }
+
+  public void setMessage(String message) {
+    this.message = message;
+  }
+
+  public void unsetMessage() {
+    this.message = null;
+  }
+
+  // Returns true if field message is set (has been asigned a value) and false otherwise
+  public boolean isSetMessage() {
+    return this.message != null;
+  }
+
+  public void setFieldValue(int fieldID, Object value) {
+    switch (fieldID) {
+    case MESSAGE:
+      if (value == null) {
+        unsetMessage();
+      } else {
+        setMessage((String)value);
+      }
+      break;
 
-public String getMessage() {
-return this.message;
-}
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public void setMessage(String message) {
-this.message = message;
-this.__isset.message = true;
-}
+  public Object getFieldValue(int fieldID) {
+    switch (fieldID) {
+    case MESSAGE:
+      return getMessage();
 
-public void unsetMessage() {
-this.__isset.message = false;
-}
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public boolean equals(Object that) {
-if (that == null)
-  return false;
-if (that instanceof InvalidOperationException)
-  return this.equals((InvalidOperationException)that);
-return false;
-}
+  // 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 MESSAGE:
+      return isSetMessage();
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public boolean equals(InvalidOperationException that) {
-if (that == null)
-  return false;
-
-boolean this_present_message = true && (this.message != null);
-boolean that_present_message = true && (that.message != null);
-if (this_present_message || that_present_message) {
-if (!(this_present_message && that_present_message))
-  return false;
-if (!this.message.equals(that.message))
-  return false;
-}
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof InvalidOperationException)
+      return this.equals((InvalidOperationException)that);
+    return false;
+  }
+
+  public boolean equals(InvalidOperationException that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_message = true && this.isSetMessage();
+    boolean that_present_message = true && that.isSetMessage();
+    if (this_present_message || that_present_message) {
+      if (!(this_present_message && that_present_message))
+        return false;
+      if (!this.message.equals(that.message))
+        return false;
+    }
 
-return true;
-}
+    return true;
+  }
 
-public int hashCode() {
-return 0;
-}
+  @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)
+      {
+        case MESSAGE:
+          if (field.type == TType.STRING) {
+            this.message = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
 
-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.message = iprot.readString();
-      this.__isset.message = true;
-    } 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 {
-TStruct struct = new TStruct("InvalidOperationException");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.message != null) {
-field.name = "message";
-field.type = TType.STRING;
-field.id = -1;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.message);
-oprot.writeFieldEnd();
-}
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
+  public void write(TProtocol oprot) throws TException {
+    validate();
 
-public String toString() {
-StringBuilder sb = new StringBuilder("InvalidOperationException(");
-sb.append("message:");
-sb.append(this.message);
-sb.append(")");
-return sb.toString();
-}
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.message != null) {
+      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+      oprot.writeString(this.message);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("InvalidOperationException(");
+    boolean first = true;
+
+    sb.append("message:");
+    if (this.message == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.message);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    // check that fields of type enum have valid values
+  }
 
 }
 

Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java Tue Jul 14 00:01:05 2009
@@ -11,122 +11,201 @@
 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.*;
-
-public class MetaException extends Exception implements TBase, java.io.Serializable {
-private String message;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean message = false;
-}
-
-public MetaException() {
-}
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class MetaException extends Exception implements TBase, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("MetaException");
+  private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
+
+  private String message;
+  public static final int MESSAGE = 1;
+
+  private final Isset __isset = new Isset();
+  private static final class Isset implements java.io.Serializable {
+  }
+
+  public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+    put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+  }});
+
+  static {
+    FieldMetaData.addStructMetaDataMap(MetaException.class, metaDataMap);
+  }
+
+  public MetaException() {
+  }
+
+  public MetaException(
+    String message)
+  {
+    this();
+    this.message = message;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public MetaException(MetaException other) {
+    if (other.isSetMessage()) {
+      this.message = other.message;
+    }
+  }
 
-public MetaException(
-String message)
-{
-this();
-this.message = message;
-this.__isset.message = true;
-}
+  @Override
+  public MetaException clone() {
+    return new MetaException(this);
+  }
+
+  public String getMessage() {
+    return this.message;
+  }
+
+  public void setMessage(String message) {
+    this.message = message;
+  }
+
+  public void unsetMessage() {
+    this.message = null;
+  }
+
+  // Returns true if field message is set (has been asigned a value) and false otherwise
+  public boolean isSetMessage() {
+    return this.message != null;
+  }
+
+  public void setFieldValue(int fieldID, Object value) {
+    switch (fieldID) {
+    case MESSAGE:
+      if (value == null) {
+        unsetMessage();
+      } else {
+        setMessage((String)value);
+      }
+      break;
 
-public String getMessage() {
-return this.message;
-}
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public void setMessage(String message) {
-this.message = message;
-this.__isset.message = true;
-}
+  public Object getFieldValue(int fieldID) {
+    switch (fieldID) {
+    case MESSAGE:
+      return getMessage();
 
-public void unsetMessage() {
-this.__isset.message = false;
-}
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public boolean equals(Object that) {
-if (that == null)
-  return false;
-if (that instanceof MetaException)
-  return this.equals((MetaException)that);
-return false;
-}
+  // 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 MESSAGE:
+      return isSetMessage();
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public boolean equals(MetaException that) {
-if (that == null)
-  return false;
-
-boolean this_present_message = true && (this.message != null);
-boolean that_present_message = true && (that.message != null);
-if (this_present_message || that_present_message) {
-if (!(this_present_message && that_present_message))
-  return false;
-if (!this.message.equals(that.message))
-  return false;
-}
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof MetaException)
+      return this.equals((MetaException)that);
+    return false;
+  }
+
+  public boolean equals(MetaException that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_message = true && this.isSetMessage();
+    boolean that_present_message = true && that.isSetMessage();
+    if (this_present_message || that_present_message) {
+      if (!(this_present_message && that_present_message))
+        return false;
+      if (!this.message.equals(that.message))
+        return false;
+    }
 
-return true;
-}
+    return true;
+  }
 
-public int hashCode() {
-return 0;
-}
+  @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)
+      {
+        case MESSAGE:
+          if (field.type == TType.STRING) {
+            this.message = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
 
-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.message = iprot.readString();
-      this.__isset.message = true;
-    } 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 {
-TStruct struct = new TStruct("MetaException");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.message != null) {
-field.name = "message";
-field.type = TType.STRING;
-field.id = -1;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.message);
-oprot.writeFieldEnd();
-}
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
+  public void write(TProtocol oprot) throws TException {
+    validate();
 
-public String toString() {
-StringBuilder sb = new StringBuilder("MetaException(");
-sb.append("message:");
-sb.append(this.message);
-sb.append(")");
-return sb.toString();
-}
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.message != null) {
+      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+      oprot.writeString(this.message);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("MetaException(");
+    boolean first = true;
+
+    sb.append("message:");
+    if (this.message == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.message);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    // check that fields of type enum have valid values
+  }
 
 }
 

Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java Tue Jul 14 00:01:05 2009
@@ -11,122 +11,201 @@
 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.*;
-
-public class NoSuchObjectException extends Exception implements TBase, java.io.Serializable {
-private String message;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean message = false;
-}
-
-public NoSuchObjectException() {
-}
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class NoSuchObjectException extends Exception implements TBase, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("NoSuchObjectException");
+  private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
+
+  private String message;
+  public static final int MESSAGE = 1;
+
+  private final Isset __isset = new Isset();
+  private static final class Isset implements java.io.Serializable {
+  }
+
+  public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+    put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+  }});
+
+  static {
+    FieldMetaData.addStructMetaDataMap(NoSuchObjectException.class, metaDataMap);
+  }
+
+  public NoSuchObjectException() {
+  }
+
+  public NoSuchObjectException(
+    String message)
+  {
+    this();
+    this.message = message;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public NoSuchObjectException(NoSuchObjectException other) {
+    if (other.isSetMessage()) {
+      this.message = other.message;
+    }
+  }
 
-public NoSuchObjectException(
-String message)
-{
-this();
-this.message = message;
-this.__isset.message = true;
-}
+  @Override
+  public NoSuchObjectException clone() {
+    return new NoSuchObjectException(this);
+  }
+
+  public String getMessage() {
+    return this.message;
+  }
+
+  public void setMessage(String message) {
+    this.message = message;
+  }
+
+  public void unsetMessage() {
+    this.message = null;
+  }
+
+  // Returns true if field message is set (has been asigned a value) and false otherwise
+  public boolean isSetMessage() {
+    return this.message != null;
+  }
+
+  public void setFieldValue(int fieldID, Object value) {
+    switch (fieldID) {
+    case MESSAGE:
+      if (value == null) {
+        unsetMessage();
+      } else {
+        setMessage((String)value);
+      }
+      break;
 
-public String getMessage() {
-return this.message;
-}
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public void setMessage(String message) {
-this.message = message;
-this.__isset.message = true;
-}
+  public Object getFieldValue(int fieldID) {
+    switch (fieldID) {
+    case MESSAGE:
+      return getMessage();
 
-public void unsetMessage() {
-this.__isset.message = false;
-}
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public boolean equals(Object that) {
-if (that == null)
-  return false;
-if (that instanceof NoSuchObjectException)
-  return this.equals((NoSuchObjectException)that);
-return false;
-}
+  // 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 MESSAGE:
+      return isSetMessage();
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public boolean equals(NoSuchObjectException that) {
-if (that == null)
-  return false;
-
-boolean this_present_message = true && (this.message != null);
-boolean that_present_message = true && (that.message != null);
-if (this_present_message || that_present_message) {
-if (!(this_present_message && that_present_message))
-  return false;
-if (!this.message.equals(that.message))
-  return false;
-}
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof NoSuchObjectException)
+      return this.equals((NoSuchObjectException)that);
+    return false;
+  }
+
+  public boolean equals(NoSuchObjectException that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_message = true && this.isSetMessage();
+    boolean that_present_message = true && that.isSetMessage();
+    if (this_present_message || that_present_message) {
+      if (!(this_present_message && that_present_message))
+        return false;
+      if (!this.message.equals(that.message))
+        return false;
+    }
 
-return true;
-}
+    return true;
+  }
 
-public int hashCode() {
-return 0;
-}
+  @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)
+      {
+        case MESSAGE:
+          if (field.type == TType.STRING) {
+            this.message = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
 
-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.message = iprot.readString();
-      this.__isset.message = true;
-    } 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 {
-TStruct struct = new TStruct("NoSuchObjectException");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.message != null) {
-field.name = "message";
-field.type = TType.STRING;
-field.id = -1;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.message);
-oprot.writeFieldEnd();
-}
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
+  public void write(TProtocol oprot) throws TException {
+    validate();
 
-public String toString() {
-StringBuilder sb = new StringBuilder("NoSuchObjectException(");
-sb.append("message:");
-sb.append(this.message);
-sb.append(")");
-return sb.toString();
-}
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.message != null) {
+      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+      oprot.writeString(this.message);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("NoSuchObjectException(");
+    boolean first = true;
+
+    sb.append("message:");
+    if (this.message == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.message);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    // check that fields of type enum have valid values
+  }
 
 }
 

Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java Tue Jul 14 00:01:05 2009
@@ -11,165 +11,267 @@
 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.*;
-
-public class Order implements TBase, java.io.Serializable {
-private String col;
-private int order;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean col = false;
-public boolean order = false;
-}
-
-public Order() {
-}
-
-public Order(
-String col,
-int order)
-{
-this();
-this.col = col;
-this.__isset.col = true;
-this.order = order;
-this.__isset.order = true;
-}
-
-public String getCol() {
-return this.col;
-}
-
-public void setCol(String col) {
-this.col = col;
-this.__isset.col = true;
-}
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class Order implements TBase, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Order");
+  private static final TField COL_FIELD_DESC = new TField("col", TType.STRING, (short)1);
+  private static final TField ORDER_FIELD_DESC = new TField("order", TType.I32, (short)2);
+
+  private String col;
+  public static final int COL = 1;
+  private int order;
+  public static final int ORDER = 2;
+
+  private final Isset __isset = new Isset();
+  private static final class Isset implements java.io.Serializable {
+    public boolean order = false;
+  }
+
+  public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+    put(COL, new FieldMetaData("col", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    put(ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.I32)));
+  }});
+
+  static {
+    FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
+  }
+
+  public Order() {
+  }
+
+  public Order(
+    String col,
+    int order)
+  {
+    this();
+    this.col = col;
+    this.order = order;
+    this.__isset.order = true;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Order(Order other) {
+    if (other.isSetCol()) {
+      this.col = other.col;
+    }
+    __isset.order = other.__isset.order;
+    this.order = other.order;
+  }
+
+  @Override
+  public Order clone() {
+    return new Order(this);
+  }
+
+  public String getCol() {
+    return this.col;
+  }
+
+  public void setCol(String col) {
+    this.col = col;
+  }
+
+  public void unsetCol() {
+    this.col = null;
+  }
+
+  // Returns true if field col is set (has been asigned a value) and false otherwise
+  public boolean isSetCol() {
+    return this.col != null;
+  }
+
+  public int getOrder() {
+    return this.order;
+  }
+
+  public void setOrder(int order) {
+    this.order = order;
+    this.__isset.order = true;
+  }
+
+  public void unsetOrder() {
+    this.__isset.order = false;
+  }
+
+  // Returns true if field order is set (has been asigned a value) and false otherwise
+  public boolean isSetOrder() {
+    return this.__isset.order;
+  }
+
+  public void setFieldValue(int fieldID, Object value) {
+    switch (fieldID) {
+    case COL:
+      if (value == null) {
+        unsetCol();
+      } else {
+        setCol((String)value);
+      }
+      break;
+
+    case ORDER:
+      if (value == null) {
+        unsetOrder();
+      } else {
+        setOrder((Integer)value);
+      }
+      break;
 
-public void unsetCol() {
-this.__isset.col = false;
-}
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public int getOrder() {
-return this.order;
-}
+  public Object getFieldValue(int fieldID) {
+    switch (fieldID) {
+    case COL:
+      return getCol();
 
-public void setOrder(int order) {
-this.order = order;
-this.__isset.order = true;
-}
+    case ORDER:
+      return new Integer(getOrder());
 
-public void unsetOrder() {
-this.__isset.order = false;
-}
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public boolean equals(Object that) {
-if (that == null)
-  return false;
-if (that instanceof Order)
-  return this.equals((Order)that);
-return false;
-}
+  // 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 COL:
+      return isSetCol();
+    case ORDER:
+      return isSetOrder();
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
 
-public boolean equals(Order that) {
-if (that == null)
-  return false;
-
-boolean this_present_col = true && (this.col != null);
-boolean that_present_col = true && (that.col != null);
-if (this_present_col || that_present_col) {
-if (!(this_present_col && that_present_col))
-  return false;
-if (!this.col.equals(that.col))
-  return false;
-}
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Order)
+      return this.equals((Order)that);
+    return false;
+  }
+
+  public boolean equals(Order that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_col = true && this.isSetCol();
+    boolean that_present_col = true && that.isSetCol();
+    if (this_present_col || that_present_col) {
+      if (!(this_present_col && that_present_col))
+        return false;
+      if (!this.col.equals(that.col))
+        return false;
+    }
 
-boolean this_present_order = true;
-boolean that_present_order = true;
-if (this_present_order || that_present_order) {
-if (!(this_present_order && that_present_order))
-  return false;
-if (this.order != that.order)
-  return false;
-}
+    boolean this_present_order = true;
+    boolean that_present_order = true;
+    if (this_present_order || that_present_order) {
+      if (!(this_present_order && that_present_order))
+        return false;
+      if (this.order != that.order)
+        return false;
+    }
 
-return true;
-}
+    return true;
+  }
 
-public int hashCode() {
-return 0;
-}
+  @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)
+      {
+        case COL:
+          if (field.type == TType.STRING) {
+            this.col = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case ORDER:
+          if (field.type == TType.I32) {
+            this.order = iprot.readI32();
+            this.__isset.order = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
 
-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.col = iprot.readString();
-      this.__isset.col = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 2:
-    if (field.type == TType.I32) {
-      this.order = iprot.readI32();
-      this.__isset.order = true;
-    } 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 {
-TStruct struct = new TStruct("Order");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.col != null) {
-field.name = "col";
-field.type = TType.STRING;
-field.id = 1;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.col);
-oprot.writeFieldEnd();
-}
-field.name = "order";
-field.type = TType.I32;
-field.id = 2;
-oprot.writeFieldBegin(field);
-oprot.writeI32(this.order);
-oprot.writeFieldEnd();
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
+  public void write(TProtocol oprot) throws TException {
+    validate();
 
-public String toString() {
-StringBuilder sb = new StringBuilder("Order(");
-sb.append("col:");
-sb.append(this.col);
-sb.append(",order:");
-sb.append(this.order);
-sb.append(")");
-return sb.toString();
-}
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.col != null) {
+      oprot.writeFieldBegin(COL_FIELD_DESC);
+      oprot.writeString(this.col);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(ORDER_FIELD_DESC);
+    oprot.writeI32(this.order);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Order(");
+    boolean first = true;
+
+    sb.append("col:");
+    if (this.col == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.col);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("order:");
+    sb.append(this.order);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    // check that fields of type enum have valid values
+  }
 
 }
 

Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java Tue Jul 14 00:01:05 2009
@@ -11,455 +11,690 @@
 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 Partition implements TBase, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Partition");
+  private static final TField VALUES_FIELD_DESC = new TField("values", TType.LIST, (short)1);
+  private static final TField DB_NAME_FIELD_DESC = new TField("dbName", TType.STRING, (short)2);
+  private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", 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 SD_FIELD_DESC = new TField("sd", TType.STRUCT, (short)6);
+  private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)7);
+
+  private List<String> values;
+  public static final int VALUES = 1;
+  private String dbName;
+  public static final int DBNAME = 2;
+  private String tableName;
+  public static final int TABLENAME = 3;
+  private int createTime;
+  public static final int CREATETIME = 4;
+  private int lastAccessTime;
+  public static final int LASTACCESSTIME = 5;
+  private StorageDescriptor sd;
+  public static final int SD = 6;
+  private Map<String,String> parameters;
+  public static final int PARAMETERS = 7;
+
+  private final Isset __isset = new Isset();
+  private static final class Isset implements java.io.Serializable {
+    public boolean createTime = false;
+    public boolean lastAccessTime = false;
+  }
 
-public class Partition implements TBase, java.io.Serializable {
-private List<String> values;
-private String dbName;
-private String tableName;
-private int createTime;
-private int lastAccessTime;
-private StorageDescriptor sd;
-private Map<String,String> parameters;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean values = false;
-public boolean dbName = false;
-public boolean tableName = false;
-public boolean createTime = false;
-public boolean lastAccessTime = false;
-public boolean sd = false;
-public boolean parameters = false;
-}
+  public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+    put(VALUES, new FieldMetaData("values", TFieldRequirementType.DEFAULT, 
+        new ListMetaData(TType.LIST, 
+            new FieldValueMetaData(TType.STRING))));
+    put(DBNAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    put(TABLENAME, new FieldMetaData("tableName", 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(SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, 
+        new StructMetaData(TType.STRUCT, StorageDescriptor.class)));
+    put(PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, 
+        new MapMetaData(TType.MAP, 
+            new FieldValueMetaData(TType.STRING), 
+            new FieldValueMetaData(TType.STRING))));
+  }});
 
-public Partition() {
-}
+  static {
+    FieldMetaData.addStructMetaDataMap(Partition.class, metaDataMap);
+  }
 
-public Partition(
-List<String> values,
-String dbName,
-String tableName,
-int createTime,
-int lastAccessTime,
-StorageDescriptor sd,
-Map<String,String> parameters)
-{
-this();
-this.values = values;
-this.__isset.values = true;
-this.dbName = dbName;
-this.__isset.dbName = true;
-this.tableName = tableName;
-this.__isset.tableName = true;
-this.createTime = createTime;
-this.__isset.createTime = true;
-this.lastAccessTime = lastAccessTime;
-this.__isset.lastAccessTime = true;
-this.sd = sd;
-this.__isset.sd = true;
-this.parameters = parameters;
-this.__isset.parameters = true;
-}
+  public Partition() {
+  }
 
-public int getValuesSize() {
-return (this.values == null) ? 0 : this.values.size();
-}
+  public Partition(
+    List<String> values,
+    String dbName,
+    String tableName,
+    int createTime,
+    int lastAccessTime,
+    StorageDescriptor sd,
+    Map<String,String> parameters)
+  {
+    this();
+    this.values = values;
+    this.dbName = dbName;
+    this.tableName = tableName;
+    this.createTime = createTime;
+    this.__isset.createTime = true;
+    this.lastAccessTime = lastAccessTime;
+    this.__isset.lastAccessTime = true;
+    this.sd = sd;
+    this.parameters = parameters;
+  }
 
-public java.util.Iterator<String> getValuesIterator() {
-return (this.values == null) ? null : this.values.iterator();
-}
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Partition(Partition other) {
+    if (other.isSetValues()) {
+      List<String> __this__values = new ArrayList<String>();
+      for (String other_element : other.values) {
+        __this__values.add(other_element);
+      }
+      this.values = __this__values;
+    }
+    if (other.isSetDbName()) {
+      this.dbName = other.dbName;
+    }
+    if (other.isSetTableName()) {
+      this.tableName = other.tableName;
+    }
+    __isset.createTime = other.__isset.createTime;
+    this.createTime = other.createTime;
+    __isset.lastAccessTime = other.__isset.lastAccessTime;
+    this.lastAccessTime = other.lastAccessTime;
+    if (other.isSetSd()) {
+      this.sd = new StorageDescriptor(other.sd);
+    }
+    if (other.isSetParameters()) {
+      Map<String,String> __this__parameters = new HashMap<String,String>();
+      for (Map.Entry<String, String> other_element : other.parameters.entrySet()) {
 
-public void addToValues(String elem) {
-if (this.values == null) {
-this.values = new ArrayList<String>();
-}
-this.values.add(elem);
-this.__isset.values = true;
-}
+        String other_element_key = other_element.getKey();
+        String other_element_value = other_element.getValue();
 
-public List<String> getValues() {
-return this.values;
-}
+        String __this__parameters_copy_key = other_element_key;
 
-public void setValues(List<String> values) {
-this.values = values;
-this.__isset.values = true;
-}
+        String __this__parameters_copy_value = other_element_value;
 
-public void unsetValues() {
-this.values = null;
-this.__isset.values = false;
-}
+        __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value);
+      }
+      this.parameters = __this__parameters;
+    }
+  }
 
-public String getDbName() {
-return this.dbName;
-}
+  @Override
+  public Partition clone() {
+    return new Partition(this);
+  }
 
-public void setDbName(String dbName) {
-this.dbName = dbName;
-this.__isset.dbName = true;
-}
+  public int getValuesSize() {
+    return (this.values == null) ? 0 : this.values.size();
+  }
 
-public void unsetDbName() {
-this.__isset.dbName = false;
-}
+  public java.util.Iterator<String> getValuesIterator() {
+    return (this.values == null) ? null : this.values.iterator();
+  }
 
-public String getTableName() {
-return this.tableName;
-}
+  public void addToValues(String elem) {
+    if (this.values == null) {
+      this.values = new ArrayList<String>();
+    }
+    this.values.add(elem);
+  }
 
-public void setTableName(String tableName) {
-this.tableName = tableName;
-this.__isset.tableName = true;
-}
+  public List<String> getValues() {
+    return this.values;
+  }
 
-public void unsetTableName() {
-this.__isset.tableName = false;
-}
+  public void setValues(List<String> values) {
+    this.values = values;
+  }
 
-public int getCreateTime() {
-return this.createTime;
-}
+  public void unsetValues() {
+    this.values = null;
+  }
 
-public void setCreateTime(int createTime) {
-this.createTime = createTime;
-this.__isset.createTime = true;
-}
+  // Returns true if field values is set (has been asigned a value) and false otherwise
+  public boolean isSetValues() {
+    return this.values != 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 StorageDescriptor getSd() {
-return this.sd;
-}
+  public String getTableName() {
+    return this.tableName;
+  }
 
-public void setSd(StorageDescriptor sd) {
-this.sd = sd;
-this.__isset.sd = true;
-}
+  public void setTableName(String tableName) {
+    this.tableName = tableName;
+  }
 
-public void unsetSd() {
-this.sd = null;
-this.__isset.sd = false;
-}
+  public void unsetTableName() {
+    this.tableName = null;
+  }
 
-public int getParametersSize() {
-return (this.parameters == null) ? 0 : this.parameters.size();
-}
+  // Returns true if field tableName is set (has been asigned a value) and false otherwise
+  public boolean isSetTableName() {
+    return this.tableName != null;
+  }
 
-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 int getCreateTime() {
+    return this.createTime;
+  }
 
-public Map<String,String> getParameters() {
-return this.parameters;
-}
+  public void setCreateTime(int createTime) {
+    this.createTime = createTime;
+    this.__isset.createTime = true;
+  }
 
-public void setParameters(Map<String,String> parameters) {
-this.parameters = parameters;
-this.__isset.parameters = true;
-}
+  public void unsetCreateTime() {
+    this.__isset.createTime = false;
+  }
 
-public void unsetParameters() {
-this.parameters = null;
-this.__isset.parameters = false;
-}
+  // Returns true if field createTime is set (has been asigned a value) and false otherwise
+  public boolean isSetCreateTime() {
+    return this.__isset.createTime;
+  }
 
-public boolean equals(Object that) {
-if (that == null)
-  return false;
-if (that instanceof Partition)
-  return this.equals((Partition)that);
-return false;
-}
+  public int getLastAccessTime() {
+    return this.lastAccessTime;
+  }
 
-public boolean equals(Partition that) {
-if (that == null)
-  return false;
-
-boolean this_present_values = true && (this.values != null);
-boolean that_present_values = true && (that.values != null);
-if (this_present_values || that_present_values) {
-if (!(this_present_values && that_present_values))
-  return false;
-if (!this.values.equals(that.values))
-  return false;
-}
+  public void setLastAccessTime(int lastAccessTime) {
+    this.lastAccessTime = lastAccessTime;
+    this.__isset.lastAccessTime = true;
+  }
 
-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;
-}
+  public void unsetLastAccessTime() {
+    this.__isset.lastAccessTime = 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;
-}
+  // Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise
+  public boolean isSetLastAccessTime() {
+    return this.__isset.lastAccessTime;
+  }
 
-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 StorageDescriptor getSd() {
+    return this.sd;
+  }
 
-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 setSd(StorageDescriptor sd) {
+    this.sd = sd;
+  }
 
-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 unsetSd() {
+    this.sd = 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 sd is set (has been asigned a value) and false otherwise
+  public boolean isSetSd() {
+    return this.sd != 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.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 VALUES:
+      if (value == null) {
+        unsetValues();
+      } else {
+        setValues((List<String>)value);
+      }
+      break;
+
+    case DBNAME:
+      if (value == null) {
+        unsetDbName();
+      } else {
+        setDbName((String)value);
+      }
+      break;
+
+    case TABLENAME:
+      if (value == null) {
+        unsetTableName();
+      } else {
+        setTableName((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 SD:
+      if (value == null) {
+        unsetSd();
+      } else {
+        setSd((StorageDescriptor)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 VALUES:
+      return getValues();
+
+    case DBNAME:
+      return getDbName();
+
+    case TABLENAME:
+      return getTableName();
+
+    case CREATETIME:
+      return new Integer(getCreateTime());
+
+    case LASTACCESSTIME:
+      return new Integer(getLastAccessTime());
+
+    case SD:
+      return getSd();
+
+    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 VALUES:
+      return isSetValues();
+    case DBNAME:
+      return isSetDbName();
+    case TABLENAME:
+      return isSetTableName();
+    case CREATETIME:
+      return isSetCreateTime();
+    case LASTACCESSTIME:
+      return isSetLastAccessTime();
+    case SD:
+      return isSetSd();
+    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 Partition)
+      return this.equals((Partition)that);
+    return false;
+  }
+
+  public boolean equals(Partition that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_values = true && this.isSetValues();
+    boolean that_present_values = true && that.isSetValues();
+    if (this_present_values || that_present_values) {
+      if (!(this_present_values && that_present_values))
+        return false;
+      if (!this.values.equals(that.values))
+        return false;
+    }
+
+    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_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_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_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_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 _list35 = iprot.readListBegin();
-        this.values = new ArrayList<String>(_list35.size);
-        for (int _i36 = 0; _i36 < _list35.size; ++_i36)
-        {
-          String _elem37 = null;
-          _elem37 = iprot.readString();
-          this.values.add(_elem37);
+        case VALUES:
+          if (field.type == TType.LIST) {
+            {
+              TList _list35 = iprot.readListBegin();
+              this.values = new ArrayList<String>(_list35.size);
+              for (int _i36 = 0; _i36 < _list35.size; ++_i36)
+              {
+                String _elem37;
+                _elem37 = iprot.readString();
+                this.values.add(_elem37);
+              }
+              iprot.readListEnd();
+            }
+          } 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 TABLENAME:
+          if (field.type == TType.STRING) {
+            this.tableName = 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 SD:
+          if (field.type == TType.STRUCT) {
+            this.sd = new StorageDescriptor();
+            this.sd.read(iprot);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case PARAMETERS:
+          if (field.type == TType.MAP) {
+            {
+              TMap _map38 = iprot.readMapBegin();
+              this.parameters = new HashMap<String,String>(2*_map38.size);
+              for (int _i39 = 0; _i39 < _map38.size; ++_i39)
+              {
+                String _key40;
+                String _val41;
+                _key40 = iprot.readString();
+                _val41 = iprot.readString();
+                this.parameters.put(_key40, _val41);
+              }
+              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.values != null) {
+      oprot.writeFieldBegin(VALUES_FIELD_DESC);
+      {
+        oprot.writeListBegin(new TList(TType.STRING, this.values.size()));
+        for (String _iter42 : this.values)        {
+          oprot.writeString(_iter42);
         }
-        iprot.readListEnd();
+        oprot.writeListEnd();
       }
-      this.__isset.values = 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.tableName = iprot.readString();
-      this.__isset.tableName = 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.STRUCT) {
-      this.sd = new StorageDescriptor();
-      this.sd.read(iprot);
-      this.__isset.sd = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 7:
-    if (field.type == TType.MAP) {
+      oprot.writeFieldEnd();
+    }
+    if (this.dbName != null) {
+      oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+      oprot.writeString(this.dbName);
+      oprot.writeFieldEnd();
+    }
+    if (this.tableName != null) {
+      oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+      oprot.writeString(this.tableName);
+      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();
+    if (this.sd != null) {
+      oprot.writeFieldBegin(SD_FIELD_DESC);
+      this.sd.write(oprot);
+      oprot.writeFieldEnd();
+    }
+    if (this.parameters != null) {
+      oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
       {
-        TMap _map38 = iprot.readMapBegin();
-        this.parameters = new HashMap<String,String>(2*_map38.size);
-        for (int _i39 = 0; _i39 < _map38.size; ++_i39)
-        {
-          String _key40;
-          String _val41;
-          _key40 = iprot.readString();
-          _val41 = iprot.readString();
-          this.parameters.put(_key40, _val41);
+        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size()));
+        for (Map.Entry<String, String> _iter43 : this.parameters.entrySet())        {
+          oprot.writeString(_iter43.getKey());
+          oprot.writeString(_iter43.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("Partition");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.values != null) {
-field.name = "values";
-field.type = TType.LIST;
-field.id = 1;
-oprot.writeFieldBegin(field);
-{
-  oprot.writeListBegin(new TList(TType.STRING, this.values.size()));
-  for (String _iter42 : this.values)  {
-    oprot.writeString(_iter42);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
   }
-  oprot.writeListEnd();
-}
-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.tableName != null) {
-field.name = "tableName";
-field.type = TType.STRING;
-field.id = 3;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.tableName);
-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();
-if (this.sd != null) {
-field.name = "sd";
-field.type = TType.STRUCT;
-field.id = 6;
-oprot.writeFieldBegin(field);
-this.sd.write(oprot);
-oprot.writeFieldEnd();
-}
-if (this.parameters != null) {
-field.name = "parameters";
-field.type = TType.MAP;
-field.id = 7;
-oprot.writeFieldBegin(field);
-{
-  oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size()));
-  for (String _iter43 : this.parameters.keySet())  {
-    oprot.writeString(_iter43);
-    oprot.writeString(this.parameters.get(_iter43));
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Partition(");
+    boolean first = true;
+
+    sb.append("values:");
+    if (this.values == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.values);
+    }
+    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("tableName:");
+    if (this.tableName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.tableName);
+    }
+    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("sd:");
+    if (this.sd == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.sd);
+    }
+    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("Partition(");
-sb.append("values:");
-sb.append(this.values);
-sb.append(",dbName:");
-sb.append(this.dbName);
-sb.append(",tableName:");
-sb.append(this.tableName);
-sb.append(",createTime:");
-sb.append(this.createTime);
-sb.append(",lastAccessTime:");
-sb.append(this.lastAccessTime);
-sb.append(",sd:");
-sb.append(this.sd);
-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
+  }
 
 }
 

Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java Tue Jul 14 00:01:05 2009
@@ -11,233 +11,351 @@
 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 Schema implements TBase, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Schema");
+  private static final TField FIELD_SCHEMAS_FIELD_DESC = new TField("fieldSchemas", TType.LIST, (short)1);
+  private static final TField PROPERTIES_FIELD_DESC = new TField("properties", TType.MAP, (short)2);
+
+  private List<FieldSchema> fieldSchemas;
+  public static final int FIELDSCHEMAS = 1;
+  private Map<String,String> properties;
+  public static final int PROPERTIES = 2;
 
-public class Schema implements TBase, java.io.Serializable {
-private List<FieldSchema> fieldSchemas;
-private Map<String,String> properties;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean fieldSchemas = false;
-public boolean properties = false;
-}
+  private final Isset __isset = new Isset();
+  private static final class Isset implements java.io.Serializable {
+  }
 
-public Schema() {
-}
+  public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+    put(FIELDSCHEMAS, new FieldMetaData("fieldSchemas", TFieldRequirementType.DEFAULT, 
+        new ListMetaData(TType.LIST, 
+            new StructMetaData(TType.STRUCT, FieldSchema.class))));
+    put(PROPERTIES, new FieldMetaData("properties", TFieldRequirementType.DEFAULT, 
+        new MapMetaData(TType.MAP, 
+            new FieldValueMetaData(TType.STRING), 
+            new FieldValueMetaData(TType.STRING))));
+  }});
 
-public Schema(
-List<FieldSchema> fieldSchemas,
-Map<String,String> properties)
-{
-this();
-this.fieldSchemas = fieldSchemas;
-this.__isset.fieldSchemas = true;
-this.properties = properties;
-this.__isset.properties = true;
-}
+  static {
+    FieldMetaData.addStructMetaDataMap(Schema.class, metaDataMap);
+  }
 
-public int getFieldSchemasSize() {
-return (this.fieldSchemas == null) ? 0 : this.fieldSchemas.size();
-}
+  public Schema() {
+  }
 
-public java.util.Iterator<FieldSchema> getFieldSchemasIterator() {
-return (this.fieldSchemas == null) ? null : this.fieldSchemas.iterator();
-}
+  public Schema(
+    List<FieldSchema> fieldSchemas,
+    Map<String,String> properties)
+  {
+    this();
+    this.fieldSchemas = fieldSchemas;
+    this.properties = properties;
+  }
 
-public void addToFieldSchemas(FieldSchema elem) {
-if (this.fieldSchemas == null) {
-this.fieldSchemas = new ArrayList<FieldSchema>();
-}
-this.fieldSchemas.add(elem);
-this.__isset.fieldSchemas = true;
-}
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Schema(Schema other) {
+    if (other.isSetFieldSchemas()) {
+      List<FieldSchema> __this__fieldSchemas = new ArrayList<FieldSchema>();
+      for (FieldSchema other_element : other.fieldSchemas) {
+        __this__fieldSchemas.add(new FieldSchema(other_element));
+      }
+      this.fieldSchemas = __this__fieldSchemas;
+    }
+    if (other.isSetProperties()) {
+      Map<String,String> __this__properties = new HashMap<String,String>();
+      for (Map.Entry<String, String> other_element : other.properties.entrySet()) {
 
-public List<FieldSchema> getFieldSchemas() {
-return this.fieldSchemas;
-}
+        String other_element_key = other_element.getKey();
+        String other_element_value = other_element.getValue();
 
-public void setFieldSchemas(List<FieldSchema> fieldSchemas) {
-this.fieldSchemas = fieldSchemas;
-this.__isset.fieldSchemas = true;
-}
+        String __this__properties_copy_key = other_element_key;
 
-public void unsetFieldSchemas() {
-this.fieldSchemas = null;
-this.__isset.fieldSchemas = false;
-}
+        String __this__properties_copy_value = other_element_value;
 
-public int getPropertiesSize() {
-return (this.properties == null) ? 0 : this.properties.size();
-}
+        __this__properties.put(__this__properties_copy_key, __this__properties_copy_value);
+      }
+      this.properties = __this__properties;
+    }
+  }
 
-public void putToProperties(String key, String val) {
-if (this.properties == null) {
-this.properties = new HashMap<String,String>();
-}
-this.properties.put(key, val);
-this.__isset.properties = true;
-}
+  @Override
+  public Schema clone() {
+    return new Schema(this);
+  }
 
-public Map<String,String> getProperties() {
-return this.properties;
-}
+  public int getFieldSchemasSize() {
+    return (this.fieldSchemas == null) ? 0 : this.fieldSchemas.size();
+  }
 
-public void setProperties(Map<String,String> properties) {
-this.properties = properties;
-this.__isset.properties = true;
-}
+  public java.util.Iterator<FieldSchema> getFieldSchemasIterator() {
+    return (this.fieldSchemas == null) ? null : this.fieldSchemas.iterator();
+  }
 
-public void unsetProperties() {
-this.properties = null;
-this.__isset.properties = false;
-}
+  public void addToFieldSchemas(FieldSchema elem) {
+    if (this.fieldSchemas == null) {
+      this.fieldSchemas = new ArrayList<FieldSchema>();
+    }
+    this.fieldSchemas.add(elem);
+  }
 
-public boolean equals(Object that) {
-if (that == null)
-  return false;
-if (that instanceof Schema)
-  return this.equals((Schema)that);
-return false;
-}
+  public List<FieldSchema> getFieldSchemas() {
+    return this.fieldSchemas;
+  }
 
-public boolean equals(Schema that) {
-if (that == null)
-  return false;
-
-boolean this_present_fieldSchemas = true && (this.fieldSchemas != null);
-boolean that_present_fieldSchemas = true && (that.fieldSchemas != null);
-if (this_present_fieldSchemas || that_present_fieldSchemas) {
-if (!(this_present_fieldSchemas && that_present_fieldSchemas))
-  return false;
-if (!this.fieldSchemas.equals(that.fieldSchemas))
-  return false;
-}
+  public void setFieldSchemas(List<FieldSchema> fieldSchemas) {
+    this.fieldSchemas = fieldSchemas;
+  }
 
-boolean this_present_properties = true && (this.properties != null);
-boolean that_present_properties = true && (that.properties != null);
-if (this_present_properties || that_present_properties) {
-if (!(this_present_properties && that_present_properties))
-  return false;
-if (!this.properties.equals(that.properties))
-  return false;
-}
+  public void unsetFieldSchemas() {
+    this.fieldSchemas = null;
+  }
 
-return true;
-}
+  // Returns true if field fieldSchemas is set (has been asigned a value) and false otherwise
+  public boolean isSetFieldSchemas() {
+    return this.fieldSchemas != null;
+  }
 
-public int hashCode() {
-return 0;
-}
+  public int getPropertiesSize() {
+    return (this.properties == null) ? 0 : this.properties.size();
+  }
 
-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.LIST) {
+  public void putToProperties(String key, String val) {
+    if (this.properties == null) {
+      this.properties = new HashMap<String,String>();
+    }
+    this.properties.put(key, val);
+  }
+
+  public Map<String,String> getProperties() {
+    return this.properties;
+  }
+
+  public void setProperties(Map<String,String> properties) {
+    this.properties = properties;
+  }
+
+  public void unsetProperties() {
+    this.properties = null;
+  }
+
+  // Returns true if field properties is set (has been asigned a value) and false otherwise
+  public boolean isSetProperties() {
+    return this.properties != null;
+  }
+
+  public void setFieldValue(int fieldID, Object value) {
+    switch (fieldID) {
+    case FIELDSCHEMAS:
+      if (value == null) {
+        unsetFieldSchemas();
+      } else {
+        setFieldSchemas((List<FieldSchema>)value);
+      }
+      break;
+
+    case PROPERTIES:
+      if (value == null) {
+        unsetProperties();
+      } else {
+        setProperties((Map<String,String>)value);
+      }
+      break;
+
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  public Object getFieldValue(int fieldID) {
+    switch (fieldID) {
+    case FIELDSCHEMAS:
+      return getFieldSchemas();
+
+    case PROPERTIES:
+      return getProperties();
+
+    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 FIELDSCHEMAS:
+      return isSetFieldSchemas();
+    case PROPERTIES:
+      return isSetProperties();
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Schema)
+      return this.equals((Schema)that);
+    return false;
+  }
+
+  public boolean equals(Schema that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_fieldSchemas = true && this.isSetFieldSchemas();
+    boolean that_present_fieldSchemas = true && that.isSetFieldSchemas();
+    if (this_present_fieldSchemas || that_present_fieldSchemas) {
+      if (!(this_present_fieldSchemas && that_present_fieldSchemas))
+        return false;
+      if (!this.fieldSchemas.equals(that.fieldSchemas))
+        return false;
+    }
+
+    boolean this_present_properties = true && this.isSetProperties();
+    boolean that_present_properties = true && that.isSetProperties();
+    if (this_present_properties || that_present_properties) {
+      if (!(this_present_properties && that_present_properties))
+        return false;
+      if (!this.properties.equals(that.properties))
+        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 _list48 = iprot.readListBegin();
-        this.fieldSchemas = new ArrayList<FieldSchema>(_list48.size);
-        for (int _i49 = 0; _i49 < _list48.size; ++_i49)
-        {
-          FieldSchema _elem50 = new FieldSchema();
-          _elem50 = new FieldSchema();
-          _elem50.read(iprot);
-          this.fieldSchemas.add(_elem50);
+        case FIELDSCHEMAS:
+          if (field.type == TType.LIST) {
+            {
+              TList _list48 = iprot.readListBegin();
+              this.fieldSchemas = new ArrayList<FieldSchema>(_list48.size);
+              for (int _i49 = 0; _i49 < _list48.size; ++_i49)
+              {
+                FieldSchema _elem50;
+                _elem50 = new FieldSchema();
+                _elem50.read(iprot);
+                this.fieldSchemas.add(_elem50);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case PROPERTIES:
+          if (field.type == TType.MAP) {
+            {
+              TMap _map51 = iprot.readMapBegin();
+              this.properties = new HashMap<String,String>(2*_map51.size);
+              for (int _i52 = 0; _i52 < _map51.size; ++_i52)
+              {
+                String _key53;
+                String _val54;
+                _key53 = iprot.readString();
+                _val54 = iprot.readString();
+                this.properties.put(_key53, _val54);
+              }
+              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.fieldSchemas != null) {
+      oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC);
+      {
+        oprot.writeListBegin(new TList(TType.STRUCT, this.fieldSchemas.size()));
+        for (FieldSchema _iter55 : this.fieldSchemas)        {
+          _iter55.write(oprot);
         }
-        iprot.readListEnd();
+        oprot.writeListEnd();
       }
-      this.__isset.fieldSchemas = true;
-    } else { 
-      TProtocolUtil.skip(iprot, field.type);
-    }
-    break;
-  case 2:
-    if (field.type == TType.MAP) {
+      oprot.writeFieldEnd();
+    }
+    if (this.properties != null) {
+      oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
       {
-        TMap _map51 = iprot.readMapBegin();
-        this.properties = new HashMap<String,String>(2*_map51.size);
-        for (int _i52 = 0; _i52 < _map51.size; ++_i52)
-        {
-          String _key53;
-          String _val54;
-          _key53 = iprot.readString();
-          _val54 = iprot.readString();
-          this.properties.put(_key53, _val54);
+        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.properties.size()));
+        for (Map.Entry<String, String> _iter56 : this.properties.entrySet())        {
+          oprot.writeString(_iter56.getKey());
+          oprot.writeString(_iter56.getValue());
         }
-        iprot.readMapEnd();
+        oprot.writeMapEnd();
       }
-      this.__isset.properties = 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("Schema");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.fieldSchemas != null) {
-field.name = "fieldSchemas";
-field.type = TType.LIST;
-field.id = 1;
-oprot.writeFieldBegin(field);
-{
-  oprot.writeListBegin(new TList(TType.STRUCT, this.fieldSchemas.size()));
-  for (FieldSchema _iter55 : this.fieldSchemas)  {
-    _iter55.write(oprot);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
   }
-  oprot.writeListEnd();
-}
-oprot.writeFieldEnd();
-}
-if (this.properties != null) {
-field.name = "properties";
-field.type = TType.MAP;
-field.id = 2;
-oprot.writeFieldBegin(field);
-{
-  oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.properties.size()));
-  for (String _iter56 : this.properties.keySet())  {
-    oprot.writeString(_iter56);
-    oprot.writeString(this.properties.get(_iter56));
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Schema(");
+    boolean first = true;
+
+    sb.append("fieldSchemas:");
+    if (this.fieldSchemas == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.fieldSchemas);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("properties:");
+    if (this.properties == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.properties);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
   }
-  oprot.writeMapEnd();
-}
-oprot.writeFieldEnd();
-}
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
 
-public String toString() {
-StringBuilder sb = new StringBuilder("Schema(");
-sb.append("fieldSchemas:");
-sb.append(this.fieldSchemas);
-sb.append(",properties:");
-sb.append(this.properties);
-sb.append(")");
-return sb.toString();
-}
+  public void validate() throws TException {
+    // check for required fields
+    // check that fields of type enum have valid values
+  }
 
 }
 



Mime
View raw message