Beispiel #1
0
  @Override
  public int compareTo(TExerciseType other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetMyid()).compareTo(other.isSetMyid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMyid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myid, other.myid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTypeName()).compareTo(other.isSetTypeName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTypeName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeName, other.typeName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCreateAt()).compareTo(other.isSetCreateAt());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreateAt()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createAt, other.createAt);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUpdateAt()).compareTo(other.isSetUpdateAt());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUpdateAt()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateAt, other.updateAt);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetActive()).compareTo(other.isSetActive());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActive()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.active, other.active);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Beispiel #2
0
 /** Performs a deep copy on <i>other</i>. */
 public TExerciseType(TExerciseType other) {
   __isset_bitfield = other.__isset_bitfield;
   this.myid = other.myid;
   if (other.isSetTypeName()) {
     this.typeName = other.typeName;
   }
   if (other.isSetCreateAt()) {
     this.createAt = other.createAt;
   }
   if (other.isSetUpdateAt()) {
     this.updateAt = other.updateAt;
   }
   this.active = other.active;
 }
Beispiel #3
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, TExerciseType struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetMyid()) {
     optionals.set(0);
   }
   if (struct.isSetTypeName()) {
     optionals.set(1);
   }
   if (struct.isSetCreateAt()) {
     optionals.set(2);
   }
   if (struct.isSetUpdateAt()) {
     optionals.set(3);
   }
   if (struct.isSetActive()) {
     optionals.set(4);
   }
   oprot.writeBitSet(optionals, 5);
   if (struct.isSetMyid()) {
     oprot.writeI32(struct.myid);
   }
   if (struct.isSetTypeName()) {
     oprot.writeString(struct.typeName);
   }
   if (struct.isSetCreateAt()) {
     oprot.writeString(struct.createAt);
   }
   if (struct.isSetUpdateAt()) {
     oprot.writeString(struct.updateAt);
   }
   if (struct.isSetActive()) {
     oprot.writeBool(struct.active);
   }
 }
Beispiel #4
0
  public boolean equals(TExerciseType that) {
    if (that == null) return false;

    boolean this_present_myid = true;
    boolean that_present_myid = true;
    if (this_present_myid || that_present_myid) {
      if (!(this_present_myid && that_present_myid)) return false;
      if (this.myid != that.myid) return false;
    }

    boolean this_present_typeName = true && this.isSetTypeName();
    boolean that_present_typeName = true && that.isSetTypeName();
    if (this_present_typeName || that_present_typeName) {
      if (!(this_present_typeName && that_present_typeName)) return false;
      if (!this.typeName.equals(that.typeName)) return false;
    }

    boolean this_present_createAt = true && this.isSetCreateAt();
    boolean that_present_createAt = true && that.isSetCreateAt();
    if (this_present_createAt || that_present_createAt) {
      if (!(this_present_createAt && that_present_createAt)) return false;
      if (!this.createAt.equals(that.createAt)) return false;
    }

    boolean this_present_updateAt = true && this.isSetUpdateAt();
    boolean that_present_updateAt = true && that.isSetUpdateAt();
    if (this_present_updateAt || that_present_updateAt) {
      if (!(this_present_updateAt && that_present_updateAt)) return false;
      if (!this.updateAt.equals(that.updateAt)) return false;
    }

    boolean this_present_active = true;
    boolean that_present_active = true;
    if (this_present_active || that_present_active) {
      if (!(this_present_active && that_present_active)) return false;
      if (this.active != that.active) return false;
    }

    return true;
  }