@Override public void write(org.apache.thrift.protocol.TProtocol prot, TOperationHandle struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.operationId.write(oprot); oprot.writeI32(struct.operationType.getValue()); oprot.writeBool(struct.hasResultSet); BitSet optionals = new BitSet(); if (struct.isSetModifiedRowCount()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetModifiedRowCount()) { oprot.writeDouble(struct.modifiedRowCount); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, TOperationHandle struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.operationId != null) { oprot.writeFieldBegin(OPERATION_ID_FIELD_DESC); struct.operationId.write(oprot); oprot.writeFieldEnd(); } if (struct.operationType != null) { oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC); oprot.writeI32(struct.operationType.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(HAS_RESULT_SET_FIELD_DESC); oprot.writeBool(struct.hasResultSet); oprot.writeFieldEnd(); if (struct.isSetModifiedRowCount()) { oprot.writeFieldBegin(MODIFIED_ROW_COUNT_FIELD_DESC); oprot.writeDouble(struct.modifiedRowCount); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public boolean equals(TOperationHandle that) { if (that == null) return false; boolean this_present_operationId = true && this.isSetOperationId(); boolean that_present_operationId = true && that.isSetOperationId(); if (this_present_operationId || that_present_operationId) { if (!(this_present_operationId && that_present_operationId)) return false; if (!this.operationId.equals(that.operationId)) return false; } boolean this_present_operationType = true && this.isSetOperationType(); boolean that_present_operationType = true && that.isSetOperationType(); if (this_present_operationType || that_present_operationType) { if (!(this_present_operationType && that_present_operationType)) return false; if (!this.operationType.equals(that.operationType)) return false; } boolean this_present_hasResultSet = true; boolean that_present_hasResultSet = true; if (this_present_hasResultSet || that_present_hasResultSet) { if (!(this_present_hasResultSet && that_present_hasResultSet)) return false; if (this.hasResultSet != that.hasResultSet) return false; } boolean this_present_modifiedRowCount = true && this.isSetModifiedRowCount(); boolean that_present_modifiedRowCount = true && that.isSetModifiedRowCount(); if (this_present_modifiedRowCount || that_present_modifiedRowCount) { if (!(this_present_modifiedRowCount && that_present_modifiedRowCount)) return false; if (this.modifiedRowCount != that.modifiedRowCount) return false; } return true; }
public int compareTo(TOperationHandle other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TOperationHandle typedOther = (TOperationHandle) other; lastComparison = Boolean.valueOf(isSetOperationId()).compareTo(typedOther.isSetOperationId()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationId, typedOther.operationId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(typedOther.isSetOperationType()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, typedOther.operationType); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(typedOther.isSetHasResultSet()); if (lastComparison != 0) { return lastComparison; } if (isSetHasResultSet()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, typedOther.hasResultSet); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetModifiedRowCount()).compareTo(typedOther.isSetModifiedRowCount()); if (lastComparison != 0) { return lastComparison; } if (isSetModifiedRowCount()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.modifiedRowCount, typedOther.modifiedRowCount); if (lastComparison != 0) { return lastComparison; } } return 0; }