Ejemplo n.º 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, MsgIdList struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetMsgIdList()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetMsgIdList()) {
     {
       oprot.writeI32(struct.msgIdList.size());
       for (long _iter12 : struct.msgIdList) {
         oprot.writeI64(_iter12);
       }
     }
   }
 }
Ejemplo n.º 2
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, MsgIdList struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(1);
   if (incoming.get(0)) {
     {
       org.apache.thrift.protocol.TList _list13 =
           new org.apache.thrift.protocol.TList(
               org.apache.thrift.protocol.TType.I64, iprot.readI32());
       struct.msgIdList = new ArrayList<Long>(_list13.size);
       for (int _i14 = 0; _i14 < _list13.size; ++_i14) {
         long _elem15;
         _elem15 = iprot.readI64();
         struct.msgIdList.add(_elem15);
       }
     }
     struct.setMsgIdListIsSet(true);
   }
 }
Ejemplo n.º 3
0
  @Override
  public int compareTo(MsgIdList other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetMsgIdList()).compareTo(other.isSetMsgIdList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMsgIdList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.msgIdList, other.msgIdList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Ejemplo n.º 4
0
  public boolean equals(MsgIdList that) {
    if (that == null) return false;

    boolean this_present_msgIdList = true && this.isSetMsgIdList();
    boolean that_present_msgIdList = true && that.isSetMsgIdList();
    if (this_present_msgIdList || that_present_msgIdList) {
      if (!(this_present_msgIdList && that_present_msgIdList)) return false;
      if (!this.msgIdList.equals(that.msgIdList)) return false;
    }

    return true;
  }
Ejemplo n.º 5
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, MsgIdList 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: // MSG_ID_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
                struct.msgIdList = new ArrayList<Long>(_list8.size);
                for (int _i9 = 0; _i9 < _list8.size; ++_i9) {
                  long _elem10;
                  _elem10 = iprot.readI64();
                  struct.msgIdList.add(_elem10);
                }
                iprot.readListEnd();
              }
              struct.setMsgIdListIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
Ejemplo n.º 6
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, MsgIdList struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.msgIdList != null) {
        oprot.writeFieldBegin(MSG_ID_LIST_FIELD_DESC);
        {
          oprot.writeListBegin(
              new org.apache.thrift.protocol.TList(
                  org.apache.thrift.protocol.TType.I64, struct.msgIdList.size()));
          for (long _iter11 : struct.msgIdList) {
            oprot.writeI64(_iter11);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Ejemplo n.º 7
0
 /** Performs a deep copy on <i>other</i>. */
 public MsgIdList(MsgIdList other) {
   if (other.isSetMsgIdList()) {
     List<Long> __this__msgIdList = new ArrayList<Long>(other.msgIdList);
     this.msgIdList = __this__msgIdList;
   }
 }