Ejemplo n.º 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, loginResult struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetResult()) {
     optionals.set(0);
   }
   if (struct.isSetToken()) {
     optionals.set(1);
   }
   if (struct.isSetSpace()) {
     optionals.set(2);
   }
   if (struct.isSetUspace()) {
     optionals.set(3);
   }
   oprot.writeBitSet(optionals, 4);
   if (struct.isSetResult()) {
     struct.result.write(oprot);
   }
   if (struct.isSetToken()) {
     oprot.writeString(struct.token);
   }
   if (struct.isSetSpace()) {
     oprot.writeI32(struct.space);
   }
   if (struct.isSetUspace()) {
     oprot.writeI32(struct.uspace);
   }
 }
Ejemplo n.º 2
0
  public boolean equals(loginResult that) {
    if (that == null) return false;

    boolean this_present_result = true && this.isSetResult();
    boolean that_present_result = true && that.isSetResult();
    if (this_present_result || that_present_result) {
      if (!(this_present_result && that_present_result)) return false;
      if (!this.result.equals(that.result)) return false;
    }

    boolean this_present_token = true && this.isSetToken();
    boolean that_present_token = true && that.isSetToken();
    if (this_present_token || that_present_token) {
      if (!(this_present_token && that_present_token)) return false;
      if (!this.token.equals(that.token)) return false;
    }

    boolean this_present_space = true;
    boolean that_present_space = true;
    if (this_present_space || that_present_space) {
      if (!(this_present_space && that_present_space)) return false;
      if (this.space != that.space) return false;
    }

    boolean this_present_uspace = true;
    boolean that_present_uspace = true;
    if (this_present_uspace || that_present_uspace) {
      if (!(this_present_uspace && that_present_uspace)) return false;
      if (this.uspace != that.uspace) return false;
    }

    return true;
  }
Ejemplo n.º 3
0
 /** Performs a deep copy on <i>other</i>. */
 public loginResult(loginResult other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetResult()) {
     this.result = new RetHead(other.result);
   }
   if (other.isSetToken()) {
     this.token = other.token;
   }
   this.space = other.space;
   this.uspace = other.uspace;
 }
Ejemplo n.º 4
0
  @Override
  public int compareTo(loginResult other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetResult()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, other.result);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetToken()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSpace()).compareTo(other.isSetSpace());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSpace()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.space, other.space);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUspace()).compareTo(other.isSetUspace());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUspace()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uspace, other.uspace);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }