예제 #1
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;
  }
예제 #2
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);
   }
 }
예제 #3
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;
  }
예제 #4
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();
    }