コード例 #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
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, InsertEventRequestData struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   {
     org.apache.thrift.protocol.TList _list568 =
         new org.apache.thrift.protocol.TList(
             org.apache.thrift.protocol.TType.STRING, iprot.readI32());
     struct.filesAdded = new ArrayList<String>(_list568.size);
     String _elem569;
     for (int _i570 = 0; _i570 < _list568.size; ++_i570) {
       _elem569 = iprot.readString();
       struct.filesAdded.add(_elem569);
     }
   }
   struct.setFilesAddedIsSet(true);
   BitSet incoming = iprot.readBitSet(1);
   if (incoming.get(0)) {
     {
       org.apache.thrift.protocol.TList _list571 =
           new org.apache.thrift.protocol.TList(
               org.apache.thrift.protocol.TType.STRING, iprot.readI32());
       struct.filesAddedChecksum = new ArrayList<ByteBuffer>(_list571.size);
       ByteBuffer _elem572;
       for (int _i573 = 0; _i573 < _list571.size; ++_i573) {
         _elem572 = iprot.readBinary();
         struct.filesAddedChecksum.add(_elem572);
       }
     }
     struct.setFilesAddedChecksumIsSet(true);
   }
 }
コード例 #3
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;
   }
 }
コード例 #4
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, InsertEventRequestData 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: // FILES_ADDED
         if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list558 = iprot.readListBegin();
             struct.filesAdded = new ArrayList<String>(_list558.size);
             String _elem559;
             for (int _i560 = 0; _i560 < _list558.size; ++_i560) {
               _elem559 = iprot.readString();
               struct.filesAdded.add(_elem559);
             }
             iprot.readListEnd();
           }
           struct.setFilesAddedIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // FILES_ADDED_CHECKSUM
         if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list561 = iprot.readListBegin();
             struct.filesAddedChecksum = new ArrayList<ByteBuffer>(_list561.size);
             ByteBuffer _elem562;
             for (int _i563 = 0; _i563 < _list561.size; ++_i563) {
               _elem562 = iprot.readBinary();
               struct.filesAddedChecksum.add(_elem562);
             }
             iprot.readListEnd();
           }
           struct.setFilesAddedChecksumIsSet(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();
 }
コード例 #5
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;
  }
コード例 #6
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);
       }
     }
   }
 }
コード例 #7
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();
    }