Esempio n. 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, Appl struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetId()) {
     optionals.set(0);
   }
   if (struct.isSetType()) {
     optionals.set(1);
   }
   if (struct.isSetExcuteAction()) {
     optionals.set(2);
   }
   if (struct.isSetExcuteDescribe()) {
     optionals.set(3);
   }
   if (struct.isSetPkgName()) {
     optionals.set(4);
   }
   if (struct.isSetLevel()) {
     optionals.set(5);
   }
   if (struct.isSetCategory()) {
     optionals.set(6);
   }
   if (struct.isSetName()) {
     optionals.set(7);
   }
   oprot.writeBitSet(optionals, 8);
   if (struct.isSetId()) {
     oprot.writeString(struct.id);
   }
   if (struct.isSetType()) {
     oprot.writeString(struct.type);
   }
   if (struct.isSetExcuteAction()) {
     oprot.writeI32(struct.excuteAction);
   }
   if (struct.isSetExcuteDescribe()) {
     oprot.writeString(struct.excuteDescribe);
   }
   if (struct.isSetPkgName()) {
     oprot.writeString(struct.pkgName);
   }
   if (struct.isSetLevel()) {
     oprot.writeString(struct.level);
   }
   if (struct.isSetCategory()) {
     oprot.writeString(struct.category);
   }
   if (struct.isSetName()) {
     oprot.writeString(struct.name);
   }
 }
Esempio n. 2
0
  public int compareTo(Appl other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetExcuteAction()).compareTo(typedOther.isSetExcuteAction());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetExcuteAction()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.excuteAction, typedOther.excuteAction);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetExcuteDescribe()).compareTo(typedOther.isSetExcuteDescribe());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetExcuteDescribe()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.excuteDescribe, typedOther.excuteDescribe);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPkgName()).compareTo(typedOther.isSetPkgName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPkgName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pkgName, typedOther.pkgName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLevel()).compareTo(typedOther.isSetLevel());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLevel()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.level, typedOther.level);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCategory()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }