コード例 #1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, AppInfoResult struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetDeviceId()) {
     optionals.set(0);
   }
   if (struct.isSetFlowNum()) {
     optionals.set(1);
   }
   if (struct.isSetResult()) {
     optionals.set(2);
   }
   if (struct.isSetAppdatainfo()) {
     optionals.set(3);
   }
   oprot.writeBitSet(optionals, 4);
   if (struct.isSetDeviceId()) {
     oprot.writeI32(struct.deviceId);
   }
   if (struct.isSetFlowNum()) {
     oprot.writeI32(struct.flowNum);
   }
   if (struct.isSetResult()) {
     oprot.writeBool(struct.result);
   }
   if (struct.isSetAppdatainfo()) {
     struct.appdatainfo.write(oprot);
   }
 }
コード例 #2
0
  public int compareTo(AppInfoResult other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetDeviceId()).compareTo(typedOther.isSetDeviceId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDeviceId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deviceId, typedOther.deviceId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFlowNum()).compareTo(typedOther.isSetFlowNum());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFlowNum()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.flowNum, typedOther.flowNum);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetResult()).compareTo(typedOther.isSetResult());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetResult()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, typedOther.result);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAppdatainfo()).compareTo(typedOther.isSetAppdatainfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAppdatainfo()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.appdatainfo, typedOther.appdatainfo);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }