Exemplo n.º 1
0
 @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);
       }
     }
   }
 }
Exemplo n.º 2
0
 /** 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;
   }
 }
Exemplo n.º 3
0
  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;
  }
Exemplo n.º 4
0
  @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;
  }