@Override public void write(org.apache.thrift.protocol.TProtocol prot, PartitionListComposingSpec struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPartitions()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetPartitions()) { { oprot.writeI32(struct.partitions.size()); for (Partition _iter256 : struct.partitions) { _iter256.write(oprot); } } } }
/** Performs a deep copy on <i>other</i>. */ public PartitionListComposingSpec(PartitionListComposingSpec other) { if (other.isSetPartitions()) { List<Partition> __this__partitions = new ArrayList<Partition>(other.partitions.size()); for (Partition other_element : other.partitions) { __this__partitions.add(new Partition(other_element)); } this.partitions = __this__partitions; } }
@Override public int compareTo(PartitionListComposingSpec other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); if (lastComparison != 0) { return lastComparison; } if (isSetPartitions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, PartitionListComposingSpec struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list257 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.partitions = new ArrayList<Partition>(_list257.size); Partition _elem258; for (int _i259 = 0; _i259 < _list257.size; ++_i259) { _elem258 = new Partition(); _elem258.read(iprot); struct.partitions.add(_elem258); } } struct.setPartitionsIsSet(true); } }
public boolean equals(PartitionListComposingSpec that) { if (that == null) return false; boolean this_present_partitions = true && this.isSetPartitions(); boolean that_present_partitions = true && that.isSetPartitions(); if (this_present_partitions || that_present_partitions) { if (!(this_present_partitions && that_present_partitions)) return false; if (!this.partitions.equals(that.partitions)) return false; } return true; }
public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionListComposingSpec struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PARTITIONS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list252 = iprot.readListBegin(); struct.partitions = new ArrayList<Partition>(_list252.size); Partition _elem253; for (int _i254 = 0; _i254 < _list252.size; ++_i254) { _elem253 = new Partition(); _elem253.read(iprot); struct.partitions.add(_elem253); } iprot.readListEnd(); } struct.setPartitionsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, PartitionListComposingSpec struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.partitions != null) { oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); for (Partition _iter255 : struct.partitions) { _iter255.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }