@Override public int compareTo(LineageCommand other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetCommandType()).compareTo(other.isSetCommandType()); if (lastComparison != 0) { return lastComparison; } if (isSetCommandType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.commandType, other.commandType); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCheckpointFiles()).compareTo(other.isSetCheckpointFiles()); if (lastComparison != 0) { return lastComparison; } if (isSetCheckpointFiles()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.checkpointFiles, other.checkpointFiles); if (lastComparison != 0) { return lastComparison; } } return 0; }
/** Performs a deep copy on <i>other</i>. */ public LineageCommand(LineageCommand other) { if (other.isSetCommandType()) { this.commandType = other.commandType; } if (other.isSetCheckpointFiles()) { List<CheckpointFile> __this__checkpointFiles = new ArrayList<CheckpointFile>(other.checkpointFiles.size()); for (CheckpointFile other_element : other.checkpointFiles) { __this__checkpointFiles.add(new CheckpointFile(other_element)); } this.checkpointFiles = __this__checkpointFiles; } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, LineageCommand struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetCommandType()) { optionals.set(0); } if (struct.isSetCheckpointFiles()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetCommandType()) { oprot.writeI32(struct.commandType.getValue()); } if (struct.isSetCheckpointFiles()) { { oprot.writeI32(struct.checkpointFiles.size()); for (CheckpointFile _iter12 : struct.checkpointFiles) { _iter12.write(oprot); } } } }
public boolean equals(LineageCommand that) { if (that == null) return false; boolean this_present_commandType = true && this.isSetCommandType(); boolean that_present_commandType = true && that.isSetCommandType(); if (this_present_commandType || that_present_commandType) { if (!(this_present_commandType && that_present_commandType)) return false; if (!this.commandType.equals(that.commandType)) return false; } boolean this_present_checkpointFiles = true && this.isSetCheckpointFiles(); boolean that_present_checkpointFiles = true && that.isSetCheckpointFiles(); if (this_present_checkpointFiles || that_present_checkpointFiles) { if (!(this_present_checkpointFiles && that_present_checkpointFiles)) return false; if (!this.checkpointFiles.equals(that.checkpointFiles)) return false; } return true; }