コード例 #1
0
  @Override
  public int compareTo(InsertEventRequestData other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetFilesAdded()).compareTo(other.isSetFilesAdded());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFilesAdded()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filesAdded, other.filesAdded);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetFilesAddedChecksum()).compareTo(other.isSetFilesAddedChecksum());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFilesAddedChecksum()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.filesAddedChecksum, other.filesAddedChecksum);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
コード例 #2
0
 /** Performs a deep copy on <i>other</i>. */
 public InsertEventRequestData(InsertEventRequestData other) {
   if (other.isSetFilesAdded()) {
     List<String> __this__filesAdded = new ArrayList<String>(other.filesAdded);
     this.filesAdded = __this__filesAdded;
   }
   if (other.isSetFilesAddedChecksum()) {
     List<ByteBuffer> __this__filesAddedChecksum =
         new ArrayList<ByteBuffer>(other.filesAddedChecksum);
     this.filesAddedChecksum = __this__filesAddedChecksum;
   }
 }
コード例 #3
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, InsertEventRequestData struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   {
     oprot.writeI32(struct.filesAdded.size());
     for (String _iter566 : struct.filesAdded) {
       oprot.writeString(_iter566);
     }
   }
   BitSet optionals = new BitSet();
   if (struct.isSetFilesAddedChecksum()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetFilesAddedChecksum()) {
     {
       oprot.writeI32(struct.filesAddedChecksum.size());
       for (ByteBuffer _iter567 : struct.filesAddedChecksum) {
         oprot.writeBinary(_iter567);
       }
     }
   }
 }
コード例 #4
0
  public boolean equals(InsertEventRequestData that) {
    if (that == null) return false;

    boolean this_present_filesAdded = true && this.isSetFilesAdded();
    boolean that_present_filesAdded = true && that.isSetFilesAdded();
    if (this_present_filesAdded || that_present_filesAdded) {
      if (!(this_present_filesAdded && that_present_filesAdded)) return false;
      if (!this.filesAdded.equals(that.filesAdded)) return false;
    }

    boolean this_present_filesAddedChecksum = true && this.isSetFilesAddedChecksum();
    boolean that_present_filesAddedChecksum = true && that.isSetFilesAddedChecksum();
    if (this_present_filesAddedChecksum || that_present_filesAddedChecksum) {
      if (!(this_present_filesAddedChecksum && that_present_filesAddedChecksum)) return false;
      if (!this.filesAddedChecksum.equals(that.filesAddedChecksum)) return false;
    }

    return true;
  }
コード例 #5
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, InsertEventRequestData struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.filesAdded != null) {
        oprot.writeFieldBegin(FILES_ADDED_FIELD_DESC);
        {
          oprot.writeListBegin(
              new org.apache.thrift.protocol.TList(
                  org.apache.thrift.protocol.TType.STRING, struct.filesAdded.size()));
          for (String _iter564 : struct.filesAdded) {
            oprot.writeString(_iter564);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.filesAddedChecksum != null) {
        if (struct.isSetFilesAddedChecksum()) {
          oprot.writeFieldBegin(FILES_ADDED_CHECKSUM_FIELD_DESC);
          {
            oprot.writeListBegin(
                new org.apache.thrift.protocol.TList(
                    org.apache.thrift.protocol.TType.STRING, struct.filesAddedChecksum.size()));
            for (ByteBuffer _iter565 : struct.filesAddedChecksum) {
              oprot.writeBinary(_iter565);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }