Example #1
0
 /** Performs a deep copy on <i>other</i>. */
 public ProcessInfo(ProcessInfo other) {
   __isset_bitfield = other.__isset_bitfield;
   this.pId = other.pId;
   if (other.isSetPName()) {
     this.pName = other.pName;
   }
   if (other.isSetApplicationLabel()) {
     this.applicationLabel = other.applicationLabel;
   }
   this.isSystemApp = other.isSystemApp;
   if (other.isSetImportance()) {
     this.importance = other.importance;
   }
   if (other.isSetVersionName()) {
     this.versionName = other.versionName;
   }
   this.versionCode = other.versionCode;
   if (other.isSetAppSignatures()) {
     List<String> __this__appSignatures = new ArrayList<String>(other.appSignatures);
     this.appSignatures = __this__appSignatures;
   }
   if (other.isSetInstallationPkg()) {
     this.installationPkg = other.installationPkg;
   }
 }
Example #2
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, ProcessInfo 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: // P_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.pId = iprot.readI32();
              struct.setPIdIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // P_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.pName = iprot.readString();
              struct.setPNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // APPLICATION_LABEL
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.applicationLabel = iprot.readString();
              struct.setApplicationLabelIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // IS_SYSTEM_APP
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isSystemApp = iprot.readBool();
              struct.setIsSystemAppIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // IMPORTANCE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.importance = iprot.readString();
              struct.setImportanceIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // VERSION_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.versionName = iprot.readString();
              struct.setVersionNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // VERSION_CODE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.versionCode = iprot.readI32();
              struct.setVersionCodeIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // APP_SIGNATURES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                struct.appSignatures = new ArrayList<String>(_list0.size);
                for (int _i1 = 0; _i1 < _list0.size; ++_i1) {
                  String _elem2;
                  _elem2 = iprot.readString();
                  struct.appSignatures.add(_elem2);
                }
                iprot.readListEnd();
              }
              struct.setAppSignaturesIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // INSTALLATION_PKG
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.installationPkg = iprot.readString();
              struct.setInstallationPkgIsSet(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();
    }
Example #3
0
  @Override
  public int compareTo(ProcessInfo other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetPId()).compareTo(other.isSetPId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pId, other.pId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPName()).compareTo(other.isSetPName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pName, other.pName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetApplicationLabel()).compareTo(other.isSetApplicationLabel());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetApplicationLabel()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.applicationLabel, other.applicationLabel);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsSystemApp()).compareTo(other.isSetIsSystemApp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsSystemApp()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isSystemApp, other.isSystemApp);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetImportance()).compareTo(other.isSetImportance());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetImportance()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.importance, other.importance);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetVersionName()).compareTo(other.isSetVersionName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVersionName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.versionName, other.versionName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetVersionCode()).compareTo(other.isSetVersionCode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVersionCode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.versionCode, other.versionCode);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAppSignatures()).compareTo(other.isSetAppSignatures());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAppSignatures()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.appSignatures, other.appSignatures);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetInstallationPkg()).compareTo(other.isSetInstallationPkg());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInstallationPkg()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.installationPkg, other.installationPkg);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Example #4
0
  public boolean equals(ProcessInfo that) {
    if (that == null) return false;

    boolean this_present_pId = true && this.isSetPId();
    boolean that_present_pId = true && that.isSetPId();
    if (this_present_pId || that_present_pId) {
      if (!(this_present_pId && that_present_pId)) return false;
      if (this.pId != that.pId) return false;
    }

    boolean this_present_pName = true && this.isSetPName();
    boolean that_present_pName = true && that.isSetPName();
    if (this_present_pName || that_present_pName) {
      if (!(this_present_pName && that_present_pName)) return false;
      if (!this.pName.equals(that.pName)) return false;
    }

    boolean this_present_applicationLabel = true && this.isSetApplicationLabel();
    boolean that_present_applicationLabel = true && that.isSetApplicationLabel();
    if (this_present_applicationLabel || that_present_applicationLabel) {
      if (!(this_present_applicationLabel && that_present_applicationLabel)) return false;
      if (!this.applicationLabel.equals(that.applicationLabel)) return false;
    }

    boolean this_present_isSystemApp = true && this.isSetIsSystemApp();
    boolean that_present_isSystemApp = true && that.isSetIsSystemApp();
    if (this_present_isSystemApp || that_present_isSystemApp) {
      if (!(this_present_isSystemApp && that_present_isSystemApp)) return false;
      if (this.isSystemApp != that.isSystemApp) return false;
    }

    boolean this_present_importance = true && this.isSetImportance();
    boolean that_present_importance = true && that.isSetImportance();
    if (this_present_importance || that_present_importance) {
      if (!(this_present_importance && that_present_importance)) return false;
      if (!this.importance.equals(that.importance)) return false;
    }

    boolean this_present_versionName = true && this.isSetVersionName();
    boolean that_present_versionName = true && that.isSetVersionName();
    if (this_present_versionName || that_present_versionName) {
      if (!(this_present_versionName && that_present_versionName)) return false;
      if (!this.versionName.equals(that.versionName)) return false;
    }

    boolean this_present_versionCode = true && this.isSetVersionCode();
    boolean that_present_versionCode = true && that.isSetVersionCode();
    if (this_present_versionCode || that_present_versionCode) {
      if (!(this_present_versionCode && that_present_versionCode)) return false;
      if (this.versionCode != that.versionCode) return false;
    }

    boolean this_present_appSignatures = true && this.isSetAppSignatures();
    boolean that_present_appSignatures = true && that.isSetAppSignatures();
    if (this_present_appSignatures || that_present_appSignatures) {
      if (!(this_present_appSignatures && that_present_appSignatures)) return false;
      if (!this.appSignatures.equals(that.appSignatures)) return false;
    }

    boolean this_present_installationPkg = true && this.isSetInstallationPkg();
    boolean that_present_installationPkg = true && that.isSetInstallationPkg();
    if (this_present_installationPkg || that_present_installationPkg) {
      if (!(this_present_installationPkg && that_present_installationPkg)) return false;
      if (!this.installationPkg.equals(that.installationPkg)) return false;
    }

    return true;
  }
Example #5
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, ProcessInfo struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(9);
   if (incoming.get(0)) {
     struct.pId = iprot.readI32();
     struct.setPIdIsSet(true);
   }
   if (incoming.get(1)) {
     struct.pName = iprot.readString();
     struct.setPNameIsSet(true);
   }
   if (incoming.get(2)) {
     struct.applicationLabel = iprot.readString();
     struct.setApplicationLabelIsSet(true);
   }
   if (incoming.get(3)) {
     struct.isSystemApp = iprot.readBool();
     struct.setIsSystemAppIsSet(true);
   }
   if (incoming.get(4)) {
     struct.importance = iprot.readString();
     struct.setImportanceIsSet(true);
   }
   if (incoming.get(5)) {
     struct.versionName = iprot.readString();
     struct.setVersionNameIsSet(true);
   }
   if (incoming.get(6)) {
     struct.versionCode = iprot.readI32();
     struct.setVersionCodeIsSet(true);
   }
   if (incoming.get(7)) {
     {
       org.apache.thrift.protocol.TList _list5 =
           new org.apache.thrift.protocol.TList(
               org.apache.thrift.protocol.TType.STRING, iprot.readI32());
       struct.appSignatures = new ArrayList<String>(_list5.size);
       for (int _i6 = 0; _i6 < _list5.size; ++_i6) {
         String _elem7;
         _elem7 = iprot.readString();
         struct.appSignatures.add(_elem7);
       }
     }
     struct.setAppSignaturesIsSet(true);
   }
   if (incoming.get(8)) {
     struct.installationPkg = iprot.readString();
     struct.setInstallationPkgIsSet(true);
   }
 }
