Пример #1
0
  public int compareTo(GetPushNotiTask other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    GetPushNotiTask typedOther = (GetPushNotiTask) other;

    lastComparison = Boolean.valueOf(isSetCode()).compareTo(typedOther.isSetCode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, typedOther.code);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetInfo()).compareTo(typedOther.isSetInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.info, typedOther.info);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Пример #2
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, GetPushNotiTask struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(2);
   if (incoming.get(0)) {
     struct.code = iprot.readI32();
     struct.setCodeIsSet(true);
   }
   if (incoming.get(1)) {
     struct.info = new PushNotiInfo();
     struct.info.read(iprot);
     struct.setInfoIsSet(true);
   }
 }
Пример #3
0
 /** Performs a deep copy on <i>other</i>. */
 public GetPushNotiTask(GetPushNotiTask other) {
   __isset_bitfield = other.__isset_bitfield;
   this.code = other.code;
   if (other.isSetInfo()) {
     this.info = new PushNotiInfo(other.info);
   }
 }
Пример #4
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, GetPushNotiTask struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetCode()) {
     optionals.set(0);
   }
   if (struct.isSetInfo()) {
     optionals.set(1);
   }
   oprot.writeBitSet(optionals, 2);
   if (struct.isSetCode()) {
     oprot.writeI32(struct.code);
   }
   if (struct.isSetInfo()) {
     struct.info.write(oprot);
   }
 }
Пример #5
0
  public boolean equals(GetPushNotiTask that) {
    if (that == null) return false;

    boolean this_present_code = true && this.isSetCode();
    boolean that_present_code = true && that.isSetCode();
    if (this_present_code || that_present_code) {
      if (!(this_present_code && that_present_code)) return false;
      if (this.code != that.code) return false;
    }

    boolean this_present_info = true && this.isSetInfo();
    boolean that_present_info = true && that.isSetInfo();
    if (this_present_info || that_present_info) {
      if (!(this_present_info && that_present_info)) return false;
      if (!this.info.equals(that.info)) return false;
    }

    return true;
  }
Пример #6
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, GetPushNotiTask struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.isSetCode()) {
        oprot.writeFieldBegin(CODE_FIELD_DESC);
        oprot.writeI32(struct.code);
        oprot.writeFieldEnd();
      }
      if (struct.info != null) {
        if (struct.isSetInfo()) {
          oprot.writeFieldBegin(INFO_FIELD_DESC);
          struct.info.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Пример #7
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, GetPushNotiTask 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: // CODE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.code = iprot.readI32();
              struct.setCodeIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.info = new PushNotiInfo();
              struct.info.read(iprot);
              struct.setInfoIsSet(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();
    }