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

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

    lastComparison = Boolean.valueOf(isSetIid()).compareTo(typedOther.isSetIid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iid, typedOther.iid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetInput()).compareTo(typedOther.isSetInput());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInput()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.input, typedOther.input);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStructure()).compareTo(typedOther.isSetStructure());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStructure()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.structure, typedOther.structure);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPreset()).compareTo(typedOther.isSetPreset());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPreset()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preset, typedOther.preset);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOutput()).compareTo(typedOther.isSetOutput());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOutput()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.output, typedOther.output);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetData()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTitle()).compareTo(typedOther.isSetTitle());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTitle()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.title, typedOther.title);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDescription()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPlugin()).compareTo(typedOther.isSetPlugin());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPlugin()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.plugin, typedOther.plugin);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Пример #2
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, InteractionTask struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetIid()) {
     optionals.set(0);
   }
   if (struct.isSetInput()) {
     optionals.set(1);
   }
   if (struct.isSetStructure()) {
     optionals.set(2);
   }
   if (struct.isSetPreset()) {
     optionals.set(3);
   }
   if (struct.isSetOutput()) {
     optionals.set(4);
   }
   if (struct.isSetData()) {
     optionals.set(5);
   }
   if (struct.isSetTitle()) {
     optionals.set(6);
   }
   if (struct.isSetDescription()) {
     optionals.set(7);
   }
   if (struct.isSetPlugin()) {
     optionals.set(8);
   }
   oprot.writeBitSet(optionals, 9);
   if (struct.isSetIid()) {
     oprot.writeI32(struct.iid);
   }
   if (struct.isSetInput()) {
     oprot.writeI32(struct.input.getValue());
   }
   if (struct.isSetStructure()) {
     {
       oprot.writeI32(struct.structure.size());
       for (String _iter36 : struct.structure) {
         oprot.writeString(_iter36);
       }
     }
   }
   if (struct.isSetPreset()) {
     {
       oprot.writeI32(struct.preset.size());
       for (String _iter37 : struct.preset) {
         oprot.writeString(_iter37);
       }
     }
   }
   if (struct.isSetOutput()) {
     oprot.writeI32(struct.output.getValue());
   }
   if (struct.isSetData()) {
     {
       oprot.writeI32(struct.data.size());
       for (String _iter38 : struct.data) {
         oprot.writeString(_iter38);
       }
     }
   }
   if (struct.isSetTitle()) {
     oprot.writeString(struct.title);
   }
   if (struct.isSetDescription()) {
     oprot.writeString(struct.description);
   }
   if (struct.isSetPlugin()) {
     oprot.writeString(struct.plugin);
   }
 }