Example #6
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, ProcessInfo struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetPId()) {
     optionals.set(0);
   }
   if (struct.isSetPName()) {
     optionals.set(1);
   }
   if (struct.isSetApplicationLabel()) {
     optionals.set(2);
   }
   if (struct.isSetIsSystemApp()) {
     optionals.set(3);
   }
   if (struct.isSetImportance()) {
     optionals.set(4);
   }
   if (struct.isSetVersionName()) {
     optionals.set(5);
   }
   if (struct.isSetVersionCode()) {
     optionals.set(6);
   }
   if (struct.isSetAppSignatures()) {
     optionals.set(7);
   }
   if (struct.isSetInstallationPkg()) {
     optionals.set(8);
   }
   oprot.writeBitSet(optionals, 9);
   if (struct.isSetPId()) {
     oprot.writeI32(struct.pId);
   }
   if (struct.isSetPName()) {
     oprot.writeString(struct.pName);
   }
   if (struct.isSetApplicationLabel()) {
     oprot.writeString(struct.applicationLabel);
   }
   if (struct.isSetIsSystemApp()) {
     oprot.writeBool(struct.isSystemApp);
   }
   if (struct.isSetImportance()) {
     oprot.writeString(struct.importance);
   }
   if (struct.isSetVersionName()) {
     oprot.writeString(struct.versionName);
   }
   if (struct.isSetVersionCode()) {
     oprot.writeI32(struct.versionCode);
   }
   if (struct.isSetAppSignatures()) {
     {
       oprot.writeI32(struct.appSignatures.size());
       for (String _iter4 : struct.appSignatures) {
         oprot.writeString(_iter4);
       }
     }
   }
   if (struct.isSetInstallationPkg()) {
     oprot.writeString(struct.installationPkg);
   }
 }
Example #7
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, ProcessInfo struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.isSetPId()) {
        oprot.writeFieldBegin(P_ID_FIELD_DESC);
        oprot.writeI32(struct.pId);
        oprot.writeFieldEnd();
      }
      if (struct.pName != null) {
        if (struct.isSetPName()) {
          oprot.writeFieldBegin(P_NAME_FIELD_DESC);
          oprot.writeString(struct.pName);
          oprot.writeFieldEnd();
        }
      }
      if (struct.applicationLabel != null) {
        if (struct.isSetApplicationLabel()) {
          oprot.writeFieldBegin(APPLICATION_LABEL_FIELD_DESC);
          oprot.writeString(struct.applicationLabel);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetIsSystemApp()) {
        oprot.writeFieldBegin(IS_SYSTEM_APP_FIELD_DESC);
        oprot.writeBool(struct.isSystemApp);
        oprot.writeFieldEnd();
      }
      if (struct.importance != null) {
        if (struct.isSetImportance()) {
          oprot.writeFieldBegin(IMPORTANCE_FIELD_DESC);
          oprot.writeString(struct.importance);
          oprot.writeFieldEnd();
        }
      }
      if (struct.versionName != null) {
        if (struct.isSetVersionName()) {
          oprot.writeFieldBegin(VERSION_NAME_FIELD_DESC);
          oprot.writeString(struct.versionName);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetVersionCode()) {
        oprot.writeFieldBegin(VERSION_CODE_FIELD_DESC);
        oprot.writeI32(struct.versionCode);
        oprot.writeFieldEnd();
      }
      if (struct.appSignatures != null) {
        if (struct.isSetAppSignatures()) {
          oprot.writeFieldBegin(APP_SIGNATURES_FIELD_DESC);
          {
            oprot.writeListBegin(
                new org.apache.thrift.protocol.TList(
                    org.apache.thrift.protocol.TType.STRING, struct.appSignatures.size()));
            for (String _iter3 : struct.appSignatures) {
              oprot.writeString(_iter3);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.installationPkg != null) {
        if (struct.isSetInstallationPkg()) {
          oprot.writeFieldBegin(INSTALLATION_PKG_FIELD_DESC);
          oprot.writeString(struct.installationPkg);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }