Example #1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, OnlineStatus struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetName()) {
     optionals.set(0);
   }
   if (struct.isSetPlugin()) {
     optionals.set(1);
   }
   if (struct.isSetPackagename()) {
     optionals.set(2);
   }
   if (struct.isSetStatus()) {
     optionals.set(3);
   }
   if (struct.isSetSize()) {
     optionals.set(4);
   }
   oprot.writeBitSet(optionals, 5);
   if (struct.isSetName()) {
     oprot.writeString(struct.name);
   }
   if (struct.isSetPlugin()) {
     oprot.writeString(struct.plugin);
   }
   if (struct.isSetPackagename()) {
     oprot.writeString(struct.packagename);
   }
   if (struct.isSetStatus()) {
     oprot.writeI32(struct.status.getValue());
   }
   if (struct.isSetSize()) {
     oprot.writeI64(struct.size);
   }
 }
Example #2
0
 /** Performs a deep copy on <i>other</i>. */
 public OnlineStatus(OnlineStatus other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetName()) {
     this.name = other.name;
   }
   if (other.isSetPlugin()) {
     this.plugin = other.plugin;
   }
   if (other.isSetPackagename()) {
     this.packagename = other.packagename;
   }
   if (other.isSetStatus()) {
     this.status = other.status;
   }
   this.size = other.size;
 }
Example #3
0
  public boolean equals(OnlineStatus that) {
    if (that == null) return false;

    boolean this_present_name = true && this.isSetName();
    boolean that_present_name = true && that.isSetName();
    if (this_present_name || that_present_name) {
      if (!(this_present_name && that_present_name)) return false;
      if (!this.name.equals(that.name)) return false;
    }

    boolean this_present_plugin = true && this.isSetPlugin();
    boolean that_present_plugin = true && that.isSetPlugin();
    if (this_present_plugin || that_present_plugin) {
      if (!(this_present_plugin && that_present_plugin)) return false;
      if (!this.plugin.equals(that.plugin)) return false;
    }

    boolean this_present_packagename = true && this.isSetPackagename();
    boolean that_present_packagename = true && that.isSetPackagename();
    if (this_present_packagename || that_present_packagename) {
      if (!(this_present_packagename && that_present_packagename)) return false;
      if (!this.packagename.equals(that.packagename)) return false;
    }

    boolean this_present_status = true && this.isSetStatus();
    boolean that_present_status = true && that.isSetStatus();
    if (this_present_status || that_present_status) {
      if (!(this_present_status && that_present_status)) return false;
      if (!this.status.equals(that.status)) return false;
    }

    boolean this_present_size = true;
    boolean that_present_size = true;
    if (this_present_size || that_present_size) {
      if (!(this_present_size && that_present_size)) return false;
      if (this.size != that.size) return false;
    }

    return true;
  }
Example #4
0
  public int compareTo(OnlineStatus other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    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;
      }
    }
    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;
      }
    }
    lastComparison = Boolean.valueOf(isSetPackagename()).compareTo(typedOther.isSetPackagename());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPackagename()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.packagename, typedOther.packagename);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSize()).compareTo(typedOther.isSetSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.size, typedOther.size);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }