Ejemplo n.º 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, UserCrawlState struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetUid()) {
     optionals.set(0);
   }
   if (struct.isSetSinceID()) {
     optionals.set(1);
   }
   if (struct.isSetLastCrawlTime()) {
     optionals.set(2);
   }
   if (struct.isSetLastCrawlNum()) {
     optionals.set(3);
   }
   oprot.writeBitSet(optionals, 4);
   if (struct.isSetUid()) {
     oprot.writeString(struct.uid);
   }
   if (struct.isSetSinceID()) {
     oprot.writeI64(struct.sinceID);
   }
   if (struct.isSetLastCrawlTime()) {
     oprot.writeI64(struct.lastCrawlTime);
   }
   if (struct.isSetLastCrawlNum()) {
     oprot.writeI16(struct.lastCrawlNum);
   }
 }
Ejemplo n.º 2
0
  public boolean equals(UserCrawlState that) {
    if (that == null) return false;

    boolean this_present_uid = true && this.isSetUid();
    boolean that_present_uid = true && that.isSetUid();
    if (this_present_uid || that_present_uid) {
      if (!(this_present_uid && that_present_uid)) return false;
      if (!this.uid.equals(that.uid)) return false;
    }

    boolean this_present_sinceID = true;
    boolean that_present_sinceID = true;
    if (this_present_sinceID || that_present_sinceID) {
      if (!(this_present_sinceID && that_present_sinceID)) return false;
      if (this.sinceID != that.sinceID) return false;
    }

    boolean this_present_lastCrawlTime = true;
    boolean that_present_lastCrawlTime = true;
    if (this_present_lastCrawlTime || that_present_lastCrawlTime) {
      if (!(this_present_lastCrawlTime && that_present_lastCrawlTime)) return false;
      if (this.lastCrawlTime != that.lastCrawlTime) return false;
    }

    boolean this_present_lastCrawlNum = true;
    boolean that_present_lastCrawlNum = true;
    if (this_present_lastCrawlNum || that_present_lastCrawlNum) {
      if (!(this_present_lastCrawlNum && that_present_lastCrawlNum)) return false;
      if (this.lastCrawlNum != that.lastCrawlNum) return false;
    }

    return true;
  }
Ejemplo n.º 3
0
 /** Performs a deep copy on <i>other</i>. */
 public UserCrawlState(UserCrawlState other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetUid()) {
     this.uid = other.uid;
   }
   this.sinceID = other.sinceID;
   this.lastCrawlTime = other.lastCrawlTime;
   this.lastCrawlNum = other.lastCrawlNum;
 }
Ejemplo n.º 4
0
  @Override
  public int compareTo(UserCrawlState other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSinceID()).compareTo(other.isSetSinceID());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSinceID()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sinceID, other.sinceID);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLastCrawlTime()).compareTo(other.isSetLastCrawlTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLastCrawlTime()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.lastCrawlTime, other.lastCrawlTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLastCrawlNum()).compareTo(other.isSetLastCrawlNum());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLastCrawlNum()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.lastCrawlNum, other.lastCrawlNum);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }