@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_status = true && (isSetStatus()); list.add(present_status); if (present_status) list.add(status); boolean present_schema = true && (isSetSchema()); list.add(present_schema); if (present_schema) list.add(schema); return list.hashCode(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case STATUS: return isSetStatus(); case SCHEMA: return isSetSchema(); } throw new IllegalStateException(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TGetResultSetMetadataResp struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.status.write(oprot); BitSet optionals = new BitSet(); if (struct.isSetSchema()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSchema()) { struct.schema.write(oprot); } }
@Override public String toString() { StringBuilder sb = new StringBuilder("TGetResultSetMetadataResp("); boolean first = true; sb.append("status:"); if (this.status == null) { sb.append("null"); } else { sb.append(this.status); } first = false; if (isSetSchema()) { if (!first) sb.append(", "); sb.append("schema:"); if (this.schema == null) { sb.append("null"); } else { sb.append(this.schema); } first = false; } sb.append(")"); return sb.toString(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, TGetResultSetMetadataResp struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.status != null) { oprot.writeFieldBegin(STATUS_FIELD_DESC); struct.status.write(oprot); oprot.writeFieldEnd(); } if (struct.schema != null) { if (struct.isSetSchema()) { oprot.writeFieldBegin(SCHEMA_FIELD_DESC); struct.schema.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public int compareTo(TGetResultSetMetadataResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSchema()).compareTo(other.isSetSchema()); if (lastComparison != 0) { return lastComparison; } if (isSetSchema()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, other.schema); if (lastComparison != 0) { return lastComparison; } } return 0; }
public boolean equals(TGetResultSetMetadataResp that) { if (that == null) return false; boolean this_present_status = true && this.isSetStatus(); boolean that_present_status = true && that.isSetStatus(); if (this_present_status || that_present_status) { if (!(this_present_status && that_present_status)) return false; if (!this.status.equals(that.status)) return false; } boolean this_present_schema = true && this.isSetSchema(); boolean that_present_schema = true && that.isSetSchema(); if (this_present_schema || that_present_schema) { if (!(this_present_schema && that_present_schema)) return false; if (!this.schema.equals(that.schema)) return false; } return true; }
/** * Performs a deep copy on <i>other</i>. */ public TGetResultSetMetadataResp(TGetResultSetMetadataResp other) { if (other.isSetStatus()) { this.status = new TStatus(other.status); } if (other.isSetSchema()) { this.schema = new TTableSchema(other.schema); } }