public int compareTo(ClientRawTableInfo other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; ClientRawTableInfo typedOther = (ClientRawTableInfo) other; lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId()); if (lastComparison != 0) { return lastComparison; } if (isSetId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath()); if (lastComparison != 0) { return lastComparison; } if (isSetPath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); if (lastComparison != 0) { return lastComparison; } if (isSetColumns()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(typedOther.isSetMetadata()); if (lastComparison != 0) { return lastComparison; } if (isSetMetadata()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, typedOther.metadata); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, ClientRawTableInfo struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetId()) { optionals.set(0); } if (struct.isSetName()) { optionals.set(1); } if (struct.isSetPath()) { optionals.set(2); } if (struct.isSetColumns()) { optionals.set(3); } if (struct.isSetMetadata()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetId()) { oprot.writeI32(struct.id); } if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetPath()) { oprot.writeString(struct.path); } if (struct.isSetColumns()) { oprot.writeI32(struct.columns); } if (struct.isSetMetadata()) { oprot.writeBinary(struct.metadata); } }
/** Performs a deep copy on <i>other</i>. */ public ClientRawTableInfo(ClientRawTableInfo other) { __isset_bitfield = other.__isset_bitfield; this.id = other.id; if (other.isSetName()) { this.name = other.name; } if (other.isSetPath()) { this.path = other.path; } this.columns = other.columns; if (other.isSetMetadata()) { this.metadata = org.apache.thrift.TBaseHelper.copyBinary(other.metadata); ; } }
public boolean equals(ClientRawTableInfo that) { if (that == null) return false; boolean this_present_id = true; boolean that_present_id = true; if (this_present_id || that_present_id) { if (!(this_present_id && that_present_id)) return false; if (this.id != that.id) return false; } boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_path = true && this.isSetPath(); boolean that_present_path = true && that.isSetPath(); if (this_present_path || that_present_path) { if (!(this_present_path && that_present_path)) return false; if (!this.path.equals(that.path)) return false; } boolean this_present_columns = true; boolean that_present_columns = true; if (this_present_columns || that_present_columns) { if (!(this_present_columns && that_present_columns)) return false; if (this.columns != that.columns) return false; } boolean this_present_metadata = true && this.isSetMetadata(); boolean that_present_metadata = true && that.isSetMetadata(); if (this_present_metadata || that_present_metadata) { if (!(this_present_metadata && that_present_metadata)) return false; if (!this.metadata.equals(that.metadata)) return false; } return true; }